Ejemplo n.º 1
0
        if ($user->data['user_unread_privmsg'] && $user->data['user_unread_privmsg'] != $user->data['user_new_privmsg']) {
            $l_message_unread = $user->data['user_unread_privmsg'] == 1 ? $user->lang['UNREAD_PM'] : $user->lang['UNREAD_PMS'];
            $l_privmsgs_text_unread = sprintf($l_message_unread, $user->data['user_unread_privmsg']);
        }
    }
    $forum_id = request_var('f', 0);
    $topic_id = request_var('t', 0);
    $s_feed_news = false;
    // Get option for news
    if ($config['feed_enable']) {
        $sql = 'SELECT forum_id
			FROM ' . FORUMS_TABLE . '
			WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_NEWS, '<> 0');
        $result = $db->sql_query_limit($sql, 1, 0, $block_cache_time);
        $s_feed_news = (int) $db->sql_fetchfield('forum_id');
        $db->sql_freeresult($result);
    }
    // Determine board url - we may need it later
    $board_url = generate_board_url() . '/';
    $web_path = defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH ? $board_url : $phpbb_root_path;
    // Which timezone?
    $tz = $user->data['user_id'] != ANONYMOUS ? strval(doubleval($user->data['user_timezone'])) : strval(doubleval($config['board_timezone']));
    // Send a proper content-language to the output
    $user_lang = $user->lang['USER_LANG'];
    if (strpos($user_lang, '-x-') !== false) {
        $user_lang = substr($user_lang, 0, strpos($user_lang, '-x-'));
    }
    // The following assigns all _common_ variables that may be used at any point in a template.
    $template->assign_vars(array('SITENAME' => $config['sitename'], 'SITE_DESCRIPTION' => $config['site_desc'], 'STARGATE_VERSION' => isset($config['portal_version']) ? $config['portal_version'] : '', 'SCRIPT_NAME' => str_replace('.' . $phpEx, '', $user->page['page_name']), 'LAST_VISIT_DATE' => sprintf($user->lang['YOU_LAST_VISIT'], $s_last_visit), 'LAST_VISIT_YOU' => $s_last_visit, 'CURRENT_TIME' => sprintf($user->lang['CURRENT_TIME'], $user->format_date(time(), false, true)), 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, 'RECORD_USERS' => $l_online_record, 'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text, 'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread, 'S_USER_NEW_PRIVMSG' => $user->data['user_new_privmsg'], 'S_USER_UNREAD_PRIVMSG' => $user->data['user_unread_privmsg'], 'S_USER_NEW' => $user->data['user_new'], 'SID' => $SID, '_SID' => $_SID, 'SESSION_ID' => $user->session_id, 'ROOT_PATH' => $phpbb_root_path, 'BOARD_URL' => $board_url, 'L_LOGIN_LOGOUT' => $l_login_logout, 'L_INDEX' => $user->lang['FORUM_INDEX'], 'L_ONLINE_EXPLAIN' => $l_online_time, 'U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;folder=inbox'), 'U_RETURN_INBOX' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;folder=inbox'), 'U_POPUP_PM' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;mode=popup'), 'UA_POPUP_PM' => addslashes(append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=pm&amp;mode=popup')), 'U_MEMBERLIST' => append_sid("{$phpbb_root_path}memberlist.{$phpEx}"), 'U_VIEWONLINE' => $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel') ? append_sid("{$phpbb_root_path}viewonline.{$phpEx}") : '', 'U_LOGIN_LOGOUT' => $u_login_logout, 'U_INDEX' => append_sid("{$phpbb_root_path}index.{$phpEx}"), 'U_SEARCH' => append_sid("{$phpbb_root_path}search.{$phpEx}"), 'U_REGISTER' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=register'), 'U_PROFILE' => append_sid("{$phpbb_root_path}ucp.{$phpEx}"), 'U_MODCP' => append_sid("{$phpbb_root_path}mcp.{$phpEx}", false, true, $user->session_id), 'U_FAQ' => append_sid("{$phpbb_root_path}faq.{$phpEx}"), 'U_SEARCH_SELF' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=egosearch'), 'U_SEARCH_NEW' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=newposts'), 'U_SEARCH_UNANSWERED' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=unanswered'), 'U_SEARCH_UNREAD' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=unreadposts'), 'U_SEARCH_ACTIVE_TOPICS' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'search_id=active_topics'), 'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=delete_cookies'), 'U_TEAM' => $user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile') ? '' : append_sid("{$phpbb_root_path}memberlist.{$phpEx}", 'mode=leaders'), 'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=terms'), 'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=privacy'), 'U_RESTORE_PERMISSIONS' => $user->data['user_perm_from'] && $auth->acl_get('a_switchperm') ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=restore_perm') : '', 'U_FEED' => generate_board_url() . "/feed.{$phpEx}", 'S_USER_LOGGED_IN' => $user->data['user_id'] != ANONYMOUS ? true : false, 'S_AUTOLOGIN_ENABLED' => $config['allow_autologin'] ? true : false, 'S_BOARD_DISABLED' => $config['board_disable'] ? true : false, 'S_REGISTERED_USER' => !empty($user->data['is_registered']) ? true : false, 'S_IS_BOT' => !empty($user->data['is_bot']) ? true : false, 'S_USER_PM_POPUP' => $user->optionget('popuppm'), 'S_USER_LANG' => $user_lang, 'S_USER_BROWSER' => isset($user->data['session_browser']) ? $user->data['session_browser'] : $user->lang['UNKNOWN_BROWSER'], 'S_USERNAME' => $user->data['username'], 'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'], 'S_CONTENT_FLOW_BEGIN' => $user->lang['DIRECTION'] == 'ltr' ? 'left' : 'right', 'S_CONTENT_FLOW_END' => $user->lang['DIRECTION'] == 'ltr' ? 'right' : 'left', 'S_CONTENT_ENCODING' => 'UTF-8', 'S_TIMEZONE' => $user->data['user_dst'] || $user->data['user_id'] == ANONYMOUS && $config['board_dst'] ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''), 'S_DISPLAY_ONLINE_LIST' => $l_online_time ? 1 : 0, 'S_DISPLAY_SEARCH' => !$config['load_search'] ? 0 : (isset($auth) ? $auth->acl_get('u_search') && $auth->acl_getf_global('f_search') : 1), 'S_DISPLAY_PM' => $config['allow_privmsg'] && !empty($user->data['is_registered']) && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm')) ? true : false, 'S_DISPLAY_MEMBERLIST' => isset($auth) ? $auth->acl_get('u_viewprofile') : 0, 'S_NEW_PM' => $s_privmsg_new ? 1 : 0, 'S_REGISTER_ENABLED' => $config['require_activation'] != USER_ACTIVATION_DISABLE ? true : false, 'S_FORUM_ID' => $forum_id, 'S_TOPIC_ID' => $topic_id, 'S_LOGIN_ACTION' => !defined('ADMIN_START') ? append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'mode=login') : append_sid("index.{$phpEx}", false, true, $user->session_id), 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => str_replace('&amp;', '&', build_url()))), 'S_ENABLE_FEEDS' => $config['feed_enable'] ? true : false, 'S_ENABLE_FEEDS_OVERALL' => $config['feed_overall'] ? true : false, 'S_ENABLE_FEEDS_FORUMS' => $config['feed_overall_forums'] ? true : false, 'S_ENABLE_FEEDS_TOPICS' => $config['feed_topics_new'] ? true : false, 'S_ENABLE_FEEDS_TOPICS_ACTIVE' => $config['feed_topics_active'] ? true : false, 'S_ENABLE_FEEDS_NEWS' => $s_feed_news ? true : false, 'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme', 'T_TEMPLATE_PATH' => "{$web_path}styles/" . $user->theme['template_path'] . '/template', 'T_SUPER_TEMPLATE_PATH' => isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path'] ? "{$web_path}styles/" . $user->theme['template_inherit_path'] . '/template' : "{$web_path}styles/" . $user->theme['template_path'] . '/template', 'T_IMAGESET_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset', 'T_IMAGESET_LANG_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset/' . $user->data['user_lang'], 'T_IMAGES_PATH' => "{$web_path}images/", 'T_SMILIES_PATH' => "{$web_path}{$config['smilies_path']}/", 'T_AVATAR_PATH' => "{$web_path}{$config['avatar_path']}/", 'T_AVATAR_GALLERY_PATH' => "{$web_path}{$config['avatar_gallery_path']}/", 'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/", 'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/", 'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/", 'T_STYLESHEET_LINK' => !$user->theme['theme_storedb'] ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.{$phpEx}", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang'], true, $user->session_id), 'T_STYLESHEET_NAME' => $user->theme['theme_name'], 'T_THEME_NAME' => $user->theme['theme_path'], 'T_TEMPLATE_NAME' => $user->theme['template_path'], 'T_SUPER_TEMPLATE_NAME' => isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path'] ? $user->theme['template_inherit_path'] : $user->theme['template_path'], 'T_IMAGESET_NAME' => $user->theme['imageset_path'], 'T_IMAGESET_LANG_NAME' => $user->data['user_lang'], 'T_IMAGES' => 'images', 'T_SMILIES' => $config['smilies_path'], 'T_AVATAR' => $config['avatar_path'], 'T_AVATAR_GALLERY' => $config['avatar_gallery_path'], 'T_ICONS' => $config['icons_path'], 'T_RANKS' => $config['ranks_path'], 'T_UPLOAD' => $config['upload_path'], 'SITE_LOGO_IMG' => $user->img('site_logo'), 'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1' ? '' : '; domain=' . $config['cookie_domain']) . (!$config['cookie_secure'] ? '' : '; secure')), 'AVATAR_SMALL_IMG' => STARGATE ? sgp_get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], '35', '35') : '', 'P_USERNAME' => STARGATE ? $user->data['username'] : '', 'P_USERNAME_FULL' => STARGATE ? get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']) : ''));
}
sgp_build_minimods();
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB')) {
    exit;
}
global $k_config, $k_blocks;
$queries = $cached_queries = 0;
foreach ($k_blocks as $blk) {
    if ($blk['html_file_name'] == 'block_top_posters.html') {
        $block_cache_time = $blk['block_cache_time'];
    }
}
$block_cache_time = isset($block_cache_time) ? $block_cache_time : $k_config['block_cache_time_default'];
include $phpbb_root_path . 'includes/sgp_functions.' . $phpEx;
$max_top_posters = $k_config['number_of_top_posters_to_display'];
$sql = 'SELECT user_id, username, user_posts, user_colour, user_type, group_id, user_avatar, user_avatar_type, user_avatar_width , user_avatar_height, user_website
	FROM ' . USERS_TABLE . '
	WHERE user_type <> 2
		AND user_posts <> 0
	ORDER BY user_posts DESC';
$result = $db->sql_query_limit($sql, $max_top_posters, 0, $block_cache_time);
while ($row = $db->sql_fetchrow($result)) {
    if (!$row['username']) {
        continue;
    }
    $template->assign_block_vars('top_posters', array('S_SEARCH_ACTION' => append_sid("{$phpbb_root_path}search.{$phpEx}", 'author_id=' . $row['user_id'] . '&amp;sr=posts'), 'USERNAME_FULL' => get_username_string('full', $row['user_id'], sgp_checksize($row['username'], 15), $row['user_colour']), 'POSTER_POSTS' => $row['user_posts'], 'USER_AVATAR_IMG' => sgp_get_user_avatar($row['user_avatar'], $row['user_avatar_type'], '16', '16', $user->lang['USER_AVATAR']), 'URL' => $row['user_website']));
    $template->assign_vars(array('TOP_POSTERS_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));
}
$db->sql_freeresult($result);
        // We check the default template folder and the SGP common folder templates //
        $my_file_wide = "{$phpbb_root_path}styles/" . $user->theme['template_path'] . '/template/blocks/' . $value;
        $my_file_wide = str_replace('.html', '_wide.html', $my_file_wide);
        if (file_exists($my_file_wide)) {
            $value = str_replace('.html', '_wide.html', $value);
        } else {
            $my_file_wide = "{$phpbb_root_path}styles/_portal_common/template/blocks/" . $value;
            $my_file_wide = str_replace('.html', '_wide.html', $my_file_wide);
            if (file_exists($my_file_wide)) {
                $value = str_replace('.html', '_wide.html', $value);
            }
        }
        $template->assign_block_vars('center_block_files', array('CENTER_BLOCKS' => portal_block_template($value), 'CENTER_BLOCK_ID' => 'C_' . $center_block_id[$block], 'CENTER_BLOCK_TITLE' => $center_block_title[$block], 'CENTER_BLOCK_SCROLL' => $center_block_scroll[$block], 'CENTER_BLOCK_HEIGHT' => $center_block_height[$block], 'CENTER_BLOCK_IMG' => $center_block_img[$block] ? '<img src="' . $phpbb_root_path . 'images/block_images/block/' . $center_block_img[$block] . '" alt="" />' : '<img src="' . $phpbb_root_path . 'images/block_images/block/none.gif" height="1px" width="1px" alt="" >', 'CENTER_BLOCK_IMG_2' => file_exists($big_image_path . $center_block_img[$block]) ? '<img src="' . $big_image_path . $center_block_img[$block] . '" alt="" />' : '<img src="' . $phpbb_root_path . 'images/block_images/large/none.png" alt="" >', 'S_CONTENT_FLOW_BEGIN' => $user->lang['DIRECTION'] == 'ltr' ? 'left' : 'right', 'S_CONTENT_FLOW_END' => $user->lang['DIRECTION'] == 'ltr' ? 'right' : 'left'));
    }
}
$template->assign_vars(array('AVATAR' => sgp_get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']), 'BLOCK_WIDTH' => $blocks_width . 'px', 'PORTAL_ACTIVE' => $config['portal_enabled'], 'PORTAL_VERSION' => $config['portal_version'], 'READ_ARTICLE_IMG' => $user->img('btn_read_article', 'READ_ARTICLE'), 'POST_COMMENTS_IMG' => $user->img('btn_post_comments', 'POST_COMMENTS'), 'VIEW_COMMENTS_IMG' => $user->img('btn_view_comments', 'VIEW_COMMENTS'), 'SITE_NAME' => $config['sitename'], 'S_USER_LOGGED_IN' => $user->data['user_id'] != ANONYMOUS ? true : false, 'S_SHOW_LEFT_BLOCKS' => $show_left, 'S_SHOW_RIGHT_BLOCKS' => $show_right, 'S_BLOCKS_ENABLED' => $blocks_enabled, 'S_ALLOW_FOOTER_IMAGES' => $k_config['allow_footer_images'] ? true : false, 'S_CONTENT_FLOW_BEGIN' => $user->lang['DIRECTION'] == 'ltr' ? 'left' : 'right', 'S_CONTENT_FLOW_END' => $user->lang['DIRECTION'] == 'ltr' ? 'right' : 'left', 'USER_NAME' => $user->data['username'], 'USERNAME_FULL' => get_username_string('full', $user->data['user_id'], $user->data['username'], $user->data['user_colour']), 'U_INDEX' => append_sid("{$phpbb_root_path}index.{$phpEx}"), 'U_PORTAL' => append_sid("{$phpbb_root_path}portal.{$phpEx}"), 'U_PORTAL_ARRANGE' => append_sid("{$phpbb_root_path}portal.{$phpEx}", "arrange=1"), 'U_STAFF' => append_sid("{$phpbb_root_path}memberlist.{$phpEx}", 'mode=leaders'), 'U_SEARCH_BOOKMARKS' => append_sid("{$phpbb_root_path}ucp.{$phpEx}", 'i=main&mode=bookmarks')));
// process common data here //
if ($this_page[0] == 'viewtopic') {
    global $phpEx, $phpbb_root_path;
    global $config, $user, $template, $k_quick_posting_mode, $forum_id, $post_data, $topic_id, $topic_data, $k_config;
    // using function_exists() will still result in redeclarations errors //
    // I confirmed I could use include once under these circumstances over a year ago (official phpBB chat with devs) //
    // I need to determine the actual functions required and check agains each ? //
    include_once $phpbb_root_path . 'includes/functions_posting.' . $phpEx;
    include_once $phpbb_root_path . 'includes/functions_display.' . $phpEx;
    if (!isset($smilies_status)) {
        generate_smilies('inline', $forum_id);
    }
    // HTML, BBCode, Smilies, Images and Flash status amended version
    $bbcode_status = $config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id) ? true : false;
    $smilies_status = $bbcode_status && $config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id) ? true : false;
    $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_type, u.user_avatar, u.user_avatar_type, u.user_lastvisit, s.session_user_id, MAX(s.session_time) AS session_time
		FROM ' . USERS_TABLE . ' u
		LEFT JOIN ' . SESSIONS_TABLE . ' s ON (u.user_id = s.session_user_id AND session_time >= ' . (time() - $config['session_length']) . ')
		WHERE u.user_type <> 2
			AND u.user_lastvisit <> 0
		GROUP BY s.session_user_id, u.user_id
		ORDER BY session_time DESC, u.user_lastvisit DESC';
    $result = $db->sql_query_limit($sql, $max_last_online, 0, $block_cache_time);
    $session_times = array();
    while ($row = $db->sql_fetchrow($result)) {
        if (!$row['username']) {
            continue;
        }
        $session_times[$row['session_user_id']] = $row['session_time'];
        $row['session_time'] = !empty($session_times[$row['user_id']]) ? $session_times[$row['user_id']] : 0;
        $row['last_visit'] = !empty($row['session_time']) ? $row['session_time'] : $row['user_lastvisit'];
        $last_visit = !empty($row['session_time']) ? $row['session_time'] : $row['user_lastvisit'];
        $template->assign_block_vars('last_online', array('USERNAME_FULL' => get_username_string('full', $row['user_id'], sgp_checksize($row['username'], 15), $row['user_colour']), 'ONLINE_TIME' => empty($last_visit) ? ' - ' : $user->format_date($last_visit), 'USER_AVATAR_IMG' => sgp_get_user_avatar($row['user_avatar'], $row['user_avatar_type'], '16', '16'), 'U_REGISTER' => 'append_sid("{$phpbb_root_path}ucp.$phpEx", mode=register)'));
    }
    $db->sql_freeresult($result);
}
//Is user logged in and have no auth  to view profiles/memberlist/onlinelist?
if ($user->data['user_type'] != 2 && !$auth->acl_gets('u_viewprofile')) {
    $template->assign_vars(array('NO_VIEWONLINE_R' => true));
}
//Is user not logged in and have no auth to view profiles/memberlist/onlinelist?
if ($user->data['user_id'] == ANONYMOUS && !$auth->acl_gets('u_viewprofile')) {
    $template->assign_vars(array('NO_VIEWONLINE_A' => true, 'LAST_ONLINE_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));
} else {
    $template->assign_vars(array('LAST_ONLINE_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));
}
* @home    http://www.phpbbireland.com
* Code segments from various phpBB core copyright phpBB team.
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @note: Do not remove this copyright. Just append yours if you have modified it,
*        this is part of the Stargate Portal copyright agreement...
*
* @version $Id: block_user_information.php 297 2008-12-30 18:40:30Z JohnnyTheOne $
* Updated: 17 January 2008 03:39
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB')) {
    exit;
}
global $user, $ranks, $config, $k_config, $k_blocks, $phpbb_root_path;
// initialise local variables //
$queries = $cached_queries = 0;
$rank_title = $rank_img = $rank_img_src = '';
foreach ($k_blocks as $blk) {
    if ($blk['html_file_name'] == 'block_user_information.html') {
        $block_cache_time = $blk['block_cache_time'];
    }
}
$block_cache_time = isset($block_cache_time) ? $block_cache_time : $k_config['block_cache_time_default'];
sgp_get_user_rank($user->data['user_rank'], $user->data['user_id'] == ANONYMOUS ? false : $user->data['user_posts'], $rank_title, $rank_img, $rank_img_src);
// First we try the default code but if no image we use the sgp code //
$avatar_img = $user->data['user_avatar'] ? sgp_get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height'], 'USER_AVATAR', true) : '';
$template->assign_vars(array('AVATAR' => $avatar_img ? $avatar_img : sgp_get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type']), 'WELCOME_SITE' => sprintf($user->lang['WELCOME_SITE'], $config['sitename']), 'USR_RANK_TITLE' => $rank_title, 'USR_RANK_IMG' => $rank_img, 'USER_INFORMATION_DEBUG' => sprintf($user->lang['PORTAL_DEBUG_QUERIES'], $queries ? $queries : '0', $cached_queries ? $cached_queries : '0', $total_queries ? $total_queries : '0')));