[問題]外掛 Who Is On Line 如何改成中文..

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
小花兒
星球公民
星球公民
文章: 154
註冊時間: 2003-12-15 18:31
來自: 深山裡

[問題]外掛 Who Is On Line 如何改成中文..

文章 小花兒 »

代碼: 選擇全部

############################################################## 
## Mod Title: [Who Is On Line] User Icon 
## Mod Version: 1.1.1 for phpbb 2.0.x
## Author: MaoStudio < mao@dnb2tw.info > http://www.maostudio.com/
## 
## Description: This mod will add an icon next to the user name &
## explaination in the user info.
## 
## Demo: http://bbs.dnb2tw.info/
## 
## Installation Level: easy 
## Installation Time: 3-5 Minutes 
## Files To Edit: includes/page_header.php, language/lang_xxx/lang_main.php,
## templates/xxx/index_body.tpl
## 
## Included Files: admin.gif, mod.gif, user.gif, guest.gif 
############################################################## 
## 
## Author Note: Feel free to use it, but be sure to backup 
## before you install it. Enjoy It!! 
## 
##############################################################
## History: 
## 1.1.1 advanced version - add GUEST ICON
##	 (http://www.maostudio.com/phpbb/mod/WIO_User_Icon_Adv_Guest.zip)
## 1.1.0 advanced version - having explaination
##	 (http://www.maostudio.com/phpbb/mod/WIO_User_Icon_Adv.zip)
## 1.0.0 simple version - display icons only 
##	 (http://www.maostudio.com/phpbb/mod/WIO_User_Icon.zip)
################################################################# 
# 
#-----[ OPEN ]------------------------------------------ 
# 

/phpBB2/includes/page_header.php

# 
#-----[ FIND ]------------------------------------------ 
# 

$prev_user_id = 0;
$prev_user_ip = '';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

//
//User Icon Mod
//
$icon_admin = '<img src=images/icons/admin.gif>'; //Admin Icon
$icon_mod = '<img src=images/icons/mod.gif>'; //Mod Icon
$icon_member = '<img src=images/icons/user.gif>'; //Member Icon
$icon_guest = '<img src=images/icons/guest.gif>'; //Guest Icon

# 
#-----[ FIND ]------------------------------------------ 
# 

// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
{
	$style_color = '';
	
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	$user_icon = $icon_member; //User Icons - User

# 
#-----[ FIND ]------------------------------------------ 
# 

	$row['username'] = '<b>' . $row['username'] . '</b>';
	$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
	
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	$user_icon = $icon_admin; //User Icons - Admin

# 
#-----[ FIND ]------------------------------------------ 
# 
	
	$row['username'] = '<b>' . $row['username'] . '</b>';
	$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

	$user_icon = $icon_mod; //User Icons - Mod
	
# 
#-----[ FIND ]------------------------------------------ 
# 

	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++;
	}

# 
#-----[ REPLACE, WITH ]------------------------------------------ 
# 
	//
	//User Icon Mod
	//
	if ( $row['user_allow_viewonline'] )
	{
		$user_online_link = $user_icon . '<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 = $user_icon . '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
		$logged_hidden_online++;
	}
	
# 
#-----[ FIND ]------------------------------------------ 
# 

'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

'L_WHOSONLINE_MEMBER' => sprintf($lang['Member_online_color'], '<span style="color:#' . $theme['fontcolor1'] . '">', '</span>'), //User Icon Mod
'L_WHOSONLINE_GUEST' => sprintf($lang['Guest_online_color'], '<span style="color:#' . $theme['fontcolor1'] . '">', '</span>'), //User Icon Mod
'L_WHOSONLINE_GUEST_COUNT' => $guests_online, //User Icon Mod
'L_WHOSONLINE_GUEST_LIST' => $lang['Online_guest'], //User Icon Mod

//
//User Icon Mod
//
'L_ICON_EXPLAIN_ADMIN' => $icon_admin,
'L_ICON_EXPLAIN_MOD' => $icon_mod,
'L_ICON_EXPLAIN_MEMBER' => $icon_member,
'L_ICON_EXPLAIN_GUEST' => $icon_guest,

# 
#-----[ OPEN ]------------------------------------------ 
# 

/phpBB2/language/lang_xxx/lang_main.php

# 
#-----[ FIND ]------------------------------------------ 
# 

For Trad_Chinese:

$lang['Registered_users'] = '目前線上註冊會員:';

For English:

$lang['Mod_online_color'] = '%sModerator%s';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

For Trad_Chinese:

$lang['Online_guest'] = '目前線上瀏覽訪客:'; //User Icon Mod

For English:

$lang['Online_guest'] = 'Online Guest:';//User Icon Mod

# 
#-----[ FIND ]------------------------------------------ 
# 

For Trad_Chinese:

$lang['Mod_online_color'] = '<font color="#006600">版面管理員</font>';

For English:

$lang['Mod_online_color'] = '%sModerator%s';

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

For Trad_Chinese:

$lang['Member_online_color'] = '<font color="#444444">註冊會員</font>'; //User Icon Mod
$lang['Guest_online_color'] = '<font color="#FF0000">線上訪客</font>'; //User Icon Mod

For English:

$lang['Member_online_color'] = '%sMember%s'; //User Icon Mod
$lang['Guest_online_color'] = '%sGuest%s'; //User Icon Mod

# 
#-----[ OPEN ]------------------------------------------ 
# 

/phpBB2/templates/subSilver/index_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 

<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}   [ {L_WHOSONLINE_ADMIN} ]   [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>

# 
#-----[ REPLACE, WITH ]------------------------------------------ 
# 

<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}  <br />[ {L_ICON_EXPLAIN_ADMIN} ] - [ {L_WHOSONLINE_ADMIN} ]  [ {L_ICON_EXPLAIN_MOD} ] -  [ {L_WHOSONLINE_MOD} ]  [ {L_ICON_EXPLAIN_MEMBER} ] -  [ {L_WHOSONLINE_MEMBER} ]  [ {L_ICON_EXPLAIN_GUEST} ] -  [ {L_WHOSONLINE_GUEST} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}<br />{L_WHOSONLINE_GUEST_LIST} {L_ICON_EXPLAIN_GUEST} [ <font color="#FF0000">{L_WHOSONLINE_GUEST_COUNT}</font> ]</span></td>

# 
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------------
# 

# 
#-----[ UPLOAD ]------------------------------------------ 
# 

admin.gif, mod.gif, user.gif, guest.gif  

to phpbb2/images/icons/

# EoM
各位大大 我裝了Who Is On Line 的外掛...
在發表文章的左邊...上線狀態是英文的 online 或 offline
我在改成離線中在線上

請問要怎麼改呢?
謝謝
我呆呆的.....
GeniusKiKi
竹貓忠實會員
竹貓忠實會員
文章: 1086
註冊時間: 2003-10-28 14:50

文章 GeniusKiKi »

不是這個外掛吧...
這個外掛是在首頁顯示罷了...
再也不當爛好人...
好人是小白轉型成大白的墊腳石...
吉川拓也
竹貓忠實會員
竹貓忠實會員
文章: 1215
註冊時間: 2003-02-09 18:24
來自: [ G.I.T ]
聯繫:

文章 吉川拓也 »

請開啟 : viewtopic.php
找到 :

代碼: 選擇全部

 'POSTER_ONLINE' => (($postrow[$i]['user_session_time'] >= ( time() - 300 )) && ($postrow[$i]['user_allow_viewonline'])) ? '<img border="0" src="' . $images['online'] . '" alt="上線中....">' : '<img border="0" src="' . $images['offline'] . '" alt="離線中....">', 
修改裡面的文字即可 !!
善用 搜尋 可以解決您 90% 的問題
頭腦清晰,選擇正確。 (╯▔︹▔)╯~╘═╛
小花兒
星球公民
星球公民
文章: 154
註冊時間: 2003-12-15 18:31
來自: 深山裡

文章 小花兒 »

謝謝兩位大大...
終於改好了^^
感動ing
我呆呆的.....
主題已鎖定

回到「外掛問題討論」