Magnus Manske wrote:
OK, preliminary version running at test.wikipedia.org.
Cool!
Comments:
When you list subcategories on a category page, you link to [[XXX]] when you should link to [[Category:XXX]]. On [[test:]] at least, this means a lot of spurious red links!
If I add a category link to an article and return to the category page, then my browser isn't told that the category page has been changed. This means that I should never trust a category page without reloading. A simple solution might be to never cache category pages, yet this will be problematic when the category pages become long. The more complete solution is to tell the cache to expire whenever the table of categories is changed for that category, rather than only when the category page itself has been edited; but I don't know how well that would fit into your code.
If a category page doesn't exist but I go to it anyway, then all I see is "(There is currently no text in this page)". There's no indication that there are already articels in the category. Could we still list them after "(There is currently no text ...)"?
The following two concerns may have a combined solution:
There is no support for redirected categories. For example, [[Category:Abstract Algebra]] redirects to the correct [[Category:Abstract algebra]] (and we want to allow this, or people will duplicate things!). Yet [[Category:Abstract algebra]] doesn't list the items that link to [[Category:Abstract Algebra]]. Instead, it only lists [[Category:Abstract Algebra]] as a subcategory, which is not what it really is. Category redirects were an important feature of Erik's idea.
You also don't list subcategories of subcategories. We don't really need this, since you can look at the subcategories, but it could confuse people as to what categories already exist. Now, we could ask people to link to [[Category:Mathematics]] whenever they link a category page to [[Category:Group theory]] (of course, you would not require this in ordinary articles). OTOH, you could list subcategories of subcategories fairly cleanly by using nested list structures in the rendered HTML; without that, it would end up being pretty messy.
The combined solution: Use a nested list structure similar to that on [[Special:Whatlinkshere]]. Then [[Category:Mathematics]] (as things now stand on [[test:]]) would say: "== Subcategories == "* [[Category:Advanced mathematics]] "** [[Category:Abstract algebra]] "*** [[Category:Abstract Algebra]] (redirect) "**** [[Category:Group theory]] "** [[Category:Set theory]] "* [[Category:Logic]] "* [[Category:Philosophy of mathematics]] "** [[Category:Foundations of mathematics]] It would be nicer, of course, to elide the redirect entirely, but perhaps that would be more difficult to programme? Potentially, you could stick a list of all articles in each subcategory inside this nested list structure, but that would probably be too long. (BTW, I've decided that [[Category:Advanced mathematics]] is a bad idea, but that's irrelevant to this discussion.)
The following comments are not very important, so don't hold off on implementation because of them:
Links to categories probably shouldn't show up as stubs (brown text). But they should still show up as nonexistent (red text) when applicable.
If I put category links or interlanguage links at the bottom of a page, then this puts additional whitespace at the bottom of the HTML that really shouldn't be there; and this is not a new problem. It makes [[Category:Logic]] (for example) look kind of funny.
Shouldn't category pages have yellow backgrounds? I'm conflicted.
The list of articles in a category would look nicer if titles were given using spaces instead of underscores. The same goes for the list of subcategories of a category and the list of all categories on [[Special:Categories]].
P.S.: This time I'll try to outsmart you all; unless I hear about some real problems with this scheme in the next few days, I'm going to put this into the CVS! Be warned!! ;-)
Perhaps this should be announced on <wikipedia-L>? After all, we've been discussing category schemes over there. Then give them maybe a week?
-- Toby