Location: PHPKode > projects > vuBB Community Forums > includes/templating.php
<?php
/**
 * vuBB
 * Copyright 2005-2006 the vuBB Group
 *
 * http://www.vubb.com/
 * http://community.vubb.com/
 */
function get_template($template_name)
{	
	global $site_config;
	
	$tn = 'templates/' . $site_config['template'] . '/' . $template_name . '.html';
	if (file_exists($tn))
	{
		$t = file_get_contents($tn);		
		return "return <<<TMP\r\n\r\n<!-- begin ".$template_name." -->\n".$t."\r\n\r\n<!-- end ".$template_name." -->\nTMP;\r\n";
	}
	
	else
	{
		error($lang['title']['error'], $lang['text']['template_not_found']);
	}
}

function template_exists($template_name)
{
	global $site_config;
	$tn = 'templates/' . $site_config['template'] . '/' . $template_name . '.html';
	
	if (file_exists($tn))
	{
		return true;
	}
	else
	{
		return false;
	}
}
?>
Return current item: vuBB Community Forums