while (preg_match('##', $tpl_main, $cur_include))
{
if (!file_exists(FORUM_ROOT.'include/user/'.$cur_include[1]))
error('Unable to process user include <!-- forum_include "'.forum_htmlencode($cur_include[1]).'" --> from template main.tpl.
There is no such file in folder /include/user/', __FILE__, __LINE__);
ob_start();
include FORUM_ROOT.'include/user/'.$cur_include[1];
$tpl_temp = ob_get_contents();
$tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main);
ob_end_clean();
}
// END SUBST -
// START SUBST -
$tpl_main = str_replace('', 'lang="'.$lang_common['lang_identifier'].'" dir="'.$lang_common['lang_direction'].'"', $tpl_main);
// END SUBST -
// START SUBST -
// Is this a page that we want search index spiders to index?
if (!defined('FORUM_ALLOW_INDEX'))
$forum_head['robots'] = '';
else
$forum_head['descriptions'] = '';
// Should we output a MicroID? http://microid.org/
if (strpos(FORUM_PAGE, 'profile') === 0)
$forum_head['microid'] = '';
$forum_head['title'] = '
'.$lang_common['Skip to content'].'
'; // Forum Title $gen_elements[''] = ''.forum_htmlencode($forum_config['o_board_title']).'
'; // Forum Description $gen_elements[''] = ($forum_config['o_board_desc'] != '') ? ''.forum_htmlencode($forum_config['o_board_desc']).'
' : ''; // Main Navigation $gen_elements[''] = ''.sprintf($lang_common['Maintenance warning'], ''.$lang_common['Maintenance mode'].'').'
' : ''; ($hook = get_hook('hd_gen_elements')) ? eval($hook) : null; $tpl_main = str_replace(array_keys($gen_elements), array_values($gen_elements), $tpl_main); unset($gen_elements); // END SUBST OF COMMON ELEMENTS // START SUBST VISIT ELEMENTS $visit_elements = array(); if ($forum_user['is_guest']) $visit_elements[''] = ''.$lang_common['Not logged in'].' '.$lang_common['Login nag'].'
'; else $visit_elements[''] = ''.sprintf($lang_common['Logged in as'], ''.forum_htmlencode($forum_user['username']).'').'
'; if ($forum_user['g_read_board'] == '1' && $forum_user['g_search'] == '1') { $visit_links = array(); if (!$forum_user['is_guest']) $visit_links['newposts'] = ''.$lang_common['New posts'].''; $visit_links['recent'] = ''.$lang_common['Active topics'].''; $visit_links['unanswered'] = ''.$lang_common['Unanswered topics'].''; } ($hook = get_hook('hd_visit_elements')) ? eval($hook) : null; $visit_elements[''] = (!empty($visit_links)) ? '' : ''; $tpl_main = str_replace(array_keys($visit_elements), array_values($visit_elements), $tpl_main); unset($visit_elements); // END SUBST VISIT ELEMENTS // START SUBST - $admod_links = array(); // We only need to run this query for mods/admins if there will actually be reports to look at if ($forum_user['is_admmod'] && $forum_config['o_report_method'] != 1) { $query = array( 'SELECT' => 'COUNT(r.id)', 'FROM' => 'reports AS r', 'WHERE' => 'r.zapped IS NULL', ); ($hook = get_hook('hd_qr_get_unread_reports_count')) ? eval($hook) : null; $result_header = $forum_db->query_build($query) or error(__FILE__, __LINE__); if ($forum_db->result($result_header)) $admod_links['reports'] = ''.$lang_common['New reports'].''; } if ($forum_user['g_id'] == FORUM_ADMIN) { $alert_items = array(); // Warn the admin that maintenance mode is enabled if ($forum_config['o_maintenance'] == '1') $alert_items['maintenance'] = ''.$lang_common['Maintenance alert'].'
'; if ($forum_config['o_check_for_updates'] == '1') { if ($forum_updates['fail']) $alert_items['update_fail'] = ''.$lang_common['Updates'].' '.$lang_common['Updates failed'].'
'; else if (isset($forum_updates['version']) && isset($forum_updates['hotfix'])) $alert_items['update_version_hotfix'] = ''.$lang_common['Updates'].' '.sprintf($lang_common['Updates version n hf'], $forum_updates['version'], forum_link($forum_url['admin_extensions_hotfixes'])).'
'; else if (isset($forum_updates['version'])) $alert_items['update_version'] = ''.$lang_common['Updates'].' '.sprintf($lang_common['Updates version'], $forum_updates['version']).'
'; else if (isset($forum_updates['hotfix'])) $alert_items['update_hotfix'] = ''.$lang_common['Updates'].' '.sprintf($lang_common['Updates hf'], forum_link($forum_url['admin_extensions_hotfixes'])).'
'; } // Warn the admin that their version of the database is newer than the version supported by the code // NOTE: Why is it done on any page, but shown in admin section only. if ($forum_config['o_database_revision'] > FORUM_DB_REVISION) $alert_items['newer_database'] = ''.$lang_common['Database mismatch'].' '.$lang_common['Database mismatch alert'].'
'; if (!empty($alert_items)) $admod_links['alert'] = ''.$lang_common['New alerts'].''; ($hook = get_hook('hd_alert')) ? eval($hook) : null; } $tpl_main = str_replace('', (!empty($admod_links)) ? ''.implode(' ', $admod_links).'
' : '', $tpl_main); // END SUBST - // MAIN SECTION INTERFACE ELEMENT SUBSTITUTION $main_elements = array(); // Top breadcrumbs $main_elements[''] = (FORUM_PAGE != 'index') ? ''.generate_crumbs(false).'
'."\n".''.generate_crumbs(false).'
'."\n".'