Location: PHPKode > projects > Content*Builder > contentbuilder/plugins/forum/forum.inc.php
<?php
	include($pluginLocation.'/plugin.config');
	require_once($cbDirLib."CB_NestedSet.class.php");

	if(file_exists($lang_path.$lang_pf."/plugin/forum.lang.php")) {
		include($lang_path.$lang_pf."/plugin/forum.lang.php");
	} else {
		include($lang_path."en/plugin/forum.lang.php");
	}
	
	$tpl->assign( "SUB", $sub);
	$tpl->assign( "forumMessages", $forumText);
	
	/*
	* Category Options Konstanten
	*/
	define("FORUM_CATEGORY_WRITEABLE", 1 << 0);

	/* Ableitung des Newsletter Option Objektes */
	$forumOption = new CBOption();
	$forumOption->setModule("forum");
	$forumOption->getOptionList();

	$categoryParams = array (
		'table'  => TABLE.'_forum_category',
		'id'     => 'categoryID',
		'parent' => 'parentID',
		'root'   => 'rootID',
		'l'      => 'leftID',
		'r'      => 'rightID',
		'level'  => 'level',
		'norder' => 'order_num'
	);
	
	$categoryAdditional = array (
		'name'        => 'name',
		'description' => 'description',
		'datetime'    => 'datetime',
		'options'     => 'options'
	);
		
	/* 
	* Initialisierung der NeSet Array's für das 
	* Message Nested Set Objekt 
	*/
	$messageParams = array (
		'table'  => TABLE.'_forum_message',
		'id'     => 'messageID',
		'parent' => 'parentID',
		'root'   => 'rootID',
		'l'      => 'leftID',
		'r'      => 'rightID',
		'level'  => 'level',
		'norder' => 'order_num'
	);
	
	$messageAdditional = array (
		'title'      => 'title',
		'message'    => 'message',
		'original'   => 'originalMessage',
		'userID'     => 'userID',
		'insertDate' => 'insertDate',
		'editDate'   => 'editDate'
	);
		
	$nestedSet_message = CB_NestedSet::factory($messageParams, $messageAdditional);

	$nestedSet_category = CB_NestedSet::factory($categoryParams, $categoryAdditional);
	
	$menuSubNav[] = "";
	$menuEntry[]  = $forumText["overview"];
	$menuPrefix[] = '<img src="'.$cbDirGfx.'moarrow.gif" width="8" align="middle" height="11" border="0" alt="arrow">&nbsp;';
	
	$menuSubNav[] = "&sub=setting";
	$menuEntry[]  = $forumText["settings"];
	$menuPrefix[] = '&nbsp;|&nbsp;';
	
	switch($sub) {
		case "setting":
			include($pluginLocation."/settings.inc.php");
			break;
		
		default:
			include($pluginLocation."/categoryOverview.inc.php");
			break;
	}

	$tpl->assign("plugin_name", $lang_plugin_plugin['forum']);
	
	$tpl->assign("plugin_menu_data",
		array ( "PRE"       => $menuPrefix,
				"SUBNAV"    => $menuSubNav,
				"MENUENTRY" => $menuEntry
		)
	);
	
	$tpl->assign("pluginContent", $mainPluginContent);
	$tpl->assign("messageContent", $mainMessageContent);
	$tpl->display($config['templates']."plugin.template");
	
?>
Return current item: Content*Builder