Topic on Project:Support desk

Extension for enabling alphabetization of sub-categories under the full Sort Key instead of the first letter of the Sort Key.

10
24.252.15.233 (talkcontribs)

Versions:
MediaWiki: 1.16.4
PHP: 5.2.10-2ubuntu6.5 (apache2handler)
MySQL: 5.0.92-87-log

Hello, I'm doing work on a Wikia Wiki and I need to find out if there's an extension for enabling the alphabetization of sub-categories on a category page under the full sort key instead of the first letter of the sort key. Specifically, I'm editing a Wiki for a video game series and have the category "Characters" and the sub-category be the name of a game in that series; I'd like to give the sub-category the sort key of "By Game" and have it appear in the "Characters" category as "By Game" instead of just "B". I asked if this was possible on Wikia's Community Central forums and someone believed there was a MediaWiki extension, but he doesn't appear to have any idea of what it's called. So I'm hoping someone can tell me if this extension exists and, if it does, tell me the name of the extension. Thanks.

68.13.18.131 (talkcontribs)

Bumping for necessity.

Sidcom (talkcontribs)
Bawolff (talkcontribs)

nope, not in 1.17. Things are always sorted by the entire sortkey, however only the first character is displayed in the sub-headings (in mediawiki core. It would be possible to make an extension similar to the hack that Sidcom links to, but I'm not aware of any such extension existing atm, and if there was one it would probably not be compatible with the recent category collation changes in 1.17).

Sidcom (talkcontribs)

Sorry to be a wise-ass ;)

1.17 release notes say: "When several pages are given the same sort key, they sort by their names instead of randomly."

Bawolff (talkcontribs)

>Sorry to be a wise-ass ;)

lol, being a wise-ass is where all the fun is ;)


But, I think there's two different things we're talking about. There's the big subheadings on the category page, which is always just a single letter. Then there is the actual sortkey, which except for the first letter is invisible to the user (but controls the order in which things appear in the category)

For example, if we had three pages in a category, with sortkey Bob, Bad, Baz, it'd look like

B

  • Bad
  • Baz
  • Bob

All three have different sortkeys (which determines Bad comes before Baz and Bob), but they all sort under the first letter of their sortkey.

The difference between 1.17 and 1.16, is if you have three pages all with the same sortkey, say Bob, Bob, and Bob: before they were sorted randomly, now we use what the real page's name is as a tie breaker. (To be technical, the page name is just plopped on the end of whatever the pages normal sortkey is).

Sidcom (talkcontribs)

Ah.. i totally misunderstood the initial request than :)

It would be very nice to have the hack as an extension - but to me the category sorting looks kind of hard coded.

Bawolff (talkcontribs)

Actually in 1.17 this changed to be much easier. (Since we now support multiple sorting algorithms in the interest of i18n, one could probably use the same mechanism to do something similar to the original request)

Bawolff (talkcontribs)

Hmm, the fact its hard for extensions to define new collations in 1.17 kind of put a crimp in my plans, but behold: Extension:CategorySortHeaders

24.252.14.234 (talkcontribs)

Thank you for helping everyone. There was a month between my bump and the first answer, so I had stopped checking this (until today). Bawolff, once Wikia upgrades past 1.16.5, I bet that extension will be a big help.

Reply to "Extension for enabling alphabetization of sub-categories under the full Sort Key instead of the first letter of the Sort Key."