MOD - online/offline


Лесен МОД за phpBB форуми.
Показва статуса на потребителя (под аватара)
Демо може да видите в форума на http://web-tourist.net/forum/.



########################################################
## 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.
##
########################################################

#
#-----[ отвори файла]------------------------------------------
#

Viewtopic.php

#
#-----[ намери следния код]------------------------------------------
#

u.user_allowavatar, u.user_allowsmile,

#
#-----[ добави след него]------------------------------------------
#

u.user_allow_viewonline, u.user_session_time,

#
#-----[намери следния код ]------------------------------------------
#

//
// 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'];

#
#-----[ добави след него ]------------------------------------------
#

//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";
}

#
#-----[ намери следния код]------------------------------------------
#

'POSTER_JOINED' => $poster_joined,
'POSTER_POSTS' => $poster_posts,

#
#-----[ добави след него]------------------------------------------
#

'POSTER_STATUS' => $status,

#
#-----[ отвори ]------------------------------------------
#

templates/SubSilver/Viewtopic_body.tpl

#
#-----[ намери нещо подобно на ]------------------------------------------
#

<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>

#
#-----[ и добави някъде]------------------------------------------
#

Status: {postrow.POSTER_STATUS}

# това е!
#
#-----[ записваш файловете и готово ]------------------------------------------
#
# EoM


Ако има проблеми питайте тук:


http://www.web-tourist.net/forum/viewforum.php?f=6.



1




/ Трябва да сте регистриран за да напишете коментар /
От: ReD_z0n3
21:50 15-01-2010
{postrow.POSTER_NAME}{postrow.POSTER_RANK}{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR} {postrow.POSTER_JOINED}{postrow.POSTER_POSTS}

Този код започва от ред 29
1