0) && (substr($template_dir, 0, strlen($phpbb_root_path)) !== $phpbb_root_path))
{
$template_dir = $phpbb_root_path . $template_dir;
}
//
// testing if image exists
//
$test_file = $template_dir . '/images/lang_{LANG}/btn_login.gif';
$lang = 'english';
if(@file_exists(str_replace('{LANG}', $board_config['default_lang'], $test_file)))
{
// image exists, setting language variable to correct url
$lang = $board_config['default_lang'];
}
elseif($board_config['default_lang'] !== 'english')
{
// image doesn't exist, testing if there is english version
if(!@file_exists(str_replace('{LANG}', 'english', $test_file)))
{
// nothing found. setting to default language
$lang = $board_config['default_lang'];
}
}
//
// adding custom template variables
//
$template->assign_vars(array(
'LANG' => $lang,
'T_TEMPLATE_PATH' => $template_dir,
'C_ROW1' => '#EDEFF2',
'C_ROW1_OVER' => '#F8F9FA',
'C_ROW2' => '#DDE2EC',
'C_ROW2_OVER' => '#EBEEF3',
'C_ROW3' => '#E2E6EE',
'C_ROW3_OVER' => '#ECEFF4',
'C_VERSION' => '1.91',
'TPL_FORUM_URL' => urlencode($board_config['server_name'] . $board_config['script_path']),
'TPL_HDR1' => '
| ',
'TPL_HDR2' => ' | |
',
'TPL_FTR' => ''
));
$images['icon_quote'] = "$current_template_images/{LANG}/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/icon_delete.gif";
$images['icon_ip'] = "$current_template_images/icon_ip.gif";
$images['icon_www'] = "$current_template_images/{LANG}/icon_www.gif";
$images['icon_icq'] = "$current_template_images/icon_icq_add.gif";
$images['icon_aim'] = "$current_template_images/icon_aim.gif";
$images['icon_yim'] = "$current_template_images/icon_yim.gif";
$images['icon_msnm'] = "$current_template_images/icon_msnm.gif";
$images['icon_minipost'] = "$current_template_images/icon_minipost.gif";
$images['icon_gotopost'] = "$current_template_images/icon_minipost.gif";
$images['icon_minipost_new'] = "$current_template_images/icon_minipost_new.gif";
$images['icon_latest_reply'] = "$current_template_images/icon_latest_reply.gif";
$images['icon_newest_reply'] = "$current_template_images/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/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/folder_lock.gif";
$images['folder_locked_new'] = "$current_template_images/folder_lock_new.gif";
$images['folder_sticky'] = "$current_template_images/folder_sticky.gif";
$images['folder_sticky_new'] = "$current_template_images/folder_sticky_new.gif";
$images['folder_announce'] = "$current_template_images/folder_announce.gif";
$images['folder_announce_new'] = "$current_template_images/folder_announce_new.gif";
$images['post_new'] = "$current_template_images/{LANG}/post.gif";
$images['post_locked'] = "$current_template_images/{LANG}/reply-locked.gif";
$images['reply_new'] = "$current_template_images/{LANG}/reply.gif";
$images['reply_locked'] = "$current_template_images/{LANG}/reply-locked.gif";
$images['pm_inbox'] = "$current_template_images/msg_inbox.gif";
$images['pm_outbox'] = "$current_template_images/msg_outbox.gif";
$images['pm_savebox'] = "$current_template_images/msg_savebox.gif";
$images['pm_sentbox'] = "$current_template_images/msg_sentbox.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}/reply.gif";
$images['pm_postmsg'] = "$current_template_images/{LANG}/msg_newpost.gif";
$images['pm_quotemsg'] = "$current_template_images/{LANG}/icon_quote.gif";
$images['pm_editmsg'] = "$current_template_images/{LANG}/icon_edit.gif";
$images['pm_new_msg'] = "";
$images['pm_no_new_msg'] = "";
$images['topic_watch'] = "";
$images['topic_un_watch'] = "";
$images['topic_mod_lock'] = "$current_template_images/topic_lock.gif";
$images['topic_mod_unlock'] = "$current_template_images/topic_unlock.gif";
$images['topic_mod_split'] = "$current_template_images/topic_split.gif";
$images['topic_mod_move'] = "$current_template_images/topic_move.gif";
$images['topic_mod_delete'] = "$current_template_images/topic_delete.gif";
$images['voting_graphic'][0] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][1] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][2] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][3] = "$current_template_images/voting_bar.gif";
$images['voting_graphic'][4] = "$current_template_images/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;
?>