[Wikipedia-l] Categories in the PHP script

Magnus Manske Magnus.Manske at epost.de
Thu Jan 3 17:30:10 UTC 2002

Hi all!

I finally got to implement the often-demanded categories in the PHP script

It works like this:
- Add "{{CATEGORY A category,Another category}}" to the text of an article.
Separate the categories by ",".
- Everything between {{ and }} will *not* be displayed within the text, but
as a category list at the bottom of the page, as well as in the sidebar, if
you have turned it on.
- In an article that *is* a category, write "{{THISCATEGORY}}" somewhere.
This will be replaced with a list of all articles which *at that very
moment* have a "{{CATEGORY xyz}}" for that category.

See it for yourself at the above site. I put "Gene" and "DNA" into both
"Biology" and "Genetics" category. "Genetics" itself is in the "Biology"
Category. On the "Genetics" and "Biology" pages, at the bottom, you'll find
a grey box, listing all the pages that are within that category.

OK, I know this screams "problems" all over, but it's just the "hooray, it's
running!" version. There's much more to be done, starting with a sorted
article output to limiting "Search" and "Recent Changes" to certain
categories, and so on. But hey, it's a start...

A more technical note: I also put all the "fixed" text displayed on the
'pedia into variables and collected them in one single file. So, for
international versions, only one file has to be changed, the other files can
get "technical" updates without having to translate/merge the whole thing

That's all for now,

More information about the Wikipedia-l mailing list