Location: PHPKode > projects > Content*Builder > modules/forum/messagePost.inc.php
<?php

/*
* messagePost.inc.php
*
* @version $Id: messagePost.inc.php,v 1.1 2004/05/07 09:14:12 cb_fog Exp $
* @copyright 2003 
*/
if(!empty($_SESSION[community_uid])) {
	require_once($path['cb'].$cbDirLib.'CB_media.class.php');
	$myMedia  = new MediaManagement();
	$myMedia->setOptionObject($cbOption);
	$myMedia->setBranchID($cbOption->getSingleOption("rpBranch"));
	$mediaDirectory = $myMedia->getBranchDirectory();
	
	$replacePath = $path['cb'].$myMedia->uploadDir.$mediaDirectory.'/';
	if($rpQuery) {
		while($rpRow = mysql_fetch_object($rpQuery)) {
			if(is_file($replacePath.$rpRow->replacewith)) {
				$iconName[] = $rpRow->replacewith;
				$iconText[] = $rpRow->replacetext;
			}
		}
	}
	
	$_allowBBCode = 0;
	if($forum_option->getSingleOption("isAllowedBBCode")) {
		$_allowBBCode = 1;
	}
	
	$_allowHTML = 0;
	if($forum_option->getSingleOption("isAllowedHTML")) {
		$_allowHTML = 1;
	}
	
	$messageOptions = array (
		"allowBBCode" => $_allowBBCode,
		"allowHTML"   => $_allowHTML
	);
	$tpl->assign("messagePostOptions", $messageOptions);
	
	$messagePostIcons = array ( 
		"ICONPATH" => $replacePath,
		"ICONTEXT" => $iconText,
		"ICONNAME" => $iconName
	);
	$tpl->assign("messagePostIcons", $messagePostIcons);
	$forum_content[] = $tpl->fetch("messagePost.template");
} else {
	$forum_content[] = "not permitted for unregistered Users.";
}

?>
Return current item: Content*Builder