0) && (substr($template_dir, 0, strlen($phpbb_root_path)) !== $phpbb_root_path))
{
$template_dir = $phpbb_root_path . $template_dir;
}
$tpl_hdr1 = '
| ';
$tpl_hdr2 = ' | |
';
$tpl_ftr = '';
$tpl_ftr2 = '';
$tpl_hdr_small1 = ' | ';
$tpl_hdr_small2 = ' | |
';
//
// adding custom template variables
//
$template->assign_vars(array(
'T_TEMPLATE_PATH' => $template_dir,
'C_VERSION' => '1.4',
'TPL_FORUM_URL' => urlencode($board_config['server_name'] . $board_config['script_path']),
'TPL_COLOR' => $color,
// headers 1
'TPL_HDR1' => str_replace('{IMG}', 'house', $tpl_hdr1),
'TPL_HDR1_NEW' => str_replace('{IMG}', 'new', $tpl_hdr1),
'TPL_HDR1_POST' => str_replace('{IMG}', 'post', $tpl_hdr1),
'TPL_HDR1_BLUE' => str_replace('{IMG}', 'blue', $tpl_hdr1),
'TPL_HDR1_ORANGE' => str_replace('{IMG}', 'orange', $tpl_hdr1),
// headers 2
'TPL_HDR2' => str_replace('{IMG}', 'blue', $tpl_hdr2),
'TPL_HDR2_NEW' => str_replace('{IMG}', 'orange', $tpl_hdr2),
// headers for portal
'TPL_HDR1_SMALL' => $tpl_hdr_small1,
'TPL_HDR2_SMALL' => $tpl_hdr_small2,
// footer
'TPL_FTR' => $tpl_ftr,
'TPL_FTR2' => $tpl_ftr2,
// private messages
'C_PM' => $userdata['session_logged_in'] && $userdata['user_new_privmsg'] ? ' (' . $userdata['user_new_privmsg'] . ')' : '',
// login form
'S_LOGIN_ACTION2' => htmlspecialchars(append_sid('login.'.$phpEx)),
'S_LOGIN_ACTION3' => urlencode('login.'.$phpEx.'?sid='.$userdata['session_id']),
'S_SID' => $userdata['session_id'],
// strings
'CA_L_NO_MSG' => $lang['No_new_pm'],
'CA_L_ANNOUNCE' => $lang['Topic_Announcement'] . ' ',
'CA_L_STICKY' => $lang['Topic_Sticky'] . ' ',
// search forms
'CA_SEARCH_INDEX' => append_sid('search.php?mode=results'),
'CA_SEARCH_FORUM' => isset($forum_id) ? $forum_id : '0',
// quick reply
'CA_QR_BUTTON' => $lang['Post_a_reply'],
));
if(defined('IN_ADMIN') && (empty($HTTP_GET_VARS['pane']) || $HTTP_GET_VARS['pane'] !== 'left' ))
{
$template->assign_block_vars('ca_admin', array());
}
else
{
$template->assign_block_vars('ca_noadmin', array());
}
if ( $userdata['session_logged_in'] )
{
$template->assign_vars(array(
'CA_L_LOGIN_LOGOUT' => $lang['Logout'] . ' (' . $userdata['username'] . ')',
'CA_NEW_MSGS' => $userdata['user_new_privmsg'],
));
if($userdata['user_new_privmsg'])
{
$template->assign_block_vars('ca_new_privmsgs', array(
'TEXT' => sprintf($userdata['user_new_privmsg'] > 1 ? $lang['New_pms'] : $lang['New_pm'], $userdata['user_new_privmsg'])
));
}
}
else
{
$template->assign_vars(array(
'CA_L_LOGIN_LOGOUT' => $lang['Login'],
));
}
// check xs mod
if(!empty($template->xs_version))
{
$template->assign_vars(array(
'CA_XS_COMMENT_START' => '',
'CA_XS_COMMENT_JS_START' => ' /* ',
'CA_XS_COMMENT_JS_END' => ' */ ',
));
}
// check 2.0.11
global $lang, $board_config, $template;
if(defined('IN_ADMIN') && isset($lang['Visual_confirm']))
{
$version = explode('.', $board_config['version']);
if(isset($version[2]) && intval($version[2]) > 10)
{
$template->assign_block_vars('admin_visual_confirm', array());
}
}
$images['icon_quote'] = "$current_template_images/{LANG}/$color/icon_quote.gif";
$images['icon_edit'] = "$current_template_images/{LANG}/icon_edit.gif";
$images['icon_search'] = "$current_template_images/{LANG}/icon_search.gif";
$images['icon_profile'] = "$current_template_images/{LANG}/icon_profile.gif";
$images['icon_pm'] = "$current_template_images/{LANG}/icon_pm.gif";
$images['icon_email'] = "$current_template_images/{LANG}/icon_email.gif";
$images['icon_delpost'] = "$current_template_images/{LANG}/icon_delete.gif";
$images['icon_ip'] = "$current_template_images/{LANG}/icon_ip.gif";
$images['icon_www'] = "$current_template_images/{LANG}/icon_www.gif";
$images['icon_icq'] = "$current_template_images/{LANG}/icon_icq.gif";
$images['icon_aim'] = "$current_template_images/{LANG}/icon_aim.gif";
$images['icon_yim'] = "$current_template_images/{LANG}/icon_yim.gif";
$images['icon_msnm'] = "$current_template_images/{LANG}/icon_msn.gif";
$images['icon_minipost'] = "$current_template_images/$color/icon_minipost.gif";
$images['icon_gotopost'] = "$current_template_images/$color/icon_minipost.gif";
$images['icon_minipost_new'] = "$current_template_images/$color/icon_minipost_new.gif";
$images['icon_latest_reply'] = "$current_template_images/$color/icon_latest_reply.gif";
$images['icon_newest_reply'] = "$current_template_images/$color/icon_newest_reply.gif";
$images['forum'] = "$current_template_images/folder_big.gif";
$images['forum_new'] = "$current_template_images/folder_new_big.gif";
$images['forum_locked'] = "$current_template_images/$color/folder_locked_big.gif";
$images['folder'] = "$current_template_images/folder.gif";
$images['folder_new'] = "$current_template_images/folder_new.gif";
$images['folder_hot'] = "$current_template_images/folder_hot.gif";
$images['folder_hot_new'] = "$current_template_images/folder_new_hot.gif";
$images['folder_locked'] = "$current_template_images/$color/folder_lock.gif";
$images['folder_locked_new'] = "$current_template_images/folder_lock_new.gif";
$images['folder_sticky'] = "$current_template_images/$color/folder_sticky.gif";
$images['folder_sticky_new'] = "$current_template_images/folder_sticky_new.gif";
$images['folder_announce'] = "$current_template_images/$color/folder_announce.gif";
$images['folder_announce_new'] = "$current_template_images/folder_announce_new.gif";
$images['post_new'] = "$current_template_images/{LANG}/$color/post.gif";
$images['post_locked'] = "$current_template_images/{LANG}/$color/reply-locked.gif";
$images['reply_new'] = "$current_template_images/{LANG}/$color/reply.gif";
$images['reply_locked'] = "$current_template_images/{LANG}/$color/reply-locked.gif";
$images['pm_inbox'] = "$current_template_images/spacer.gif";
$images['pm_outbox'] = "$current_template_images/spacer.gif";
$images['pm_savebox'] = "$current_template_images/spacer.gif";
$images['pm_sentbox'] = "$current_template_images/spacer.gif";
$images['pm_readmsg'] = "$current_template_images/folder.gif";
$images['pm_unreadmsg'] = "$current_template_images/folder_new.gif";
$images['pm_replymsg'] = "$current_template_images/{LANG}/$color/reply.gif";
$images['pm_postmsg'] = "$current_template_images/{LANG}/$color/msg_newpost.gif";
$images['pm_quotemsg'] = "$current_template_images/{LANG}/$color/icon_quote.gif";
$images['pm_editmsg'] = "$current_template_images/{LANG}/icon_edit.gif";
$images['pm_new_msg'] = "pm_new";
$images['pm_no_new_msg'] = "pm";
$images['topic_watch'] = "";
$images['topic_un_watch'] = "";
$images['topic_mod_lock'] = "$current_template_images/{LANG}/$color/topic_lock.gif";
$images['topic_mod_unlock'] = "$current_template_images/{LANG}/$color/topic_unlock.gif";
$images['topic_mod_split'] = "$current_template_images/{LANG}/$color/topic_split.gif";
$images['topic_mod_move'] = "$current_template_images/{LANG}/$color/topic_move.gif";
$images['topic_mod_delete'] = "$current_template_images/{LANG}/$color/topic_delete.gif";
$images['voting_graphic'][0] = "$current_template_images/$color/voting_bar.gif";
$images['voting_graphic'][1] = "$current_template_images/$color/voting_bar.gif";
$images['voting_graphic'][2] = "$current_template_images/$color/voting_bar.gif";
$images['voting_graphic'][3] = "$current_template_images/$color/voting_bar.gif";
$images['voting_graphic'][4] = "$current_template_images/$color/voting_bar.gif";
//
// Vote graphic length defines the maximum length of a vote result
// graphic, ie. 100% = this length
//
$board_config['vote_graphic_length'] = 300;
$board_config['privmsg_graphic_length'] = 175;
?>