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)

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?


 * Staying with my parents for a while now, and forgot to bring the extension code with me. I'll continue that when I get back. While I'm here, I'm having a look at your other requests instead - something like this suit your needs? Just need to add the show/hide links now (with 'hide' by default, because generating this list is quite intensive on the database). --MrAngel 14:33, 15 June 2008 (UTC)


 * Yeah, absolutely as I described! Looks like we have much in common wiki-wise :D --Subfader 14:40, 15 June 2008 (UTC)


 * OK ... not sure how to paste a PHP file on here without it trying to parse bits as wikitext, so I emailed it to you. (Somehow I've ended up with more experience in writing extensions than actually using the thing). The show/hide link reloads the page at present ... I tried putting it in javascript, but generating the lists of links puts such a big load on the database that I figured we should only do it when the user actually wants it. --MrAngel 04:36, 16 June 2008 (UTC)

Unsigned user request
Hi if you have interesting to add replace per-word will be great. I described the problem here http://www.mediawiki.org/wiki/Extension_talk:Replace_Text#Problems Yaron doesn't want to implement it. Any chance? --Unsigned User
 * I dunno how check boxes for every match per page should work for Extension:Replace Text, but this is not the place to request it. --Subfader 10:45, 2 July 2008 (UTC)
 * Hi Subfader, I just requested this here because i saw MrAngel user is implementing some functions to ReplaceText extension so as Yaron doesn't want to implement it, i thought MrAngel could. But thanks for listening me.

Search-Replace-Move extension
I've just started working on an extension for this one, but am stopping work for today because my neighbour's music is making working here unbearable. I'll hopefully have a result for you in a couple of days. --MrAngel 18:04, 30 June 2008 (UTC)
 * Awesome :) Def check Extension:Replace Text to see how they do it; although I don't like that you#re not able to restrict it to "only pages in category X". --Subfader 19:08, 30 June 2008 (UTC)
 * So far, I've got the code to find and change the titles done, so I just need to do the forms. I'm looking at integrating it with the existing Replace Text extension, so you have a dropdown list option for "Change [page text/titles/both]". I think that putting the two functions together makes a lot of sense - if your search/replace is moving a page, you might also want it to change links on other pages; and if you're doing a search/replace on page texts, you might want it to avoid breaking links.
 * I'll have a look at being able to limit to certain categories - might be a bit challenging to make the extension work with all the databases (I use PostgreSQL, most people use MySQL, so I always prefer to write portable code even if it takes a bit longer). --MrAngel 22:42, 30 June 2008 (UTC)
 * Whoa straight forward eh? :) The integration on Special:Replace Text would be ace as I indeed requested it for the extension. The only thing bad about Extenions:Replace Text is the user problem while the job queue is running.
 * Changing Article Links ? in page content is great, didn't think of the fact that you wouldn't look at Whatlinkshere in such a batch list of course. Looking forward to it. --Subfader 07:01, 1 July 2008 (UTC)
 * I just posted on the extension's talk page with a fix for the user problem. Was just testing and I noticed that it also confused my Per-User Sidebar extension, so figured fixing that would be a higher priority.
 * At first, I expected changing the links to be a big job, but it seems it'll be relatively simple to pull out the contents of the linkcache. --MrAngel 17:08, 1 July 2008 (UTC)


 * OK, got a first prototype ready. Not tested yet, though, and still needs some work on the link-finding thing. Actually, I'm tempted to add a TitleMoveComplete hook, so that when you move/rename a page manually it presents a button to automatically search/replace oldtitle with newtitle . --MrAngel 16:10, 5 July 2008 (UTC)


 * Oh yes that would be awesome as it's missing completely in MW and now that you brought up the idea I wonder why it wasn't implented before. --Subfader 19:20, 5 July 2008 (UTC)


 * Actually, it makes sense not to include that feature on a big site like wikipedia. Its slower, and a lot more memory intensive, than simply turning the old name into a redirect. However, I think it could be a worthwhile addition now, especially on smaller sites, as servers have become a lot faster in the last few years. Should have a working demo for you in a couple of days (neighbours and their loud music permitting) --MrAngel 22:28, 5 July 2008 (UTC)


 * Hehe. Turn yours louder!
 * 1) So that checkbox will appear when you move a page the normal way and when you use the Move function integrated in Extension:Replace Text?
 * 2) About the server load: In the case of the Extension it searches the pages anyway, so no extra load caused by it.? On single moves the search could be done slowly in a job queue after the move action itself.
 * 3) Those link replaces should be done as minor edits for not annoying people having the affected articles in their watchlists ;)
 * 4) Maybe those link edits could even be done by a different user you are able to define in the extension (as I use a dummy user for the Replace Text actions since it's not really me doing all the work). --Subfader 22:49, 5 July 2008 (UTC)

ArticleComments extension: Return to article page after submitting a comment
If you are still interested I have posted a solution which works for me (MW 1.10) on the extensions discussion page! Optimale 11:09, 10 July 2008 (UTC)

Proper Ajax Rating
Hi. I just wanted to ask you whether you know if someone is already woking on the Proper Ajax Rating extension. Because I already started with it and have done some good pieces so it wouldn't be the nicest thing to find out that someone else is already doing the same. Thanks in advance. PS. Sorry for my bad english.
 * Nope, nobody doing anything from my requests atm. You work on it? Coolio! With proper mediawiki integration? I'm in love with IMDB's voting system :) --Subfader 16:48, 10 March 2009 (UTC)
 * Yep, I have my own provisory Ajax hadling but I'll port it to the MediaWiki handler. 17:10, 10 March 2009 (UTC)
 * By the way do you have any IM, like MSN, ICQ, Steam or similar? 17:04, 15 March 2009 (UTC)
 * eiceekuh: [removed]--Subfader 18:34, 15 March 2009 (UTC)
 * Try out the newest version of Ratingbar Extension:Rating_Bar that now supports stars... the only thing still missing is that it doesn't display on every site like AjaxStarRating AndiRay 11:45, 27 May 2009 (UTC)
 * Thanks, will install & play around when I have more time in summer. --Subfader 19:17, 27 May 2009 (UTC)

Hide Category
Hi, have you found a way to hide the ugly categories (on the category special page) that are needed for the Calendar extension? AndiRay 08:06, 30 April 2009 (UTC)
 * Nope, we live with them :) --Subfader 13:28, 30 April 2009 (UTC)

ConfirmEdit
Can you add ConfirmEdit to ArticleComments. This is an example of Captcha but I don't know how to add it on to my wiki. Can you help? I seen your User:Subfader/Article Comments and thought you might know something. Sachein 16:06, 13 May 2009 (UTC)
 * I use ConfirmEdit only for account registration. No time to test how to implent it to ArtcileComments though. You got problems with Spam or massive crap comments? Cpatchas for comments are the worst solution to stop spam imo cos it is simply uncomfortable for all the users. --Subfader 00:52, 14 May 2009 (UTC)
 * Thanks for the reply. :) Is it possible to hide tabs such as 'history' 'discussion' for logged in users. Basically only sysop can see it. Sachein 13:30, 14 May 2009 (UTC)
 * Sorry, no time to answer. You'll get better helped at http://www.mwusers.com/forums/ --Subfader 18:37, 14 May 2009 (UTC)

JSKitComments
Hi, Not sure if you seen this extension: JSKitComments, but it is like ArticleComments but more cooler and more complex. The comments go for moderation and you just approve it. Sachein 13:09, 8 June 2009 (UTC)
 * Thanks for the head-up. I'm happy with ArticleComments and don't want to aprove them first. --Subfader 17:44, 8 June 2009 (UTC)

Ummm....
Is this image being used for something useful? I was about to delete it as out of scope (which it seems to be), but I figured I'd ask first since you're an active community member (and not just a drive-by spammer :p). Thanks, ^demon 18:47, 6 August 2009 (UTC)
 * Please delete it. I needed some colorful example image to test imagemagick. Thanks for asking. --Subfader 23:22, 6 August 2009 (UTC)

Manual:Article count
Hello. Can you provide evidence of ?

Specifically, I don't think that the points "are no stubs containing a link," and "are not disambiguation pages." to be correct, as I don't find anything in the code that does so.

The "containing one wiki link or categorized on at least one category" is not the most correct one (it looks for the substring  in the page) but good enough. However, I don't see where do the stubs and disambiguation information come from.

Platonides 22:13, 7 August 2009 (UTC)


 * I didn't add the stubs and disambiguation info. I only added the "or is categorized to at least one category." part. If a category tag counts as link (not the same) it's ok but imo my addition makes it more clear. --Subfader 01:09, 8 August 2009 (UTC)

Hidden tabs
Hi, I found out how to hide tabs: DynamicTabs. Thanks for asking. Sachein 11:30, 11 August 2009 (UTC)

Sifting through categories
Hi Subfader, I noticed that in 2008 you've inquired about ways to limit / filter article searches by category (for instance, on Extension talk:InputBox and Extension talk:Multi-Category Search). Did you, in the meantime, discover a way to do it? It looks like a more memory intensive search engine like Lucene or Sphinx cannot handle it either (as reported here and here). Regards, Cavila 10:04, 7 February 2011 (UTC)