[Commons-l] Rudimentary tagging system for Commons, in place, right now

Magnus Manske magnusmanske at googlemail.com
Mon Mar 1 22:28:16 UTC 2010


Now that I have your attention :-)

I've cooked up a simple tagging system for Commons. It uses the
category system by prefixing tag "categories" with TAG, e.g.
[[Category:TAG:Flower]]. TAG categories will be "flat", so
intersections are easy. Merging of equivalent tags could later be
possible through redirects, without having to bot-edit all affected
pages. Also, redirects and/or language links could allow for
multilingual tags, or at least multilingual tag search/intersection.

For the frontend, I put the tag section into the sidebar, which will
make it instantly familiar to many web users. On page load, the TAG
categories are removed from the normal category section and shown as
tags in the sidebar. This also means no additional web traffic will
arise for normal page viewing.

Tags can be removed with a single click. One or multiple tags can be
added or removed in a single operation. All editing is done via API,
so the page does not have to reload.

When checking one or more tags, a section containing a link to
"subset" will show. Currently, it links to my CatScan rewrite, showing
all pages in the current namespace that also have all the checked
tags. Linking to CatScan gives you the opportunity to add further
conditions; you can do a combined subset of TAG and "normal"
categories, templates, etc.

Of course, there could also be a dialog window or fake special page
showing e.g. images in the subset, using CatScan only as a backend. I'
holding back on that one...

The script is making extensive use of jQuery, so this script will only
work when jQuery is loaded. This is currently only the case for the
Vector skin, AFAIK. So, don't complain if it doesn't work for you in
Monobook ;-)

I have tagged the total of one example page so far (picture by me, so
noone else unduly harmed:-) Here you go:


http://commons.wikimedia.org/wiki/File:Vernomia_altissima_%28Compositae%29_flower.JPG?withJS=MediaWiki:Tag.js


Before the traditional (f)lamewar begins, let me say that I want to
"enforce" neither the TAG category system, the JavaScript sidebar
thing, or CatScan. I just want to present a working tagging system
within the current software framework, as is. I hope that, now that
there is at least demo code, something more useful than the usual "but
it also needs to make coffee!" discussion will arise.

Cheers,
Magnus

P.S.: Yes, there are probably a million bugs in the code...



More information about the Commons-l mailing list