顯示線上人數部分為 吉川拓也 先生所研究出來的
在rpg內的線上人數顯示rpg等級則是Martinet 修改出來的 ~@..@b
安裝整理由Martinet..XD
---------------rpg內顯示線上人數By 吉川拓也--------------------
基本的作法是要編輯二個檔案:eol.php及rpg_eol.tpl
步驟一、開啟eol.php
找到
代碼: 選擇全部
include($phpbb_root_path . 'rpg/function_rpg.'.$phpEx);
代碼: 選擇全部
define('SHOW_ONLINE', true);
找到
代碼: 選擇全部
$template->assign_vars(array(
'USERNAME' => $profiledata['username'],
'AVATAR_IMG' => GetAvatar($profiledata),
代碼: 選擇全部
'L_ONLINE_USERS' => $lang['Online_Users'],
'L_ONLINE_NOW' => $lang['Online_Now'],
'L_MEMBERS' => $lang['Members'],
1、有裝「吉川的顯示個人HP、MP、EXP狀態」的人
找到
代碼: 選擇全部
<span class="postdetails">經驗值: <font color=#FF8000>{RPG_CUR_EXP} / {RPG_MAX_EXP}</font><br />
代碼: 選擇全部
<span class="postdetails"><img src="templates/fisubsilver/images/group-1.gif" border="0"><b><u>{L_ONLINE_NOW}:</b></u>{LOGGED_IN_USER_LIST}
找到
代碼: 選擇全部
<font color="red"><b>{RESULT_MSG}</b></font></span><br />
代碼: 選擇全部
<span class="postdetails"><img src="templates/fisubsilver/images/group-1.gif" border="0"><b><u>{L_ONLINE_NOW}:</b></u>{LOGGED_IN_USER_LIST}
------------------rpg內顯示線上人數中增加顯示rpg等級By Martinet Oaf~----------------
打開eol.php
找到
代碼: 選擇全部
include($phpbb_root_path . 'rpg/function_rpg.'.$phpEx);
代碼: 選擇全部
define('SHOW_ONLINE_INRPG',true);
打開 includes/page_header.php
找到
代碼: 選擇全部
$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
AND s.session_time >= ".( time() - 300 ) . "
u.user_level
後面加上
,u.rpg_level
找到
代碼: 選擇全部
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
$logged_visible_online++;
}
else
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
代碼: 選擇全部
if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] ;
if (defined('SHOW_ONLINE_INRPG'))
{
$user_online_link .= '('.$row['rpg_level'].')</a>';
}
else
{
$user_online_link .= '</a>';
}
$logged_visible_online++;
}
else
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'];
if (defined('SHOW_ONLINE_INRPG'))
{
$user_online_link .= '('.$row['rpg_level'].')</i></a>';
}
else
{
$user_online_link .= '</i></a>';
}
$logged_hidden_online++;
}