Manual talk:$wgConf

Error
The url for noc.wikimedia.org/conf show a 404 error. Sir Lestaty discuţie 05:23, 6 December 2009 (UTC)
 * Known issue. Max Semenik 07:12, 6 December 2009 (UTC)
 * =D Thanks Max Sir Lestaty discuţie 08:04, 6 December 2009 (UTC)

Tutorial
The explanation on this page about how wgConf needs to be setup is very limited. Since the most common use of wgConf is with CentralAuth, I've been writing a tutorial about how to setup a wiki farm with CentralAuth and everything. I'm not sure how to setup wgConf probably myself, so please help me complete User:Huji/Wikimedia clone. Thanks! Huji (talk) 14:11, 27 August 2012 (UTC)

Variables replacement
(possibly I did something wrong...) 2 variable replacements seem to work : However it seems it's not possible to use variables (previously !) defined within the $wgConf->settings array, like : 'wgScriptPath' => // array('default'=>'/mediawiki', ), 'wgScript' => // array('default'=>'$wgScriptPath/index.php', ), will leave $wgScript unreplaced. My solution was to add a postprocessing step : $globals = $wgConf->getAll($wgConfWikiName,null,$wgConfParams,$wgConfTags); // replace variables used in strings foreach( $globals as $varname => $stuff ) { if(is_string($stuff)) { preg_match_all('/\$\w\w+/', $stuff, $arr); foreach($arr[0] as $val) { if(isset($val)){ $stuff = str_replace( $val,${ substr($val,1) },$stuff ); } 		} 		$globals[$varname]=$stuff; } 	//define variable so that following variables can reference it 	$GLOBALS[$varname]=$stuff; } (the \w\w+ hack is in order no to match the $1 variable used eg in $wgArticlePath='/$1')
 * internally defined variables like $lang, $wiki
 * variables provided through $params parameter

--Jhf2442 (talk) 10:14, 13 September 2013 (UTC)