我想把水怪RPG的資料顯示(如下)拿掉不在viewtopic顯示,但想在會員的個人資料(profile)顯示出來,請問須要怎樣修改才能在個人資料(profile)顯示出來呢?
代碼: 選擇全部
職 照: xxx
等 級: xxx
H P: xxx / xxx
M P: xxx / xxx
經驗值: xxx / xxx
攻擊力: xxx
防禦力: xxx
?#93; 力: xxx
速 度: xxx
版主: 版主管理群
代碼: 選擇全部
職 照: xxx
等 級: xxx
H P: xxx / xxx
M P: xxx / xxx
經驗值: xxx / xxx
攻擊力: xxx
防禦力: xxx
?#93; 力: xxx
速 度: xxx
代碼: 選擇全部
#
#-----[ 修改結束,存檔 ]-------------------------------------------------------------
#-----[ 打?#125; ]-----------------------------------------------------------------------
#
viewtopic.php
#
#-----[ 尋找這一段 ]-----------------------------------------------------------------
#
$sql = "SELECT u.username, u.user_id
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
#
#-----[ 在 $sql = "SELECT 後面尋找 ]-------------------------------------------------
#
u.user_allowsmile
#
#-----[ 之後, ?#91;上 ]-----------------------------------------------------------------
#
,u.user_robfail, u.rpg_level, u.rpg_cur_hp, u.rpg_max_hp, u.rpg_cur_mp, u.rpg_max_mp, u.rpg_cur_exp, u.rpg_max_exp, u.rpg_attack, u.rpg_defense, u.rpg_magic, u.rpg_speed, u.rpg_medals
#
#-----[ 尋找 ]-----------------------------------------------------------------------
#
//
// Again this will be handled by the templating
// code at some point
#
#-----[ 之前, ?#91;上 ]-----------------------------------------------------------------
#
$rpgstatus = '<table width="142" cellpadding="0" cellspacing="0" border="0" class="bodyline">' .
'<tr><td width="35%"><span class="gensmall">職 照:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_medals'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">等 級:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_level'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">H P:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_cur_hp'] . ' / ' . $postrow[$i]['rpg_max_hp'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">M P:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_cur_mp'] . ' / ' . $postrow[$i]['rpg_max_mp'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">經驗值:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_cur_exp'] . ' / ' . $postrow[$i]['rpg_max_exp'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">攻擊力:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_attack'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">防禦力:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_defense'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">?#93; 力:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_magic'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">速 度:</span></td><td><span class="gensmall">' . $postrow[$i]['rpg_speed'] . '</span></td></tr></table>';
#
#-----[ 尋找 ]-----------------------------------------------------------------------
#
'EDITED_MESSAGE' => $l_edited_by,
#
#-----[ 之後, ?#91;上 ]-----------------------------------------------------------------
#
'POSTER_RPG' => $rpgstatus,
#
代碼: 選擇全部
#-----[ 打?#125; ]-----------------------------------------------------------------------
#
templates/{YOUR_THEME}/viewtopic_body.tpl
#
#-----[ 尋找 ]-----------------------------------------------------------------------
#
{postrow.POSTER_FROM}</span><br /></td>
#
#-----[ 覆蓋為 ]---------------------------------------------------------------------
#
{postrow.POSTER_FROM}</span><br />{postrow.POSTER_RPG}</td>
代碼: 選擇全部
#
#-----[ 尋找 ]-----------------------------------------------------------------------
#
//
// Define the little post icon
#
#-----[ 之前, ?#91;上 ]-----------------------------------------------------------------
#
if ($postrow[$i]['user_robfail'] > 0)
{
$poster_avatar .= '<br />';
$robid = floor(($postrow[$i]['user_robfail'] - 1) / 4);
$robcnt = (($postrow[$i]['user_robfail'] - 1) % 4) + 1;
if ($robid <= 7)
{
for ($j=0; $j < $robcnt; $j++)
{
$poster_avatar .= '<img src="images/rob' . $robid . '.gif" />';
}
}
else
{
$poster_avatar .= '<center><img src="images/rob7.gif" />× ' . ($postrow[$i]['user_robfail'] - 28) . '</center>';
}
$poster_avatar .= '<br /><span class="gensmall">笨!失敗的搶匪</span>';
}
依照經驗, 應該是要修改風鈴兒 寫:這樣我試試看^^233062306 寫:有有有@@風鈴兒 寫:麻煩233062306大大,thx^^
請問有方法可將這些資料顯示在個人資料(profile)呢?
把我剛才貼的code修改一部份~
之後貼上profile.php and profile_view_body.tpl
但我未試過做...
所以要試得好小心....
代碼: 選擇全部
#
#-----[ Open ]-----
#
includes/usercp_viewprofile.php
#
#-----[ Find ]-----
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[ After, Add ]-----
#
'RPG_LEVEL' => $profiledata['rpg_level'],
#
#-----[ Open ]-----
#
templates/YOUR_THEME/profile_view_body.tpl
#
#-----[ Find ]-----
# ps. 請自行調整位置\r
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td>
<td> <b><span class="gen">{INTERESTS}</span></b></td>
</tr>
#
#-----[ After, Add ]-----
#
<tr>
<td valign="top" align="right" nowrap="nowrap"><span class="gen">水怪等級: </span></td>
<td><span class="postbody"><b>{RPG_LEVEL}</b></span></td>
</tr>
代碼: 選擇全部
'RPG_LEVEL' => $profiledata['rpg_level'],
代碼: 選擇全部
#
#-----[ Find ]-----
#
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
#
#-----[ After, Add ]-----
#
'RPG_LEVEL' => $rpgstatus = '<table width="142" cellpadding="0" cellspacing="0" border="0" class="bodyline">' .
'<tr><td width="35%"><span class="gensmall">職 照:</span></td><td><span class="gensmall">' . $profiledata['rpg_medals'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">等 級:</span></td><td><span class="gensmall">' . $profiledata['rpg_level'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">H P:</span></td><td><span class="gensmall">' . $profiledata['rpg_cur_hp'] . ' / ' . $profiledata['rpg_max_hp'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">M P:</span></td><td><span class="gensmall">' . $profiledata['rpg_cur_mp'] . ' / ' . $profiledata['rpg_max_mp'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">經驗值:</span></td><td><span class="gensmall">' . $profiledata['rpg_cur_exp'] . ' / ' . $profiledata['rpg_max_exp'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">攻擊力:</span></td><td><span class="gensmall">' . $profiledata['rpg_attack'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">防禦力:</span></td><td><span class="gensmall">' . $profiledata['rpg_defense'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">?#93; 力:</span></td><td><span class="gensmall">' . $profiledata['rpg_magic'] . '</span></td></tr>' .
'<tr><td><span class="gensmall">速 度:</span></td><td><span class="gensmall">' . $profiledata['rpg_speed'] . '</span></td></tr></table>',