第 1 頁 (共 1 頁)
[討論] Who Is Online UserIcon 改良 (成功了)
發表於 : 2005-04-02 15:07
由 tseesther
原文:
http://phpbb-tw.net/phpbb/viewtopic.php?t=10396
此MOD是把首頁線上名單以icon顯示系統管理員、版面管理員和註冊會員等級別\r
各位大大是否有興趣研究研一下,如果要增加多一個級別,如"高級會員",條件是發文總數多於某數,這樣可以讓高級會員多一份優越感,無形中對論壇的支持度也是好的
不過想不通如何取user_posts的資料應用,各位大大能建議一下嗎?
發表於 : 2005-04-02 15:12
由 御津闇慈
會員管理的等級管理不是可以新增嗎?
請麻煩多多用搜尋功能
發表於 : 2005-04-02 15:26
由 tseesther
誤會了
我想討論的是在首頁把等級都加到線上名單並以圖示顯示出來
發表於 : 2005-04-02 16:00
由 tseesther
代碼: 選擇全部
if ( $row['user_id'] != $prev_user_id )
{
$style_color = ''; $user_icon = $icon_member; //User Icons - User
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"'; $user_icon = $icon_admin; //User Icons - Admin
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; $user_icon = $icon_mod; //User Icons - Mod
}
我的構想是在此段當中加入如:
代碼: 選擇全部
if ( $row['user_posts'] > 999 )
{$user_icon = $icon_goldmember;}
不知是否可行?對不起讓大家見笑了=_="
我對code的認識不深,不過想多研究讓自己進步,先謝過各位大大!
發表於 : 2005-04-02 17:07
由 tseesther
經反覆的試驗,成功了!!
原來之前失敗是因為沒有取得'user_posts'的數據,要這樣:
代碼: 選擇全部
====打開 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
====之後,加上====
, u.user_posts
然後照上一篇文章所講將那段code加入就可以了
效果就如這樣:
很開心,自己解決了問題^^
發表於 : 2005-04-02 17:43
由 赤兔
可否請樓主寫成完整的 MOD
然後在非官方推薦認證外掛版區發表,以嘉惠有需要的朋友
發表於 : 2005-04-02 18:06
由 tseesther
赤兔 寫:可否請樓主寫成完整的 MOD
然後在非官方推薦認證外掛版區發表,以嘉惠有需要的朋友
我試試看! 不過我不太熟.... 怕是怕會寫出什麼差錯來..... 嘻
發表於 : 2005-04-02 21:31
由 hpo14
沒關係...想用的人自然就成為了你的測試幫手...^^
發表於 : 2005-04-03 00:59
由 twentyone
tseesther 寫:赤兔 寫:可否請樓主寫成完整的 MOD
然後在非官方推薦認證外掛版區發表,以嘉惠有需要的朋友
我試試看! 不過我不太熟.... 怕是怕會寫出什麼差錯來..... 嘻
努力加油同
發表於 : 2005-12-30 11:01
由 亞青
應該放在哪裡呢????????
....
發表於 : 2005-12-30 13:19
由 jwxie
請幾位大大再次貼出\r
Who Is Online UserIcon mod的正確位置@@可以嗎?
發表於 : 2005-12-30 16:00
由 寒心
發表於 : 2005-12-30 16:14
由 Mac
發表於 : 2005-12-30 16:32
由 亞青
tseesther 寫:代碼: 選擇全部
if ( $row['user_id'] != $prev_user_id )
{
$style_color = ''; $user_icon = $icon_member; //User Icons - User
if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"'; $user_icon = $icon_admin; //User Icons - Admin
}
else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"'; $user_icon = $icon_mod; //User Icons - Mod
}
我的構想是在此段當中加入如:
代碼: 選擇全部
if ( $row['user_posts'] > 999 )
{$user_icon = $icon_goldmember;}
不知是否可行?對不起讓大家見笑了=_="
我對code的認識不深,不過想多研究讓自己進步,先謝過各位大大!
我有些少不明白~~在哪段當中加入
代碼: 選擇全部
if ( $row['user_posts'] > 999 )
{$user_icon = $icon_goldmember;}
呢?????
請你詳細些吧~~~~