Version 1.6: category-tree inputs, 'CreateClass' page, default upload filenames, etc.

5 views
Skip to first unread message

Yaron Koren

unread,
Apr 21, 2009, 8:28:24 PM4/21/09
to semanti...@googlegroups.com
Hi all,

Version 1.6 of Semantic Forms has been released. This is a fairly major new version, with a lot of additions and bug fixes. They are:

- there are now inputs for letting you select a category. Being able to select a category is a feature that people have requested since almost the beginning of Semantic Forms, but I always rejected it on the theory that users shouldn't be adding categories to pages, and that a page shouldn't belong to more than one category anyway. I still think that's usually the case, but there are a number of wikis, like LexWiki, that use categories as inputs because they're the only thing that matches the need: a hierarchical set of values. It dawned on me that there's no way now, and probably no way ever, that semantic properties will be able to generate a hierarchical form input, so that you can, for instance, choose whether to set a car to be of type "Ford" or "Ford Taurus", with the latter a subset of the former. So, there are now two new input types for forms that display a category tree: "category" and "categories". Both use the CategoryTree extension, which must be installed for these input types to work:

http://www.mediawiki.org/wiki/Extension:CategoryTree

The difference between the two input types is that "category" only lets you select one value, while "categories" lets you select many: the first uses radiobuttons, while the second uses checkboxes.

I should note that I haven't changed my opinion, the subject of a recent thread, that a page should only have one category *that has a default form*.

- the 'CreateClass' special page was added. This page provides a form for letting you create all the components of a single "class" - properties, template, form and category - in one place, at the same time. This should be helpful for people who want to get a wiki up and running quickly, including beginning users. It should be noted that the page provides very little flexibility compared to creating each component separately - you can't have more than one template in the form, for instance.

- Samuel Lampa's addition of setting a default filename for file uploads has been added, with some modifications: if you add the field parameter "default filename" to an uploadable field, it will set the default name given to that file. Also, the value of this parameter can include a "<page name>" variable, which will get substituted with the name of the page being created or edited.

- mandatory radiobutton and dropdown fields no longer have a "None" or blank option show up, if they're set with a default value.

- remote autocompletion now works for wikis that use the new SMW database structure (i.e., most SMW wikis). Until now, it always used the old table structure, for no good reason.

- a bug was fixed so that the 'Category' namespace can have a default form associated with it.

- the time placed in the form for fields with a "default=now" setting is now set according to the wiki's time zone; thanks to Patrick Nagel for the fix.

- if the user is creating a page that has already been deleted once or more, a warning message, with a list of previous deletions, appears at the top of the form, just as happens with the regular "edit" tab.

- if a page has more than one default form associated with it, due to multiple categories, a warning message appears at the top of the "edit with form" tab. (This warning doesn't show up if the page has one default form from its category and a different one from its namespace - category always supersedes namespace.)

- the #tooltip parser function defined in SMW now works in forms.

-  a typo introduced in version 1.5 was fixed, for handling form fields not defined in the template.

- the extension produces a more helpful error message if SMW is not installed.

- language support was added for Veps.

-Yaron

Guoqian Jiang

unread,
Apr 21, 2009, 10:59:08 PM4/21/09
to semanti...@googlegroups.com
Yaron,

This is fantastic.

I made an installation and tested the category tree inputs.

There was a performance issue initially. I checked your category tree usage and noticed that you set the depth to 10 which is probably the reason for this performance issue. I would suggest set it to 1 or 2 and let user to expand from top level. However, when I changed the depth number and expanded the tree and I noticed a side effect that the sublevel categories do not have a radiobutton attached.

Anyway, this is a fantastic implementation. Thanks a lot,

-Guoqian




Date: Tue, 21 Apr 2009 20:28:24 -0400
Subject: [Semantic Forms] Version 1.6: category-tree inputs, 'CreateClass' page, default upload filenames, etc.
From: yar...@gmail.com
To: semanti...@googlegroups.com

Yaron Koren

unread,
Apr 22, 2009, 12:58:02 AM4/22/09
to semanti...@googlegroups.com
Hi,

Alas - I feared that would happen - the performance issues. Unfortunately, I don't know if there's any way around it. CategoryTree uses Ajax to get additional categories at a depth greater than what it initially retrieved, when a user clicks on a "+" sign. Semantic Forms, meanwhile, does some string replacements to add the radiobuttons or checkboxes before each category name in the CategoryTree output. Unfortunately, I don't  think it's possible to get SF to do that on additional subcategories retrieved via Ajax. That's why SF gets categories to such a large depth - 10 - because it can only handle categories that were retrieved right at the beginning. Does that mean that the 'category' input, in its present form, is unusable for your wiki?

-Yaron


2009/4/21 Guoqian Jiang <gqj...@hotmail.com>

Patrick Nagel

unread,
Apr 22, 2009, 2:55:50 AM4/22/09
to semanti...@googlegroups.com
Hi Yaron,

On 2009-04-22 08:28, Yaron Koren wrote:
> Version 1.6 of Semantic Forms has been released. This is a fairly major
> new version, with a lot of additions and bug fixes. They are:

[...]

Thanks for all the work you put into SF :)

I found and fixed another problem with autocompletion - a patch is attached.

The problem was that MySQL's LOWER() [1] does not work on BINARY, VARBINARY and
BLOB. But `page_title` is (now?) of type VARBINARY. I changed the SQL queries
so that all arguments to LOWER() function calls are converted to UTF8 first.

Patrick.

[1]: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lower

--
Key ID: 0x86E346D4 http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4

sf_autocomp_case.patch

Patrick Nagel

unread,
Apr 22, 2009, 3:23:48 AM4/22/09
to semanti...@googlegroups.com
Hi,

forget about my last attached patch - here is another one. It includes an
additional (one-byte) fix that makes autocompletion on words after spaces (and
not only on the beginning of the property/page name) possible again.

Patrick.

sf_autocomp_case2.patch

Patrick Nagel

unread,
Apr 22, 2009, 3:50:04 AM4/22/09
to semanti...@googlegroups.com
(Oh come on...)

All good things come in threes - here is the third version (which actually only
differs from version 2 by 7 bit).

This time autocompletion *really* works on word borders. In version 2 it
(somehow) also found a result in the middle of a word.

sf_autocomp_case3.patch

Dan Bolser

unread,
Apr 22, 2009, 4:26:39 AM4/22/09
to semanti...@googlegroups.com
Awesome work!

These enhancements look fantastic! SF just keeps getting better!

Thanks Yaron!

P.S. A bunch of people (currently between 7 and 15) hang out on the
irc channel irc://irc.freenode.net/#semanticmediawiki

There is currently a discussion about the new SF (for example). Their
can be somewhat of a delay between asking your question and getting an
answer, but the more people who join the more lively the discussion
will become!

If you don't have an irc client installed, you can get to that channel
via the Mibbit 'irc web portal':

http://mibbit.com/chat/


All the best,
Dan.


2009/4/22 Yaron Koren <yar...@gmail.com>:

Guoqian Jiang

unread,
Apr 22, 2009, 9:59:33 PM4/22/09
to semanti...@googlegroups.com, yar...@gmail.com

FYI.


Date: Wed, 22 Apr 2009 21:49:32 -0400
Subject: Re: [Semantic Forms] Re: Version 1.6: category-tree inputs, 'CreateClass' page, default upload filenames, etc.
From: yar...@gmail.com
To: gqj...@hotmail.com

Hi,

That's interesting - although I don't know if the screenshots help, since they show all this Halo stuff. :)

Could you send that email to the list, though? I'd be curious to know if anyone else has an opinion on it.

-Yaron


2009/4/22 Guoqian Jiang <gqj...@hotmail.com>

Hi, Yaron,

For the interface design of category tree-based input, I would suggest to use iframe you already adoped for upload file.

I have made a category input based on Halo Ontology Browser working in an internal wiki and put some screenshots at

http://informatics.mayo.edu/vkcdemo/lexwiki1/index.php/Semantic_Forms_Enhancement_20090422

Not sure if you like the design but I think it may help overcome performance issue and provide more flexibility (e.g. some users would like to use autocompletion instead).

-Guoqian




Date: Wed, 22 Apr 2009 00:58:02 -0400
Subject: [Semantic Forms] Re: Version 1.6: category-tree inputs, 'CreateClass' page, default upload filenames, etc.

Dan Bolser

unread,
Apr 23, 2009, 6:41:12 AM4/23/09
to semanti...@googlegroups.com, yar...@gmail.com
2009/4/23 Guoqian Jiang <gqj...@hotmail.com>:
>
> FYI.
>
> ________________________________
> Date: Wed, 22 Apr 2009 21:49:32 -0400
> Subject: Re: [Semantic Forms] Re: Version 1.6: category-tree inputs,
> 'CreateClass' page, default upload filenames, etc.
> From: yar...@gmail.com
> To: gqj...@hotmail.com
>
> Hi,
>
> That's interesting - although I don't know if the screenshots help, since
> they show all this Halo stuff. :)
>
> Could you send that email to the list, though? I'd be curious to know if
> anyone else has an opinion on it.

I don't know much about iframe or the implementation details of
category tree / SF, however, I do know that category queries can be a
massive hit on performance. This seems strange as there are typically
only a few categories in a wiki, and the queries should be very fast.

Can you explain why querying the category hierarchy is so slow? Is it
because you are required to query at the page level?

Could this be a MW issue?


Cheers,
Dan.

Guoqian Jiang

unread,
Apr 23, 2009, 9:17:11 AM4/23/09
to semanti...@googlegroups.com
Well, we have different use case, in which most of wiki pages are in Category namespace.

-Guoqian

> Date: Thu, 23 Apr 2009 11:41:12 +0100

> Subject: [Semantic Forms] Re: Version 1.6: category-tree inputs, 'CreateClass' page, default upload filenames, etc.

robertuva

unread,
Apr 27, 2009, 7:13:29 PM4/27/09
to Semantic Forms
wikiHow has an interesting UI as well:

http://www.wikihow.com/Special:Uncategorizedpages

You have to be logged in to update categories on their site.

Bobby

On Apr 22, 9:59 pm, Guoqian Jiang <gqji...@hotmail.com> wrote:
> FYI.
>
> Date: Wed, 22 Apr 2009 21:49:32 -0400
> Subject: Re: [Semantic Forms] Re: Version 1.6: category-tree inputs,    'CreateClass' page, default upload filenames, etc.
> From: yaro...@gmail.com
> To: gqji...@hotmail.com
>
> Hi,
>
> That's interesting - although I don't know if the screenshots help, since they show all this Halo stuff. :)
>
> Could you send that email to the list, though? I'd be curious to know if anyone else has an opinion on it.
>
> -Yaron
>
> 2009/4/22 Guoqian Jiang <gqji...@hotmail.com>
>
> Hi, Yaron,
>
> For the interface design of category tree-based input, I would suggest to use iframe you already adoped for upload file.
>
> I have made a category input based on Halo Ontology Browser working in an internal wiki and put some screenshots at
>
> http://informatics.mayo.edu/vkcdemo/lexwiki1/index.php/Semantic_Forms...
>
> Not sure if you like the design but I think it may help overcome performance issue and provide more flexibility (e.g. some users would like to use autocompletion instead).
>
> -Guoqian
>
> Date: Wed, 22 Apr 2009 00:58:02 -0400
>
> Subject: [Semantic Forms] Re: Version 1.6: category-tree inputs,  'CreateClass' page, default upload filenames, etc.
> From: yaro...@gmail.com
>
> To: semanti...@googlegroups.com
>
> Hi,
>
> Alas - I feared that would happen - the performance issues. Unfortunately, I don't know if there's any way around it. CategoryTree uses Ajax to get additional categories at a depth greater than what it initially retrieved, when a user clicks on a "+" sign. Semantic Forms, meanwhile, does some string replacements to add the radiobuttons or checkboxes before each category name in the CategoryTree output. Unfortunately, I don't  think it's possible to get SF to do that on additional subcategories retrieved via Ajax. That's why SF gets categories to such a large depth - 10 - because it can only handle categories that were retrieved right at the beginning. Does that mean that the 'category' input, in its present form, is unusable for your wiki?
>
> -Yaron
>
> 2009/4/21 Guoqian Jiang <gqji...@hotmail.com>
>
> Yaron,
>
> This is fantastic.
>
> I made an installation and tested the category tree inputs.
>
> There was a performance issue initially. I checked your category tree usage and noticed that you set the depth to 10 which is probably the reason for this performance issue. I would suggest set it to 1 or 2 and let user to expand from top level. However, when I changed the depth number and expanded the tree and I noticed a side effect that the sublevel categories do not have a radiobutton attached.
>
> Anyway, this is a fantastic implementation. Thanks a lot,
>
> -Guoqian
>
> Date: Tue, 21 Apr 2009 20:28:24 -0400
> Subject: [Semantic Forms] Version 1.6: category-tree inputs, 'CreateClass' page, default upload  filenames, etc.
>

Guoqian Jiang

unread,
Apr 27, 2009, 8:36:17 PM4/27/09
to semanti...@googlegroups.com
Looks nice. see some descriptions and screenshot here http://www.wikihow.com/Categorize-a-wikiHow-Article.

Thanks,

-Guoqian

> Date: Mon, 27 Apr 2009 16:13:29 -0700

> Subject: [Semantic Forms] Re: Version 1.6: category-tree inputs, 'CreateClass' page, default upload filenames, etc.

Guoqian Jiang

unread,
Apr 28, 2009, 9:07:13 AM4/28/09
to semanti...@googlegroups.com

Hi, Yaron,

Is there any template name conventions for semantic forms?

I got the problem with templates which start with the same string and semantic forms treat them as the same templates.

For example,

{{Parent header}} - contains the header of a wikitable "{| class=wikitable"
{{Parent|value}} - contains the row of the wikitable "|{{{value}}}"
{{Parent trailer}} - contains the trailer of a wikitable "|}"

The semantic forms treat them as:

{{Parent|header}}
{{Parent|value}}
{{Parent|trailer}}

I am using partial form and tested this in ver1.6 and ver1.5.3 and both of them do not work for this use case though it works well with a very old version 1.1.

Is this related to wikitable formatting usage or not?

any idea?

Thanks,

-Guoqian




Yaron Koren

unread,
Apr 28, 2009, 10:15:27 AM4/28/09
to semanti...@googlegroups.com
Hi,

Yes, there's a bug in the handling of partial forms that showed up at some point recently. I hope to fix it sometime soon...

-Yaron

2009/4/28 Guoqian Jiang <gqj...@hotmail.com>

robertuva

unread,
May 12, 2009, 5:28:08 PM5/12/09
to Semantic Forms
By the way, I found another wiki site that uses category structures
like this:

http://wiki.answers.com/

Thing is you have to sign in before you can edit to see how they do
it, but their's is fairly similar to WikiHow. I doubt WikiAnswers
will give you their code base, but I know the people at WikiHow have
no problem giving their's away...very cool team.

Bobby

On Apr 27, 7:13 pm, robertuva <bob...@gmail.com> wrote:
> wikiHowhas an interesting UI as well:
Reply all
Reply to author
Forward
0 new messages