[ resmi görüntülemek için tıklayın ]
Kolay ve güzel

Kod: Tümünü seç
##############################################################
## MOD Title: Online Status
## MOD Author: mechakoopa < mechakoopa@gmail.com > (N/A) N/A
## MOD Description: Adds Online/Offline when viewing topic.
## MOD Version: 1.0.1
##
## Installation Level: Very Really Easy
## Installation Time: 1 Minutes
## Files To Edit: viewtopic.php
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## You can change these textz to picture or anything you want.
## Just edit these lines
## $onlinestatus_online = 'User is <b>Online</b>';
## $onlinestatus_offline = 'User is Offline';
## You may edit to
## $onlinestatus_online = '<img src="images/online.gif">';
## $onlinestatus_offline = '<img src="images/offline.gif">';
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]----------------------------------------
#
viewtopic.php
#
#-----[ FIND ]----------------------------------------
#
$template->assign_block_vars('postrow', array(
#
#-----[ BEFORE, ADD ]----------------------------------
#
//Text Settings
$onlinestatus_online = 'Bu KuLLaNıCı Şu AnDa <b>Online</b>';
$onlinestatus_offline = 'Bu KuLLaNıCı Şu AnDa';
$result4 = mysql_query("SELECT * FROM " . $table_prefix . "users WHERE user_id = " . $poster_id);
$u53r5747u5 = mysql_fetch_row($result4);
$result5 = mysql_query("SELECT * FROM " . $table_prefix . "sessions WHERE session_user_id = " . $poster_id);
$s35510nn0w = mysql_fetch_row($result5);
if ($u53r5747u5[0] == -1) {
$u53r5747u573x7 = ""; // If that user is guest, don't display status.
} else {
if ($s35510nn0w[6] == 1) {
if (time() - 300 > $u53r5747u5[4]) {
$u53r5747u573x7 = $onlinestatus_offline;
} else {
$u53r5747u573x7 = $onlinestatus_online;
}
} else {
$u53r5747u573x7 = $onlinestatus_offline ;
}
}
#
#-----[ FIND ]----------------------------------------
#
'POSTER_RANK' => $poster_rank,
#
#-----[ REPLACE WITH ]--------------------------------
#
'POSTER_RANK' => "$poster_rank<br>$u53r5747u573x7",
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM