Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/myCB/myCB.inc.php
<?php
	$myCBPluginPath = $pluginLocation."plugins/";
	$myCBPluginDir  = dir($myCBPluginPath);
	while($myCBpluginConfEntry = $myCBPluginDir->read()) {
		if(is_file($myCBPluginPath.$myCBpluginConfEntry) && preg_match("/^myCBConf\.([a-zA-Z0-9]*)\.php$/i", $myCBpluginConfEntry)) {
			include_once($myCBPluginPath.$myCBpluginConfEntry);
		}
	}
	
	/*
	* Sortierung der Plugins
	*/
	foreach($myCBConf as $k => $v) {
		if($v['order'] == "") {
			$v['order'] = "zzz";
		}
		$_tempConfArr[$v['order']][$k] = $v;
	}
	ksort($_tempConfArr);
	
	/*
	* Neuschreiben des $myCBConf Arrays
	*/
	unset($myCBConf);
	foreach($_tempConfArr as $value) {
		foreach($value as $k => $v) {
			$myCBConf[$k] = $v;
		}
	}
	
	/*
	* Plugins auf eines bestimmten Eintrag setzen
	*/
	if($_GET['switchPlugin'] != "" && is_array($myCBConf[$_GET['switchPlugin']])) {
		$_SESSION['myCBViewPlugin'] = $_GET['switchPlugin'];
	}
	
	/*
	* Default Wert in Session setzen
	*/
	if($_SESSION['myCBViewPlugin'] == "") {
		$_SESSION['myCBViewPlugin'] = "default";
	}
	
	/*
	* Im Plugin Array Flag setzen, welches Plugin gewählt ist
	*/
	$myCBConf[$_SESSION['myCBViewPlugin']]['activated'] = 1;
	
	$actualMyCBPlugin = $_SESSION['myCBViewPlugin'];
	require_once($myCBPluginPath.$myCBConf[$actualMyCBPlugin]['file']);
	
	$tpl->assign("myCBPluginList", $myCBConf);
	$tpl->assign("pluginContent",  $myCBContent);
	$tpl->display($config['templates']."plugin.template");
?>
Return current item: Content*Builder