.. users active over the past five minute ; change duration

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
glesaux
Registered User
Posts: 18
Joined: Tue Aug 02, 2005 10:54 am

Post by glesaux »

hehehe guys...btw thanks marshall.i already edit the file,will let you know when users start logging in.
User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29295
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Post by Marshalrusty »

Very Welcome :wink:
Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di »

Marshalrusty wrote: Very Welcome :wink:


It should work. :wink:
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
User avatar
tomharrybill
Registered User
Posts: 35
Joined: Sat May 21, 2005 11:29 pm

Post by tomharrybill »

3Di wrote:
tomharrybill wrote: I can't find this: Open root/viewonline.php


root means you forum root, ie: http://yourdomain/phpbb/ do you get the point now?


Thank you, yes.

:D
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di »

tomharrybill wrote:
3Di wrote:
tomharrybill wrote: I can't find this: Open root/viewonline.php


root means you forum root, ie: http://yourdomain/phpbb/ do you get the point now?


Thank you, yes.

:D


;)
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
glesaux
Registered User
Posts: 18
Joined: Tue Aug 02, 2005 10:54 am

Post by glesaux »

ok guys,

it works but only on :

http://www.myforumurl.com/forum/viewonline.php
( There are 31 Registered users and 1 Hidden user online )


but on forum index at the bottom of the page it still shows data for the past five minutes.

(In total there are 8 users online :: 4 Registered, 1 Hidden and 3 Guests [ Administrator ] [ Moderator ] )

any clues guys ? marshall ?
User avatar
3Di
Former Team Member
Posts: 16039
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Post by 3Di »

I guess you should also edit: includes/page_header.php

FIND:

Code: Select all

			AND s.session_time >= ".( time() - 300 ) . "
replace 300 with the time in seconds you stated on to your previous MOD in viewonline.php.

Hope this will be enought yet.. :)
To request support for our extensions you can also contact me here: phpBB Studio

Please PM me only to request paid works. Thx. Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
🚀 Looking for a specific feature or alternative option? We will rock you! 🚀
SteeLx
Registered User
Posts: 97
Joined: Mon Mar 19, 2007 10:18 am

Re:

Post by SteeLx »

Marshalrusty wrote:
glesaux wrote: i need to show there are lot of users browsing my forum.
with "active users for the past 5 minutes" didnt help me much.


Man oh man did you phrase it incorrectly in your first post.

Open root/viewonline.php
Find:

Code: Select all

$sql = "SELECT u.user_id, u.username, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time, s.session_page, s.session_ip
	FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
	WHERE u.user_id = s.session_user_id
		AND s.session_time >= ".( time() - 300 ) . "
	ORDER BY u.username ASC, s.session_ip ASC";
Replace the "300" with the new time (in seconds)

You may also want to change the "This data is based on users active over the past five minutes" message to reflect the new value. To do this open root/language/lang_english/lang_main.php
Find:

Code: Select all

$lang['Online_explain'] = 'This data is based on users active over the past five minutes';
And replace with the appropriate number of minutes.

Hope this helps
Thanks , it HELPed me too :)
Locked

Return to “2.0.x Support Forum”