[Mediawiki-l] <sort> Tag ?
rowan.collins at gmail.com
Wed Feb 16 18:46:19 UTC 2005
On Wed, 16 Feb 2005 09:23:03 -0800, Jan Steinman <Jan at bytesmiths.com> wrote:
> > is there something like a <sort>-Tag in Mediawiki?
> Sounds like a job for an extension. Sounds like a couple hours of work
> max if you know your way around PHP and Unix.
Still seems like something best done externally and then dumped back
in the wiki by humans to me - especially since that way it would be
permanent, rather than being recalculated every time the page was
viewed. And if the source is unsorted, you've got the increased risk
of people adding duplicates because they'll dump everything at the end
rather than finding the right place to add it; then the list will sort
itself, and the duplicates will end up next to each other - but when
someone goes to edit the list, they'll have to hunt through to find
where they are in the source...
To make the sorting really easy, if you think it's going to happen a
lot, you could put a form up on your website that lets people sort
stuff. For a quick hack in pure PHP, copy
http://126.96.36.199/~ron/sort.php.txt - you'll want to tidy it up,
especially in terms of prettifying the HTML, but in general that's all
Note that the function I used there, "natcasesort", is not only case
insensitive, but is designed to act "like a human would", so for
* [[link 1]]
* [[link 1]]
Rowan Collins BSc
More information about the MediaWiki-l