weet iemand een antwoord voor de vorige error?
want ik heb nog een kleine error
als ik een topic post
zie ik dat topic neit
dan krijg ik in dat betreffende forum deze error:
Code: Selecteer alles
Parse error: syntax error, unexpected '}' in /usr/local/www/htdocs/huisdier/forum/includes/class_template.php(233) : eval()'d code on line 64
hieronder post ik class_template.php vanaf regel 60 tot 240
Code: Selecteer alles
// set the cache path
$this->cache_path = $config->data['cache_path'];
$this->template_path = empty($template_path) ? 'templates/' : $template_path;
$this->set($root, $alt_template_name);
$this->no_debug = false;
$this->_id = 0;
}
function set($root, $alt_template_name='')
{
global $config;
$this->root_template = $config->root . $this->template_path;
// get main template settings
$this->template_name = str_replace('//', '/', str_replace('./', '', substr($root, strlen($this->root_template))) . '/');
$this->root = $this->root_template . $this->template_name;
$this->cacheprefix = $config->root . $this->cache_path . 'tpl_' . str_replace('/', '_', $this->template_name);
// get custom tpls settings
$this->alt_template_name = $this->alt_root = $this->alt_prefix = '';
if ( $alt_template_name && ($this->alt_template_name = $this->tpl_realpath($alt_template_name)) )
{
$this->alt_root = $this->root_template . $this->alt_template_name;
$this->alt_cacheprefix = $config->root . $this->cache_path . 'tpl_' . str_replace('/', '_', $this->alt_template_name);
}
// raz
$this->_tpldata = $this->local_images = array();
}
function tpl_realpath($tpl_name)
{
global $config;
if ( !empty($tpl_name) )
{
$real_path = phpbb_realpath($this->root);
if ( $real_path != $this->root)
{
$tpl_real_path = phpbb_realpath($this->root . $tpl_name);
if ( empty($tpl_real_path) )
{
$tpl_name = '';
}
else
{
$root_real_path = phpbb_realpath($this->root_template);
$tpl_name = str_replace('//', '/', str_replace('\\', '/', substr($tpl_real_path, strlen($root_real_path)+1)) . '/');
}
}
// realpath fails to get the real path sometime (when not available), so find another way
else
{
$res = $this->template_name;
if ( substr($tpl_name, 0, 2) == './' )
{
$tpl_name = substr($tpl_name, 2);
}
if ( substr($tpl_name, 0, 3) == '../' )
{
$res = '';
$tpl_name = substr($tpl_name, 3);
}
if ( preg_match('/\.\.\//', $tpl_name) )
{
$tpl_name = '';
}
else
{
$tpl_name = str_replace('//', '/', str_replace('./', '', $res . $tpl_name) . '/');
}
}
}
return $tpl_name;
}
function set_switch($switch_name, $on=true, $onset=true)
{
if ( $onset )
{
$this->assign_block_vars($switch_name . ($on ? '' : '_ELSE'), array());
}
}
function save(&$save)
{
$save = $this->_tpldata;
}
function destroy()
{
$this->_tpldata = array();
}
function restore(&$save)
{
$this->_tpldata = $save;
}
function get_pparse($handle)
{
ob_start();
$this->pparse($handle);
$res = ob_get_contents();
ob_end_clean();
return $res;
}
// Sets the template filenames for handles. $filename_array
// should be a hash of handle => filename pairs.
function set_filenames($filename_array)
{
if ( !is_array($filename_array) )
{
return false;
}
$template_names = '';
foreach ($filename_array as $handle => $filename)
{
if ( empty($filename) )
{
message_die(GENERAL_ERROR, 'template error - Empty filename specified for ' . $handle, '', __LINE__, __FILE__);
}
$this->filename[$handle] = $filename;
if ( !empty($this->alt_root) )
{
$this->files[$handle] = $this->alt_root . $filename;
}
// doesn't exists : try the main
if ( !$this->mains[$handle] = (!empty($this->alt_root) && file_exists($this->files[$handle])) )
{
$this->files[$handle] = $this->root . $filename;
$this->mains[$handle] = false;
}
}
return true;
}
function make_filename($filename)
{
return !empty($this->alt_root) && file_exists($this->alt_root . $filename) ? $this->alt_root . $filename : (file_exists($this->root . $filename) ? $this->root . $filename : '');
}
// Methods for loading and evaluating the templates
function pparse($handle)
{
global $user, $images;
$d = &$this->_tpldata;
if ( is_object($user) && !$user->style_set )
{
$user->set_style();
}
$this->no_debug = $this->no_debug || !is_object($user) || ($user->data['user_level'] != ADMIN);
if ( defined('DEBUG_TEMPLATE') && !$this->no_debug )
{
echo '<!-- Start of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . "\n";
}
if ($filename = $this->_tpl_load($handle))
{
include($filename);
}
else
{
eval(' ?>' . $this->compiled_code[$handle] . '<?php ');
}
if ( defined('DEBUG_TEMPLATE') && !$this->no_debug )
{
echo '<!-- End of : ' . $this->files[$handle] . ' :: ' . $handle . ' -->' . "\n";
}
return true;
grtz
TWE