User talk:Subfader/LQT Archive 1

Default User Page header
Have you considered Extension:HeaderFooter ? Jean-Lou Dupont 13:55, 14 May 2008 (UTC)
 * Hi, thanks. Will check, if not I think I found another way: Hack monobook, include MW message, problem: get DB data.--Subfader 15:21, 14 May 2008 (UTC)

Created pages
I've deleted a whole bunch of apparently meaningless pages you've created with  . Werdna 07:50, 16 May 2008 (UTC)
 * yep thanks, tried to include the signature date to my nicknake signature. no idea how it works, now using the standard again. --Subfader 09:14, 16 May 2008 (UTC)

Category Sorting Rules
Here's a first draft for your 'Category Sorting Rules' extension. There's a mechanism already built in for this, but after having a quick play with it, it has a few little bugs, which I tried to fix (hence the edits to core Mediawiki files).

languages/Language.php (or in the language plugin for the language you are using): Change (lines 1383-1385): function convertCategoryKey( $key ) { return $this->mConverter->convertCategoryKey( $key ); }

To: function convertCategoryKey( $key ) { global $wgSortkeyRegexes; # Do the standard conversion $key = $this->mConverter->convertCategoryKey( $key ); # Convert to lowercase $key = mb_strtolower( $key ); # Apply any other transformations (such as accents) $key = preg_replace( array_keys( $wgSortkeyRegexes ), array_values( $wgSortkeyRegexes ), $key ); return $key; }

includes/Title.php: After (line 1910): function moveTo( &$nt, $auth = true, $reason = '' ) { Add: global $wgContLang;

Change (lines 1929-1932): $sql = "UPDATE $categorylinks SET cl_sortkey=". $dbw->addQuotes( $nt->getPrefixedText ). " WHERE cl_from=". $dbw->addQuotes( $pageid ). " AND cl_sortkey=". $dbw->addQuotes( $this->getPrefixedText ); $dbw->query( $sql, 'SpecialMovepage::doSubmit' );

To: $sql = "UPDATE $categorylinks SET cl_sortkey=". $dbw->addQuotes( $wgContLang->convertCategoryKey( $nt->getPrefixedText ) ). " WHERE cl_from=". $dbw->addQuotes( $pageid ). " AND cl_sortkey=". $dbw->addQuotes( $wgContLang->convertCategoryKey( $this->getPrefixedText ) ); $dbw->query( $sql, 'SpecialMovepage::doSubmit' );

In LocalSettings.php (or wherever seems appropriate), include a set of sort rules (as regular expressions). For example: $wgSortkeyRegexes = array(               '/[aàáâãäå]/'  => 'a',                '/[èéêë]/'     => 'e',                '/[$¢£¥]/'     => '¤',                '/^the +/'     => ,                '/^le +/'      =>         );

Hope this is of some use to you. I can always work on a more user-friendly extension if you prefer. --MrAngel 12:22, 2 June 2008 (UTC)

Edit-link on Category pages
I've got an extension on a couple of my sites that does something similar, although it's not implemented as a gadget. Is this of any interest to you?