Jump to content

Topic on User talk:IAlex

Configure $wgConfigureAdditionalExtensions

3
Ofbeaton (talkcontribs)

I'm a newbie extension author here... am I to understand that without changing any files in Configure I can add Configure support for my extension using $wgConfigureAdditionalExtensions? Is this the prefered way to do it? Where should I be putting this in my extension.php file? In the constructor for my extension class? Will you load it, otherwise how would it ever get called? Am I forced to use a init function instead?

This post was posted by Ofbeaton, but signed as Quadir.

IAlex (talkcontribs)

The first part is correct. You need to define your extension in $wgConfigureAdditionalExtensions after including the Configure extension itself but before calling efConfigureSetup() since the inclusion of the extensions sets that variable to an empty array (to prevent register globals vulnerability) and it will be used in efConfigureSetup(). The best way to do this is to put it directly in LocalSettings.php between the two statements described just above.

Ofbeaton (talkcontribs)

Thanks, that did the trick. I should of been able to figure that out >< More importantly I've put this information in my FAQ for my extension so others will hopefully run into it. Thanks for the extension!

This post was posted by Ofbeaton, but signed as Quadir.

Reply to "Configure $wgConfigureAdditionalExtensions"