Online Ofline Status in der viewtopic mit Gif?
Verfasst: 29.05.2003 00:24
Habe diesen Mod in mein Board eingebaut ....
der funtioniert auch wenn man anstelle von
Dies hier verwendet
Nun möchte ich aber anstatt des textes Gif´s anzeigen lassen dazu gibt es diesen zusatz Mod ....
Aber den bekomme ich in mein 2.0.4 nicht verbaut weil ich dies hier
Nicht habe
Kann mir mal jemadn helfen oder den Mod mal auf den aktuellen stand es 2.0.4 bringen....
Ich bin dazu leider zu php unerfahren Mods einbauen ist die eine sache aber php von der Funktion her verstehen die andere
Code: Alles auswählen
########################################################
## Mod Title: Show Online In View Topic
## Mod Version: 2.0.0
## Author: AJ Quick, (http://www.ajquick.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
##
## Portions of this script were inspired/written by
## other people. I can only claim partial credit.
##
## Installation Level: Easy
## Installation Time: 1-2 Minutes
## Files To Edit: 2
## viewtopic.php
## /templates/SubSilver/Viewtopic_body.tpl
##
##########################################################
##
## Installation Notes:
##
## There is some customization that will need to be
## done in Viewtopic_body.tpl It is really up to you
## where you want it to be placed.
##
########################################################
#
#-----[ OPEN ]------------------------------------------
#
Viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
u.user_allowavatar, u.user_allowsmile,
#
#-----[ ADD AFTER ]------------------------------------------
#
u.user_allow_viewonline, u.user_session_time,
#
#-----[ FIND ]------------------------------------------
#
//
// Again this will be handled by the templating
// code at some point
//
$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/)
if($postrow[$i]['user_session_time'] >= (time()-60)){
if($postrow[$i]['user_allow_viewonline']){
$status = '<b><a href="viewonline.php">Online!</a></b>';
}else{
$status = "Offline";
}
}else{
$status = "Offline";
}
#
#-----[ FIND ]------------------------------------------
#
'POSTER_JOINED' => $poster_joined,
'POSTER_POSTS' => $poster_posts,
#
#-----[ AFTER, ADD ]------------------------------------------
#
'POSTER_STATUS' => $status,
#
#-----[ OPEN ]------------------------------------------
#
templates/SubSilver/Viewtopic_body.tpl
#
#-----[ FIND: Something Similar ]------------------------------------------
#
<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 /><br /><div align="center">{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}</div><br /><br /> {postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}</span></td>
#
#-----[ Somewhere... ADD ]------------------------------------------
#
Status: {postrow.POSTER_STATUS}
# That's It!
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Code: Alles auswählen
Viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
u.user_allowavatar, u.user_allowsmile,
#
#-----[ ADD AFTER ]------------------------------------------
#
u.user_allow_viewonline, u.user_session_time, Code: Alles auswählen
Open the viewtopic.php and find
Zitat:
//
// Output page header
//
$page_title = $lang['View_topic'] .' - ' . $topic_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
Change this to
Zitat:
//
// Output page header
//
define('SHOW_ONLINE', true);
$page_title = $lang['View_topic'] .' - ' . $topic_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
Code: Alles auswählen
#################################################################
## Mod Title: Online/Offline
## Mod Version: 1.0.0
## Author: Unknown Author
## John B. Abela <abela@phpbb.com>
## stitch626
##
## Description: This MOD will place a "Online" or "Offline" (or images) within viewtopic.php
##
## Installation Level: Easy
## Installation Time: 5
## Files To Edit: viewtopic.php
## templates/xxxx/viewtopic_body.tpl
## Included Files:
## online.gif (gathered from: http://www.phpbb2-users.de/)
## offline.gif (gathered from: http://www.phpbb2-users.de/)
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
##
## I (John B. Abela) really do not know who originally wrote this MOD.
## it has been sitting around since early RC-X and has been requested a lot
## so I figured I'd just document and package it for everyone.
##
## I gathered the images from http://www.phpbb2-users.de/
##
## I have attempted to give credit to as many people as possible,
## in the spirit of phpBB's GPL.
##
##
## I have also included two methods, both textual and graphical.
## I have tried to document it well enough for even the newest of newbies.
##
## If you use the graphical version upload the images into:
## templates/xxxx/images/
##
## History:
## ------------
## 1.0.0 - Initial Release - 5/19/2002
##
#################################################################
## 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,
#
#-----[ ADD AFTER ]------------------------------------------
#
u.user_allow_viewonline, u.user_session_time,
#
#-----[ FIND ]------------------------------------------
#
'POSTER_FROM' => $poster_from,
'POSTER_AVATAR' => $poster_avatar,
#
#-----[ ADD AFTER ]------------------------------------------
# NOTE: If you have adjusted your session-time, do not forget
# to change 300 to whatever you use.
#
# TEXTUAL VERSION
#
'POSTER_ONLINE' => (($postrow[$i]['user_session_time'] >= ( time() - 300 )) && ($postrow[$i]['user_allow_viewonline'])) ? '<span style="color:green;">Online</span>' : '<span style="color:red;">Offline</span>',
#
# GRAPHICAL VERSION
#
'POSTER_ONLINE' => (($postrow[$i]['user_session_time'] >= ( time() - 300 )) && ($postrow[$i]['user_allow_viewonline'])) ? '<img src="' . $images['Online'] . '" alt="' . $lang['Online'] . '" title="' . $lang['Online'] . '" border="0" />' : '<img src="' . $images['Offline'] . '" alt="' . $lang['Offline'] . '" title="' . $lang['Offline'] . '" border="0" />',
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{postrow.POSTER_FROM}</span><br />
#
#-----[ REPLACE BY ]------------------------------------------
#
{postrow.POSTER_FROM}<br />
{postrow.POSTER_ONLINE}</span><br />
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoMCode: Alles auswählen
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
u.user_allowavatar, u.user_allowsmile,
#
#-----[ ADD AFTER ]------------------------------------------
#
u.user_allow_viewonline, u.user_session_time,
Kann mir mal jemadn helfen oder den Mod mal auf den aktuellen stand es 2.0.4 bringen....
Ich bin dazu leider zu php unerfahren Mods einbauen ist die eine sache aber php von der Funktion her verstehen die andere