Extension talk:PageHistoryRealnames

Recent Changes
Hi - any reason why this works on page history and not on Recent Changes? Great extensions - thanks. --Robinson Weijman 15:44, 5 January 2010 (UTC)

I messed up
I believe to have followed the instructions. But the result was frightening: not only the source code showed up before the wiki content, but the desired result didn't show up.



Mediawiki 1.9.3, not production.

--Cybermandrake 14:00, 27 July 2010 (UTC)


 * I figured out my mistake: I've downloaded the description files with a PHP extension! Corrected now. --Cybermandrake 14:48, 27 July 2010 (UTC)

How to return real name of user Preference
I would like to get the realname from LDAP server instead of local user table. I had retrieve LDAP Preferences. $wgLDAPPreferences = array( "TESTAD"=>array( "email"=>"mail","realname"=>"cn","nickname"=>"sAMAccountName","language"=>"preferredLanguage") ); How to return user realname attribute in LDAP to the PageHistory?

Broken in 1.20.x
When I tried to upgrade to 1.20, the history page didn't show up at all, showing a SQL error instead:

I tweaked the wfPageHistoryRealnamesQuery function as shown below:

and the history page reappeared. I didn't stumble in any undesirable impact so far, so I share this 2¢.

--Cybermandrake (talk) 17:33, 30 January 2013 (UTC)

Fix for Mediawiki 1.19
I don't know about 1.20, but I managed to get this to work on 1.19 by changing a regular expression in PageHistoryRealnames.php

under the function wfPageHistoryRealnamesLineEnding, find the line with the regular expression (preg_match). change the regex to:

/^(.*mw\-userlink[^>]*>)([^<]*)(<\/a\b[^>]*>)(.*)$/

and then it should work.

Fix for 1.21.x
Along with User:Cybermandrake's changes noted above you must also comment out line 50 in PageHistoryRealnames.php where this extension calls for wfLoadExtensionMessages('PageHistoryRealnames');

It is reduntant in 1.21 and will throw an error.

(I wish I had the chops to update this extension. Hopefully someone more knowledgeable can step up.)