User Online/Offline Mod machen Probleme
Verfasst: 26.08.2007 20:14
Hallo ihr Lieben,
ich hatte bis vor Kurzem den Online Status Mod installiert, der mir in der viewtopic.php anzeigt, ob ein User gerade online oder offline ist. Doch von heute auf morgen zeigte er jeden User nur noch als Offline an. Also wieder deinstalliert. Neu installiert, keine Chance. Sie blieben offline.
Also habe ich ihn wieder ganz heraus genommen und habe mir einen neuen gesucht. Dabei bin auf den Show Online In View Topic Mod gestoßen, der mir so schöne grüne und rote Männchen anzeigt, auch in der viewtopic.php. Doch dieser spielt auch verrückt. Ich selbst wurde noch nie als online angezeigt. Obwohl ich auf dem Index als online zu sehen bin.
So langsam wurmt mich das doch etwas. Weiß jemand woran es vielleicht liegen könnte?
Ich habe beide Mods einfach mal hier hineingeschrieben.
Vielen Dank!
ich hatte bis vor Kurzem den Online Status Mod installiert, der mir in der viewtopic.php anzeigt, ob ein User gerade online oder offline ist. Doch von heute auf morgen zeigte er jeden User nur noch als Offline an. Also wieder deinstalliert. Neu installiert, keine Chance. Sie blieben offline.
Also habe ich ihn wieder ganz heraus genommen und habe mir einen neuen gesucht. Dabei bin auf den Show Online In View Topic Mod gestoßen, der mir so schöne grüne und rote Männchen anzeigt, auch in der viewtopic.php. Doch dieser spielt auch verrückt. Ich selbst wurde noch nie als online angezeigt. Obwohl ich auf dem Index als online zu sehen bin.
So langsam wurmt mich das doch etwas. Weiß jemand woran es vielleicht liegen könnte?
Ich habe beide Mods einfach mal hier hineingeschrieben.
Vielen Dank!
Code: Alles auswählen
##############################################################
## 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 = 'User is <b>Online</b>';
$onlinestatus_offline = 'User is Offline';
$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
Code: Alles auswählen
########################################################
## Mod Title: Show Online In View Topic (with Icon Modifikation by Ghostraider)
## Mod Version: 2.0.1
## Author: AJ Quick, (http://www.ajquick.com/)
## Modifikations: Ghostraider (http://www.serienboard.com)
##
## Description:
## This mod will show the status of a user in viewtopic
## next to their post. Stating if they are online or not.
##
## This mod is for phpBB2 ver 2.0.X (Icon-Mod tested with 2.0.8)
##
## Portions of this script were inspired/written by
## other people. I can only claim partial credit.
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 3
## viewtopic.php
## /templates/SubSilver/Viewtopic_body.tpl
## /templates/SubSilver/SubSilver.cfg
## Included Files: 2 (online.gif offline.gif)
########################################################
#
#-----[ COPY ]------------------------------------------------
#
copy templates/subSilver/online.gif to templates/subSilver/online.gif
copy templates/subSilver/offline.gif to templates/subSilver/offline.gif
#
#-----[ OPEN ]------------------------------------------
#
Viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
u.user_allowavatar, u.user_allowsmile,
#
#-----[ ADD AFTER ]------------------------------------------
#
u.user_allow_viewonline, u.user_session_time,
#
#-----[ FIND ]------------------------------------------
#
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
//User Online Hack
//By AJ Quick (http://www.ajquick.com/)
//time()-60 sets the Refresh Time. If you want to be similar to the "Who is Online" view on First Page set time()-300
if($postrow[$i]['user_session_time'] >= (time()-60)){
if($postrow[$i]['user_allow_viewonline']){
$status = '<img src="' . $images['Online'] . '" alt="' . $lang['Online'] . '" title="' . $lang['Online'] . '" border="0" />';
}else{
$status = '<img src="' . $images['Offline'] . '" alt="' . $lang['Offline'] . '" title="' . $lang['Offline'] . '" border="0" />';
}
}else{
$status = '<img src="' . $images['Offline'] . '" alt="' . $lang['Offline'] . '" title="' . $lang['Offline'] . '" border="0" />';
}
#
#-----[ FIND ]------------------------------------------
#
'POSTER_JOINED' => $poster_joined,
'POSTER_POSTS' => $poster_posts,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POSTER_STATUS' => $status,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/Viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_AGE}<br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br />
#
#-----[ AFTER, ADD ]------------------------------------------
#
{postrow.POSTER_STATUS}</span><br />
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/SubSilver.cfg
#
#-----[ FIND ]------------------------------------------
#
$images['icon_newest_reply'] = "$current_template_images/icon_newest_reply.gif";
#
#-----[ AFTER, ADD ]------------------------------------------
#
$images['Online'] = "$current_template_images/online.gif";
$images['Offline'] = "$current_template_images/offline.gif";
# That's It!
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM