Topic on Extension talk:GlobalUsage

easier way for $wgGlobalUsageDatabase

2
Cboltz (talkcontribs)

There is an easier way than setting $wgGlobalUsageDatabase using Manual:$wgLBFactoryConf: using $wgSharedDB and $wgSharedTables :-)

Add the following to LocalSettings.php in all your wikis:

(I'm assuming you have "images-wiki" as your shared images wiki)

if ( $wgDBname != "images-wiki" ) {
   $wgSharedDB         = "images-wiki";
   $wgSharedTables[] = 'globalimagelinks';
}
require_once("$IP/extensions/GlobalUsage/GlobalUsage.php");
if ( $wgDBname == "images-wiki" ) {
   $wgGlobalUsageDatabase = 'images-wiki'; # workaround to enforce displaying the "global usage" section
}

(Note: $wgSharedTables defaults to ('user', 'user_properties') - remove them if you want)

HTH ;-)

Till Kraemer (talkcontribs)

That was pretty helpful, thanks a lot!

Cheers,

Reply to "easier way for $wgGlobalUsageDatabase"