#################################################################
## 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 ]------------------------------------------
#
# EoM