On Wed, Aug 11, 2010 at 12:13 AM, Andrew Caul reachouttothetruth@hotmail.com wrote:
Daniel Barrett wrote:
In 1.16, custom preferences added by third-party extensions aren't getting displayed on our wiki. They all use the "UserToggles" hook and a function like this:
function wfToggle($extraToggles) { global $wgMessageCache; $extraToggles[] = 'foo'; $wgMessageCache->addMessage('tog-foo', 'my checkbox text'); return true; }
They used to show up under the Misc tab, but now they don't. Is this no longer the way to add toggles? http://www.mediawiki.org/wiki/Manual:Hooks/UserToggles says nothing about it.
Thanks, DanB
The problem is $wgMessageCache->addMessage(). That method is deprecated, and although it still exists it no longer seems to work.
The problem has nothing to do with $wgMessageCache. The only error he'd get there (presumably) is message keys showing up like <my-pref-toggle>.
The real failure is because preferences were rewritten entirely in 1.16.x and I don't believe back-compat was maintained for the old hooks.
Take a look at the GetPreferences hook[0] for more info.
-Chad
[0] http://www.mediawiki.org/wiki/Manual:Hooks/GetPreferences