It's currently not possible to link to a category without making that page a member of it (See http://test.wikipedia.org/wiki/Category_issues#How_to_link_to_category_witho...).
This is a bit of a problem of course, Brion proposes a separate link table for category-member links as a solution. This would also allow to add a field that records the date when a page was added to the category which would be very useful for sorting category overview pages by date.
This would be hard to change later, so i'd like to start some discussion on this now before the category feature goes live.
Gabriel Wicke
Gabriel Wicke wrote:
It's currently not possible to link to a category without making that page a member of it (See http://test.wikipedia.org/wiki/Category_issues#How_to_link_to_category_witho...).
This is a bit of a problem of course, Brion proposes a separate link table for category-member links as a solution. This would also allow to add a field that records the date when a page was added to the category which would be very useful for sorting category overview pages by date.
A long time ago (Phase II, IIRC), someone also suggested alternate listing abilities, especially for people. So, on [[George Bush]], [[Category:People|Bush, George]] would later be sorted and listed as "Bush, George", rather than under the real page title. Which makes sense, but is also impossible to do with the current setup.
Then there's also the "image category" issue, where we'd get some kind of automated photo album. Investment for wikimedia commons, at least.
This would be hard to change later, so i'd like to start some discussion on this now before the category feature goes live.
Not really; a single SQL query should be enough to fill a new category table with values from the link table. The addition dates would be dummies, of course, but I could live with that. Downtime, if any, should be within minutes. Or we do it when we switch to the new DB server...
Not to push my code or anything, but IMO we should go live with the current code (unless there'd something broken with it), and switch over later. I feel the time is right to introduce categories now. The experience will will gain with using the current category system will be very helpful in implementing a next stage, by avoiding flaws and adding functions we simply cannot forsee by running it on a test page.
Magnus
Magnus Manske wrote:
This would be hard to change later, so i'd like to start some discussion on this now before the category feature goes live.
Not really; a single SQL query should be enough to fill a new category table with values from the link table. The addition dates would be dummies, of course, but I could live with that. Downtime, if any, should be within minutes. Or we do it when we switch to the new DB server...
No, the problem is that *links to category pages* and *category links* are conflated in link tables in the present code, while they do different things.
Pulling the data from the present links table would not distinguish them; you'd have to parse every page involved.
-- brion vibber (brion @ pobox.com)
I've checked in some preliminary code for the categorylinks table, including support for arbitrary sort key specification.
It needs checking to make sure that caches get cleared and that rename, etc work properly.
-- brion vibber (brion @ pobox.com)
On 2004.05.14 20:31, Brion Vibber - brion@pobox.com wrote:
I've checked in some preliminary code for the categorylinks table, including support for arbitrary sort key specification.
Hello,
I recently became very interested in the category topic, and I am very glad to find that this work is going on.
It seems clear that categories are necessary, but may not be sufficient in themselves.
One useful idea seems to be roadmaps. It seems that one may want to structure the order of contents in a category in order to tell a story that spans multiple articles.
I started a log of my thinking and exploration related to this topic at wikipedia User:AJim/extensions.
I looked at the v 1.18 tables.sql categorylinks table, and I think the cl_sortkey index is right on track to support the kind of functionality I was looking for.
I am pretty new to this stuff. Will the changes that Brion just made appear on the test wiki soon? If so, how will I know?
Thanks,
Jim Laurino
Jim Laurino wrote:
I started a log of my thinking and exploration related to this topic at wikipedia User:AJim/extensions.
I looked at the v 1.18 tables.sql categorylinks table, and I think the cl_sortkey index is right on track to support the kind of functionality I was looking for.
I am pretty new to this stuff. Will the changes that Brion just made appear on the test wiki soon?
Already there, I installed it a few minutes after checking it in.
By default, the sort key will be the name of the article. That is, in an article "Linus Torvalds", a category link [[Category:Programmer]] will confer the sort key "Linus_Torvalds", and when you look at the list of programmers at Category:Programmer he'll appear under the L's.
If you override it, say [[Category:Programmer|Torvalds, Linus]], then he'll be sorted in the T's, though he'll still be listed as "Linus Torvalds".
(It's currently an ugly binary search and should get improved to something that's at least case-insensitive and ideally language-targetted. MySQL's limited language settings mean we'll have to manage that ourselves, making binary sort keys from the text.)
Categories can be nested in a tree structure, though the display is currently a bit awkward for that. There is not (yet) any specific navigation support for being "in" a category, though perhaps that's something that could get added somehow.
-- brion vibber (brion @ pobox.com)
Brion Vibber wrote:
If you override it, say [[Category:Programmer|Torvalds, Linus]], then he'll be sorted in the T's, though he'll still be listed as "Linus Torvalds".
Is this where you think, maybe we really should have less free-form, more predefined fields for some categories, especially persons, e.g.
[[person: surname = Torvalds givenname = Linus sex = male birthyear = 1969 nationality = Finland, United States occupation = programmer]]
or (to make it an IMDb clone) films:
[[movie: title = Kill Bill II director = Quentin Tarantino year = 2004]]
I'm just thinking out loud here.
This would not replace the free text, but fill the same role as the fact box for countries, where their population, area, etc. are listed.
The data input in this way could be rendered as a table or as plain text, and it could additionally be stored in a SQL table where smart searches can be made on people born in the same year, etc. An example of such a search tool is http://runeberg.org/search.pl where you can search 27,000 Scandinavian writers and artists. (Torvalds is in there.)
On 2004.05.16 01:38, Brion Vibber - brion@pobox.com wrote:
Jim Laurino wrote:
I am pretty new to this stuff. Will the changes that Brion just made appear on the test wiki soon?
Already there, I installed it a few minutes after checking it in.
Yes, faster than I imagined. Thanks.
I have tried it, although not the way I expected. I think it will meet the need to put a series of articles in an arbitrary, definite order.
Navigation, display, and related issues remain, but the basics seem sound. My impression is that great progress is also being made in the ability of users to influence these aspects of the wiki through customization.
By default, the sort key will be the name of the article. That is, in an article "Linus Torvalds", a category link [[Category:Programmer]] will confer the sort key "Linus_Torvalds", and when you look at the list of programmers at Category:Programmer he'll appear under the L's.
If you override it, say [[Category:Programmer|Torvalds, Linus]], then he'll be sorted in the T's, though he'll still be listed as "Linus Torvalds".
I could be wrong, but I do not think whitespace at the begining of the sort key is trimmed now. I wonder if it might be wise to trim it? Personally, I find whitespace programming to be hard ;).
Categories can be nested in a tree structure, though the display is currently a bit awkward for that. There is not (yet) any specific navigation support for being "in" a category, though perhaps that's something that could get added somehow.
I have yet to experiment with the nesting. It does sound useful.
Thanks again,
Jim Laurino
On Sunday 16 May 2004 07:38, Brion Vibber wrote:
Jim Laurino wrote:
I started a log of my thinking and exploration related to this topic at wikipedia User:AJim/extensions.
I looked at the v 1.18 tables.sql categorylinks table, and I think the cl_sortkey index is right on track to support the kind of functionality I was looking for.
I am pretty new to this stuff. Will the changes that Brion just made appear on the test wiki soon?
Already there, I installed it a few minutes after checking it in.
By default, the sort key will be the name of the article. That is, in an article "Linus Torvalds", a category link [[Category:Programmer]] will confer the sort key "Linus_Torvalds", and when you look at the list of programmers at Category:Programmer he'll appear under the L's.
If you override it, say [[Category:Programmer|Torvalds, Linus]], then he'll be sorted in the T's, though he'll still be listed as "Linus Torvalds".
(It's currently an ugly binary search and should get improved to something that's at least case-insensitive and ideally language-targetted. MySQL's limited language settings mean we'll have to manage that ourselves, making binary sort keys from the text.)
Categories can be nested in a tree structure, though the display is currently a bit awkward for that. There is not (yet) any specific navigation support for being "in" a category, though perhaps that's something that could get added somehow.
Does this mean that, if the page Category:Programmer has a link to Category:Human, Linus will appear on Category:Human without his article linking to Category:Human?
If Linus is linked to Category:Programmer and Category:Man, will it be possible that he appears in a list of male programmers? It should be easy though I have no idea how to do it.
By the way, I expected that categories will work similar to interlanguage links, hidden if not prefixed with :.
Nikola Smolenski wrote:
On Sunday 16 May 2004 07:38, Brion Vibber wrote:
Categories can be nested in a tree structure, though the display is currently a bit awkward for that. There is not (yet) any specific navigation support for being "in" a category, though perhaps that's something that could get added somehow.
Does this mean that, if the page Category:Programmer has a link to Category:Human, Linus will appear on Category:Human without his article linking to Category:Human?
Here's what should be shown, given the current code:
On [[Linus Torvalds]] there will be 'Categories: Programmer' at the top.
On [[Category:Programmer]] there will be 'Categories: Human' at the top, and Linus will appear in the list of programmers.
On [[Category:Human]], 'Programmer' will appear in the list of sub-categories of Human.
If Linus is linked to Category:Programmer and Category:Man, will it be possible that he appears in a list of male programmers? It should be easy though I have no idea how to do it.
Hypothetically one could generate such a list, but there's currently no support for doing it.
By the way, I expected that categories will work similar to interlanguage links, hidden if not prefixed with :.
That's correct.
-- brion vibber (brion @ pobox.com)
wikitech-l@lists.wikimedia.org