'LBFactoryMulti', 'sectionsByDB' => array( 'enwiki' => 's1', 'metawiki' => 's1', ), 'sectionLoads' => array( 's1' => array( 'localhost' => 0, ), ), 'serverTemplate' => array( 'dbname' => $wgDBname, 'user' => $wgDBuser, 'password' => $wgDBpassword, 'type' => $wgDBtype, 'flags' => DBO_DEFAULT, 'max lag' => 30, ), ); # Site language code, should be one of the list in ./languages/data/Names.php if ( $wikiId == 'enwiki' ) { $wgLanguageCode = "en"; $wgSecretKey = "704352ff89c1d2ef72156e8da04620de85dc56d69dcfe180c82e0794df6e0e20"; $wgAuthenticationTokenVersion = "1"; $wgUpgradeKey = "ee0cdab2beb9cba5"; } else { #metawiki $wgLanguageCode = "en"; $wgSecretKey = "e905f7281e9071388db40d841133e7115820934ee602f89ba403619d4ae5ba50"; $wgAuthenticationTokenVersion = "1"; $wgUpgradeKey = "7812b3852e18f46d"; } ## Vector skin wfLoadSkin( 'Vector' ); ## CentralAuth require_once "$IP/extensions/CentralAuth/CentralAuth.php"; # General CentralAuth configuration # $wgCentralAuthAutoNew = true; $wgCentralAuthAutoMigrate = true; $wgCentralAuthCookies = true; $wgCentralAuthCookieDomain = '.localhost'; # Create the local account on pageview, set false to require a local login to create it. $wgCentralAuthCreateOnView = true; $wgCentralAuthAutoMigrateNonGlobalAccounts = true; $wgCentralAuthEnableUserMerge = true; # Skips the "login success" page # $wgCentralAuthSilentLogin = true; # Auto-login $wgCentralAuthAutoLoginWikis = [ '.localhost' => 'enwiki', ]; $wgCentralAuthLoginWiki = 'enwiki'; // You can't just set wgConf values to the globals defined in Setup.php for your // local wiki, because it hasn't run yet. You could hard-code $wgConf settings // here, but instead we set the wgConf values in a hook that runs later. $wgConf = new SiteConfiguration; # Read wiki lists $wgLocalDatabases = array( 'enwiki', 'metawiki' ); $wgConf->wikis = $wgLocalDatabases; $wgConf->suffixes = array( 'wiki' ); $wgConf->suffixes = $wgLocalDatabases; $wgConf->localVHosts = array( 'localhost' ); //your database server. could be example.com or IP address. no http:// $wgConf->settings = array( 'wgServer' => array( 'enwiki' => 'http://en.localhost', 'metawiki' => 'http://meta.localhost', ), 'wgCanonicalServer' => array( 'enwiki' => 'http://en.localhost', 'metawiki' => 'http://meta.localhost', ), 'wgScriptPath' => array( 'default' => '', ), 'wgArticlePath' => array( 'default' => '/index.php?title=$1', ), 'wgLanguageCode' => array( 'enwiki' => 'en', 'metawiki' => 'en', ), 'wgLocalInterwiki' => array( 'enwiki' => 'en', 'metawiki' => 'meta', ), 'wgAddGroups' => array( 'default' => array( 'bureaucract' => [ 'sysop', 'bureaucrat' ], ), ), ); function efGetSiteParams( $conf, $wiki ) { $site = null; $lang = null; foreach( $conf->suffixes as $suffix ) { if ( substr( $wiki, -strlen( $suffix ) ) == $suffix ) { $site = $suffix; $lang = substr( $wiki, 0, -strlen( $suffix ) ); break; } } return array( 'suffix' => $site, 'lang' => $lang, 'params' => array( 'lang' => $lang, 'site' => $site, 'wiki' => $wiki, ), 'tags' => array(), ); } $wgConf->siteParamsCallback = 'efGetSiteParams'; $wgConf->extractAllGlobals( $wgDBname );