[2.0.21] Show Last Visited Users

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply

Rating:

Excellent!
16
73%
Very Good
1
5%
Good
3
14%
Fair
1
5%
Poor
1
5%
 
Total votes: 22

chatasos
Registered User
Posts: 748
Joined: Wed May 15, 2002 1:16 pm
Location: Paralia

Post by chatasos »

Yes, the "{%:1}" means increase the number found there by one.

Report Posts 1.2.3c (MODDB) - Report Posts 2.1.5 (ALPHA)
Rebuild Search 2.4.0 (MODDB)
MOD Version Checker 1.2.0 (MODDB)
Mega Mail System 0.9.8 (ALPHA)
Pagination Select List & Input Box (MODDB)
unand
Registered User
Posts: 63
Joined: Sun Oct 08, 2006 6:03 pm
Contact:

Post by unand »

ok, thanks for that. I have now changed the "2" to a "3"
but I still cant find this;
<td class="row1" align="center" valign="middle" rowspan="{%:1}">

I have a feeling that I should be changing this;
<td class="row1" align="center" valign="middle" rowspan="2">
to this;
<td class="row1" align="center" valign="middle" rowspan="{%:1+1}">

cheers
Last edited by unand on Fri Oct 13, 2006 2:19 pm, edited 1 time in total.
chatasos
Registered User
Posts: 748
Joined: Wed May 15, 2002 1:16 pm
Location: Paralia

Post by chatasos »

unand wrote: ok, thanks for that. I have now changed the "2" to a "3"

but I still cant find this;

<td class="row1" align="center" valign="middle" rowspan="{%:1}">

cheers


unand , the code

Code: Select all

<td class="row1" align="center" valign="middle" rowspan="{%:1}"> 
means search for the above line, without taking into account the "{%:1}" part (this means any number could be in there). When you find this line, just increase the number you found in "{%:1}" by one.

So if you have
<td class="row1" align="center" valign="middle" rowspan="1">
you make it
<td class="row1" align="center" valign="middle" rowspan="2">

If you have
<td class="row1" align="center" valign="middle" rowspan="2">
you make it
<td class="row1" align="center" valign="middle" rowspan="3">

and so on...

Report Posts 1.2.3c (MODDB) - Report Posts 2.1.5 (ALPHA)
Rebuild Search 2.4.0 (MODDB)
MOD Version Checker 1.2.0 (MODDB)
Mega Mail System 0.9.8 (ALPHA)
Pagination Select List & Input Box (MODDB)
unand
Registered User
Posts: 63
Joined: Sun Oct 08, 2006 6:03 pm
Contact:

Post by unand »

chatasos wrote:
unand wrote:ok, thanks for that. I have now changed the "2" to a "3"

but I still cant find this;

<td class="row1" align="center" valign="middle" rowspan="{%:1}">

cheers


unand , the code

Code: Select all

<td class="row1" align="center" valign="middle" rowspan="{%:1}"> 
means search for the above line, without taking into account the "{%:1}" part (this means any number could be in there). When you find this line, just increase the number you found in "{%:1}" by one.

So if you have
<td class="row1" align="center" valign="middle" rowspan="1">
you make it
<td class="row1" align="center" valign="middle" rowspan="2">

If you have
<td class="row1" align="center" valign="middle" rowspan="2">
you make it
<td class="row1" align="center" valign="middle" rowspan="3">

and so on...

Thanks for that chatasos, I now understand.
cheers.
:)
JasonWade
Registered User
Posts: 287
Joined: Mon Jun 05, 2006 9:22 am

Post by JasonWade »

I'm installing this mod now (manually) for my templates and the mod itself is working fine, but for some reason the word moderator (at the bottom it says moderator and administrator in certain colors) is invisible now, does anyone know why this is happening?

*edit: figured out my mistake
starsapphire04
Registered User
Posts: 9
Joined: Wed Oct 25, 2006 2:27 am

Post by starsapphire04 »

i really can't install this one. coz i'm not using subsilver template.
User avatar
wick3d
Registered User
Posts: 44
Joined: Wed Dec 21, 2005 11:01 am

Post by wick3d »

Can we display the users visited in last 24 hours according to User Levels seprately.. like

For Eg:


Administrators : ......
Moderators : ......
Users : .....
Stacie
Registered User
Posts: 21
Joined: Thu Aug 31, 2006 6:15 am

Post by Stacie »

Ok- I absolutely love this mod!! I recently installed the Color Group Mod which requires you change the following string in includes/pageheader.php

from:

Code: Select all

$style_color = '';
				if ( $row['user_level'] == ADMIN )
				{
					$row['username'] = '<b>' . $row['username'] . '</b>';
					$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
				}
				else if ( $row['user_level'] == MOD )
				{
					$row['username'] = '<b>' . $row['username'] . '</b>';
					$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
				}
				if ( $row['user_allow_viewonline'] )
				{
					$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
					$logged_visible_online++;
				}
				else
				{
					$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
					$logged_hidden_online++;
				}
to:

Code: Select all

$user_online_link = color_group_colorize_name($row['user_id']);
				if ( $row['user_allow_viewonline'] )
				{
					$logged_visible_online++;
				}
				else
				{
					$logged_hidden_online++;
				}
this effectively changes the admin/mod colorgroups, but doesn't change the colors in the last visited.

i'm assuming i need to do something with this string from includes/pageheader.php:

Code: Select all

$style_color = '';
			if ( $row['user_level'] == ADMIN )
			{
				$row['username'] = '<b>' . $row['username'] . '</b>';
				$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
			}
			else if ( $row['user_level'] == MOD )
			{
				$row['username'] = '<b>' . $row['username'] . '</b>';
				$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
			}

			if ( $row['user_allow_viewonline'] )
			{
				$user_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
				$visible_lastvisit_users++;
			}
			else
			{
				$user_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
				$hidden_lastvisit_users++;
			}
but i've no clue what. i tried duplicating the change above and supplementing $hidden_lastvisit_users++; etc, but that didn't work.

any suggestions?
Crowndefender
Registered User
Posts: 301
Joined: Thu Jan 19, 2006 10:03 am
Location: Right here at PHPbb.com

Post by Crowndefender »

I want to combine this in my viewonline.php file,to show below as i dont want to clog my index. Can anyone write the install to suit?
I would try but i would rather someone with more expeirence to do it
ImagePHP BB Newbie.
Crowndefender
Registered User
Posts: 301
Joined: Thu Jan 19, 2006 10:03 am
Location: Right here at PHPbb.com

Post by Crowndefender »

Can anyone help?
ImagePHP BB Newbie.
Crowndefender
Registered User
Posts: 301
Joined: Thu Jan 19, 2006 10:03 am
Location: Right here at PHPbb.com

Post by Crowndefender »

Anyone?
ImagePHP BB Newbie.
User avatar
StangRalle
Registered User
Posts: 35
Joined: Sat Jan 07, 2006 7:16 pm

Post by StangRalle »

Hi, I installed the mod but get the following error:
Warning: sprintf() [function.sprintf]: Too few arguments in /home/rleyen/public_html/forum/includes/page_header.php on line 468


Any idea how to resolve this?
murnauvsbuñuel
Registered User
Posts: 177
Joined: Mon Jun 20, 2005 9:49 am

Post by murnauvsbuñuel »

have any different with this other mod?: Users of the day

Code: Select all

######################################################## 
## 
## MOD Title:   Users of the day
## MOD Version: 2.1
## Author:     ZoZo <zozo@etoiles.net> 
## 
## Description:  
## Displays, under the online users list, a list of the registered users
## who have visited during the last XX hours. Can also display the list
## of the users who didn't come. (see "Edit below")
## 
## Installation Level:  easy 
## Installation Time:  2-3 minutes 
## 
## Files To Edit:         3
##                   - /templates/subSilver/index_body.tpl
##                   - /language/lang_english/lang_main.php
##                   - /includes/page_header.php
## 
## Included Files:      None 
## 
######################################################## 
## VERSION HISTORY:
## 
## October 22th 2004: v2.1
## 1. Now admins are displayed first, then mods then users.
## 2. Corrected a problem in the text file with Easy Mod Installer.
## 
## June 20th 2003: v2.0
## 1. The list's delay is customizable, but you must give a number in hours, 24 by default.
## 2. There's now a counter for each list.
## 3. The MOD doesn't display the list of the users who didn't visit by default.
## 
## October 28th 2002: v1.1
## 1. The MOD uses the database variable "user_session_time" instead of "user_lastvisit", which is updated only when the user logs out.
##  
## October 15th 2002: v1.0
## 1. Created main features.
##    
######################################################## 
## TODO LIST:
## 
## 1. Don't restrict the time unit to hours.
## 
######################################################## 
##        PLEASE REPORT ANY BUGS OR SUGGESTIONS       ##
######################################################## 

# 
#-----[ ACTION: open ]---------------------------------
# 
/templates/subSilver/index_body.tpl
# 
#-----[ ACTION: find ]---------------------------------
# 
	<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
# 
#-----[ ACTION: replace by ]---------------------------
# 
	<td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
# 
#-----[ ACTION: find ]---------------------------------
# 
 	<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} &nbsp; [ {L_WHOSONLINE_ADMIN} ] &nbsp; [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td>
# 
#-----[ ACTION: add after ]----------------------------
# 
  </tr>
  <tr> 
	<td class="row1" align="left"><span class="gensmall">{USERS_OF_THE_DAY_LIST}</span></td>
# 
#-----[ ACTION: repeat for all templates ]-------------
# 



# 
#-----[ ACTION: open ]--------------------------------
# 
/language/lang_english/lang_main.php
# 
#-----[ ACTION: find ]--------------------------------
# 
$lang['Registered_users'] = 'Registered Users:';
# 
#-----[ ACTION: add before ]--------------------------
# 
$lang['Day_users'] = '%d registered users visit during the last %d hours:';
$lang['Not_day_users'] = '%d registered users <span style="color:red">DIDN\'T</span> visit during the last %d hours:';
# 
#-----[ ACTION: repeat for all languages ]------------
# 



# 
#-----[ ACTION: open ]--------------------------------
# 
/includes/page_header.php
# 
#-----[ ACTION: find ]--------------------------------
# 
	'LOGGED_IN_USER_LIST' => $online_userlist,
# 
#-----[ ACTION: add after ]---------------------------
# 
	'USERS_OF_THE_DAY_LIST' => $day_userlist,
# 
#-----[ ACTION: find ]--------------------------------
# 
//
// Obtain number of new private messages
// if user is logged in
//
# 
#-----[ ACTION: add before ]--------------------------
# 
//
// Users of the day MOD
//

// ############ Edit below ############
// #
$display_not_day_userlist = 0;	// change to 1 here if you also want the list of the users who didn't visit to be displayed
$users_list_delay = 24;		// change here to the number of hours wanted for the list
// #
// ############ Edit above ############

$sql = "SELECT user_id, username, user_allow_viewonline, user_level, user_session_time
	FROM ".USERS_TABLE."
	WHERE user_id > 0
	ORDER BY IF(user_level=1,3,user_level) DESC, username ASC";
if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain user/day information', '', __LINE__, __FILE__, $sql);
}

$day_userlist = '';
$day_users = 0;
$not_day_userlist = '';
$not_day_users = 0;

while( $row = $db->sql_fetchrow($result) )
{
	$style_color = '';
	if ( $row['user_level'] == ADMIN )
	{
		$row['username'] = '<b>' . $row['username'] . '</b>';
		$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
	}
	else if ( $row['user_level'] == MOD )
	{
		$row['username'] = '<b>' . $row['username'] . '</b>';
		$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
	}
	if ( $row['user_allow_viewonline'] )
	{
		$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
	}
	else
	{
		$user_day_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
	}
	if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
	{
		if ( $row['user_session_time'] >= ( time() - $users_list_delay * 3600 ) )
		{
			$day_userlist .= ( $day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
			$day_users++;
		}
		else
		{
			$not_day_userlist .= ( $not_day_userlist != '' ) ? ', ' . $user_day_link : $user_day_link;
			$not_day_users++;
		}
	}
}

$day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Day_users'], $day_users, $users_list_delay) ) . ' ' . $day_userlist;

$not_day_userlist = ( ( isset($forum_id) ) ? '' : sprintf($lang['Not_day_users'], $not_day_users, $users_list_delay) ) . ' ' . $not_day_userlist;

if ( $display_not_day_userlist )
{
	$day_userlist .= '<br />' . $not_day_userlist;
}

//
// End of MOD
//



# 
#-----[ ACTION: save/close all ]----------------------
# 

# 
#-----[ ACTION: upload the modified files ]-----------
# 

# 
#-----[ ACTION: enjoy ]-------------------------------
# 

# 
#-----[ PLEASE REPORT ANY BUGS OR SUGGESTIONS]--------
# 
sorry for my bad english i am spanish.
ImagemxBB Portal the best portal to phpBB2
D4V2K1
Registered User
Posts: 6
Joined: Mon Sep 19, 2005 8:56 pm

Post by D4V2K1 »

I have had this mod running on my graphite themed board with no problems for a while until today.

I changed the 'enable visual confirmation' from yes to no, in the admin panel, configuration, and since then the numbers of users and the names have not shown up.

All it says now is that there have been 0 users online and does not display any names, even tho many people have been online.

I have tried to go over all the relevant files etc but to no avail.

Can anyone help me please?
kaoruline^^
Registered User
Posts: 10
Joined: Wed Apr 12, 2006 8:45 pm

Post by kaoruline^^ »

Hi ^^

I installed the MOD and in my Forum it's like I never installed the MOD ...

I think the problem comes from the index_body.tpl

on the install.txt they say

#-----[ FIND ]------------------------------------------
#
<td class="row1" align="center" valign="middle" rowspan="{%:1}">

but that line don't exist on my TPL

I mean the line is there but in my TPL this part"rowspan=" don't exist ...

Must i create it ? please help ^^ :wink:
Post Reply

Return to “[2.0.x] MOD Database Releases”