使用者的使用狀態線上-離線-隱藏

主題已鎖定
頭像
櫻井綾乃
.※.稜鏡之森の守護使者.※.
.※.稜鏡之森の守護使者.※.
文章: 1324
註冊時間: 週二 2006-03-07 09:08
個人狀態: 論壇爆走中...
性別: 醜醜的大美女
來自: 雲上天國
表達感謝: 68 次
擁有感謝: 829 次
星座:
聯繫:

使用者的使用狀態線上-離線-隱藏

文章 櫻井綾乃 »

代碼: 選擇全部

############################################################## 
## MOD Title: Online/Offline in viewtopic.php
## MOD Author: romans1423 < romans1423@hotmail.com > (Rick Beckman) www.spiritsword.com 
## MOD Description: This MOD outputs graphically a user's online status in viewtopic.php.
## MOD Version: 1.2.1 
## 
## Installation Level: easy
## Installation Time: 5 Minutes 
## Files To Edit: viewtopic.php
##		  templates/subSilver/viewtopic_body.tpl 
##		  templates/subSilver/subSilver.cfg
##		  language/lang_english/lang_main.php
## Included Files: icon_online.gif
##		   icon_offline.gif
##		   icon-hidden.gif
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/ 
############################################################## 
## Author Notes: 
## 	This MOD is based upon Online/Offline 1.0.0 by John B. Abela (abela@phpbb.com), stitch626,
##	and an unknown author. Lots of thanks!
##	The Online, Offline, and Hidden icons are from www.forumimages.com and were created
##	by Daz. Thanks for the wonderful images.
##	This is my first "real" MOD; please let me know of any errors!
############################################################## 
## MOD History: 
## 
## 1.2.1 - Fixed a typo in the install file (this file); the "files to edit" list was incomplete.
## 	     There is no need to update any of your files.
## 1.2.0 - Removed textual variant (i.e., "Online" or "Offline" instead of using images.)
##	 - Added support for Hidden users
##	 - Included status icons from www.forumimages.com.
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

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

viewtopic.php

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

u.user_allowavatar, u.user_allowsmile, 

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

u.user_allow_viewonline, u.user_session_time, 

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

	$template->assign_block_vars('postrow', array(

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 

	//Online/Offline
	if (($postrow[$i]['user_session_time'] >= ( time() - 300 )) && ($postrow[$i]['user_allow_viewonline']))
	{
		$on_off_hidden = '<img src="' . $images['icon_online'] . '" alt="' . $lang['Online'] . '" title="' . $lang['Online'] . '" border="0" />';
	}
	else if (($postrow[$i]['user_allow_viewonline']) == 0)
	{
		$on_off_hidden = '<img src="' . $images['icon_hidden'] . '" alt="' . $lang['Hidden'] . '" title="' . $lang['Hidden'] . '" border="0" />';
	}
	else if ($poster_id == ANONYMOUS)
	{
		$on_off_hidden = '';
	}
	else
	{
		$on_off_hidden = '<img src="' . $images['icon_offline'] . '" alt="' . $lang['Offline'] . '" title="' . $lang['Offline'] . '" border="0" />';
	}

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

		'POSTER_AVATAR' => $poster_avatar,

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

		'POSTER_ONLINE' => $on_off_hidden,

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

language/lang_english/lang_main.php

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

//
// Viewonline
//

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#

//
// Online/Offline
//
$lang['Offline'] = 'Offline';
$lang['Online'] = 'Online';
$lang['Hidden'] = 'Hidden';

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

templates/subSilver/subSilver.cfg

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

?>

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#

$images['icon_online'] = "$current_template_images/{LANG}/icon_online.gif\" width=\"59\" height=\"18";
$images['icon_offline'] = "$current_template_images/{LANG}/icon_offline.gif\" width=\"59\" height=\"18";
$images['icon_hidden'] = "$current_template_images/{LANG}/icon_hidden.gif\" width=\"59\" height=\"18";

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

templates/subSilver/viewtopic_body.tpl

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

{postrow.PROFILE_IMG}

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#

{postrow.POSTER_ONLINE} 

# 
#-----[ COPY ]------------------------------------------ 
#

copy icon_online.gif to templates/subSilver/images/lang_english/online.gif
copy icon_offline.gif to templates/subSilver/images/lang_english/offline.gif
copy icon_hidden.gif to templates/subSilver/images/lang_english/hidden.gif

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
如果.....
也許.....
這些都是事後的想法
如果會想著當初怎麼做也許會有什麼結果
不如在當初就做出正確的決定.....
有些事不去嚐試是不會真的體會他的奧妙的~
主題已鎖定

回到「PHPBB2-外掛列表」