The attached patch (6KB, unified diff) against CategoryPage.php in
MediaWiki 1.4.4 changes the way headings are inserted into category
pages.
Previously, each letter would get its own heading. This was a pet
peeve of mine, as on some pages you'd get several headings with only
one item:
A
* Apple
B
* Banana
F
* Food
* Fruit
M
* Melon
O
* Orange
T
* Tangerine
The patch combines consecutive sections with only one item in them,
and rewrites the header to the form "A–B". So with the patch
applied, the above would be more like:
A-B
* Apple
* Banana
F
* Food
* Fruit
M-T
* Melon
* Orange
* Tangerine
The patch also changes how pages are inserted into each column.
Previously, categories with six pages or less were given one column,
while those with more than six had three columns; pages were then
divided evenly between the three columns. With this change, all
categories (notionally) have three columns, but each column is
guaranteed at least six pages before the next column gets any. The
columns are also represented as fixed-width <div>s instead of tables;
this could be trivially changed.
The patch is 6KB, likely mainly because I'm not very familiar with
PHP; it would probably need to be made more idiomatic before it could
be accepted. It's in use on one of my wikis if you want to see the
result:
<http://mt.brentdax.com/wiki/Special:Categories>
--
Brent 'Dax' Royal-Gordon <brent(a)brentdax.com>
Perl and Parrot hacker