Extension talk:ShowRealUsernames/Archive 1

Code doesn't seem to work for me. SRUquery throws an exception:

Detected bug in an extension! Hook SRUquery failed to return a value; should return true to continue hook processing or false to abort.

Backtrace:


 * 0 C:\Wiki\htdocs\mediawiki\includes\specials\SpecialListusers.php(112): wfRunHooks('SpecialListuser...', Array)
 * 1 C:\Wiki\htdocs\mediawiki\includes\Pager.php(239): UsersPager->getQueryInfo
 * 2 C:\Wiki\htdocs\mediawiki\includes\Pager.php(148): IndexPager->reallyDoQuery( '', 51, true)
 * 3 C:\Wiki\htdocs\mediawiki\includes\specials\SpecialListusers.php(157): IndexPager->doQuery
 * 4 C:\Wiki\htdocs\mediawiki\includes\specials\SpecialListusers.php(269): UsersPager->getBody
 * 1) 5 [internal function]: wfSpecialListusers(NULL, Object(SpecialPage))
 * 6 C:\Wiki\htdocs\mediawiki\includes\SpecialPage.php(771): call_user_func('wfSpecialListus...', NULL, Object(SpecialPage))
 * 7 C:\Wiki\htdocs\mediawiki\includes\SpecialPage.php(559): SpecialPage->execute(NULL)
 * 8 C:\Wiki\htdocs\mediawiki\includes\Wiki.php(229): SpecialPage::executePath(Object(Title))
 * 9 C:\Wiki\htdocs\mediawiki\includes\Wiki.php(59): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 * 1) 10 C:\Wiki\htdocs\mediawiki\index.php(116): MediaWiki->initialize(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
 * 2) 11 {main}


 * In general, this type of error message is caused by a change in MediaWiki which took place at or before version 1.14a; the easiest fix is to go to the end of whatever routine it's complaining about in the extension (in this case, SRUquery) and add:  Very common to see this when using many old extensions on any of this year's MediaWiki versions, unfortunately. --Carlb 12:15, 10 September 2009 (UTC)

———
 * NOTE:  I had this problem with MW1.15.5, I found that PHP>5.3.0 also causes this problem, even if function does return a value.   You need to edit code to remove ampersands, thus:
 * function SRUquery( &$pager, &$query ) {
 * becomes
 * function SRUquery( $pager, $query ) {
 * and
 * function SRUrow( &$item, $row ) {
 * becomes
 * function SRUrow( $item, $row ) {
 * becomes
 * function SRUrow( $item, $row ) {

Something wrong and extension is not working
MediaWiki 	1.14.0 PHP 	5.2.9 (apache2handler) MySQL 	5.1.33-community

Retrieved from "http://www.mediawiki.org/wiki/Extension:ShowRealUsernames" Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\xampp\htdocs\FYwiki\extensions\ShowRealUsernames\ShowRealUsernames.php:95) in C:\Programme\xampp\htdocs\FYwiki\includes\WebResponse.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\xampp\htdocs\FYwiki\extensions\ShowRealUsernames\ShowRealUsernames.php:95) in C:\Programme\xampp\htdocs\FYwiki\includes\WebResponse.php on line 16

How can one fix this or how to find the reason? Thanks! --Jostar 09:14, 1 December 2009 (UTC)

Restricting who sees the Real Names
I only wanted 'crats to be able to see the Real Names, so I altered the  function to add a check for the user having the showrealname right, as shown below:

Then I added the following to my  after the require_once call:

I hope that this is useful (I know it works on MW 1.15.4) - I was tempted to change the documentation on the main Extension:ShowRealUsernames page, but I'll leave that to someone else! --  Phantom Steve / talk &#124; contribs \ 16:45, 24 June 2010 (UTC)
 * well looking, works fine, should be added to the extension code --Jostar 22:58, 24 June 2010 (UTC)
 * This has been incoporated into version 1.2. - RV1971 (talk) 13:36, 17 April 2013 (UTC)

Internationalizartion issues: description and attempting to view ShowRealUsenames.i18n.php
The main file, ShowRealUsenames.php starts with a comment and then says: I think something similar should be done in the internationalization file ShowRealUsernames.i18n.php. Also, the description shown in Special:Version could be internationalized by using a descriptionmsg instead. I have written a descriptionmsg in English and one in Spanish here: and if the description is translated in the ShowRealUsernames.i18n.php page, in the ShowRealUsernames.php file, instead of: It could then be: However, I have not tested the extension with these changes. Nlemslu Phlyshi 09:49, 8 July 2011 (UTC)


 * Tested now and it seems to work correctly, however, the á may need to be written &amp;aacute; if the text editor attempts to use a wrong encoding, I also suggest (and have tested) replacing "Special:ListUsers" with a wikilink, in Spanish that is "Especial:ListaUsuarios". It could be translated to other languages as well. I have attempted to add a translation to Danish of the messages and one to Bokmål Norwegian of the message, I am not completely sure about the accuracy of the latter one, but I cannot find any specific word in it that looks wrong, so I add it below anyway:


 * Nlemslu Phlyshi 14:49, 8 July 2011 (UTC)


 * I added it here. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 01:39, 22 July 2012 (UTC)