Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
24h Visitors' Statistics (members and guests) Details »
24h Visitors' Statistics (members and guests)
Mod Version: 1.00, by Olsufr (Member) Olsufr is offline
Developer Last Online: Mar 2005 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.6 Rating: (1 vote - 5.00 average) Installs: 28
Released: 13 Feb 2005 Last Update: Never Downloads: 30
Not Supported  

A very simple display of statistics of all visitors (members and guests) who have visited the forum last 24 hours.

It displays the statistics on Forum Home in the section of "Users online":

example: " Total users last 24h: 2692 (members : 741, guests : 1951) "

There is no additional SQL query.

----------------------------------

Installation (there is in attached file)

Step 1

In index.php

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And insert this code before it:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 2

In includes/cron/cleanup.php
and in includes/cron/cleanup2.php

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And replace with this code:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 3

Add new phrase

Phrase Type: GLOBAL
Varname: active_users_24h
Text:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Step 4

FORUMHOME template modification

Find:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and replace with:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

END

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	24h_visitors_statistics_vb3.gif
Views:	970
Size:	4.9 KB
ID:	23936  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Mini Mods Scare your members and visitors! ^^ NeutralizeR vBulletin 3.6 Template Modifications 58 21 Jan 2009 04:46
Adsense, different sizes for visitors to members MadKad vBulletin 3.6 Template Modifications 25 16 Jul 2008 21:20
Adsense, different sizes for visitors to members Ė under last post MadKad vBulletin 3.5 Template Modifications 55 23 Apr 2007 11:26

  #16  
Old 16 Feb 2005, 01:00
Olsufr Olsufr is offline
 
Join Date: Feb 2003
Elfo King, there is the answer:
Your statistics must be collected.

Originally Posted by Olsufr
the code is right.
My hack shows visitor's statistics and indicates real time for it.
For example, if there are sessions in your SESSIONS table in DB only for 1 hour,
this hack shows as you say:
Total users last 1h: 49 (34 members and 15 guests)
It is start only.

Later your statistics will be collected more and more hour by hour.
And after 24 hours hack will show statistics for 24 hours (no more).
Reply With Quote
  #17  
Old 16 Feb 2005, 18:59
Elfo King Elfo King is offline
 
Join Date: Apr 2003
Location: Pisa-Italy
Ehm, sorry....
Another question:
Where i can change the statistics for collect more hours?
I need to change the value of the Hourly Cleanup #1 and/or Hourly Cleanup #2 ?

Thx
Reply With Quote
  #18  
Old 17 Feb 2005, 02:10
Rids's Avatar
Rids Rids is offline
 
Join Date: Aug 2002
Real name: Steve
I've had it installed for over 36 hours now and its still showing figures for 1h. In fact the figures seem to be all over the place:

Total users last 1h: 109 (94 members and 15 guests)

10 minutes later ...

Total users last 1h: 200 (181 members and 19 guests)

The actual number of active members that have been to the site all day is only 70 so where it is getting these figures from I have no idea. Could it be counting each and every visit by each member maybe?

Last edited by Rids; 17 Feb 2005 at 02:23.
Reply With Quote
  #19  
Old 17 Feb 2005, 04:07
neocorteqz's Avatar
neocorteqz neocorteqz is offline
 
Join Date: May 2002
Real name: George E Collins Jr
Originally Posted by Rids
I've had it installed for over 36 hours now and its stillshowing figures for 1h. In fact the figures seem to be all over theplace:

Total users last 1h: 109 (94 members and 15 guests)

10 minutes later ...

Total users last 1h: 200 (181 members and 19 guests)

The actual number of active members that have been to the site all dayis only 70 so where it is getting these figures from I have no idea.Could it be counting each and every visit by each member maybe?
Including Revisits from members, At least i think, as there reallyisn't a way of counting without checking against IP address.
Reply With Quote
  #20  
Old 17 Feb 2005, 15:05
Olsufr Olsufr is offline
 
Join Date: Feb 2003
Originally Posted by Elfo King
Another question:
Where i can change the statistics for collect more hours?
I need to change the value of the Hourly Cleanup #1 and/or Hourly Cleanup #2 ?
Yes. To have statistics more than during 24 hours
you have to change this in my hack
(in includes/cron/cleanup.php
and includes/cron/cleanup2.php):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

where instead of 1 you can write another number (number of days of statistics)




and in index.php instead of this (lines of hack):


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

write:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

where instead of 1 you can write another number (number of days of statistics)

Last edited by Olsufr; 17 Feb 2005 at 15:14.
Reply With Quote
  #21  
Old 18 Feb 2005, 04:48
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Real name: Ace
Yup, same here.

http://forums.nzboards.com

I think I saw 2 hours once, but that was it.

*edit* Ahh, I was a moron.

You have to edit both of the /includes/cron/ files (as per the instructions), or it doesn't work.
__________________
vBulletin Styles (All styles compatible with 3.8.4 - Steel Blue 4.0 Available) | vBulletin Hosting

Last edited by kall; 20 Feb 2005 at 08:59.
Reply With Quote
  #22  
Old 22 Feb 2005, 22:14
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Tried this hack .. idea is good but every time a member comes back to the main page the stats jump up in number = to the number of members / guests viewing main page.

Every main page refresh adds the number of existing viewers to the exisiting total.
Reply With Quote
  #23  
Old 23 Feb 2005, 14:55
Omega Prime's Avatar
Omega Prime Omega Prime is offline
 
Join Date: Sep 2002
Guess this didn't work out...

I added this hack, but like most peple here, I noticed how the member stats kept rising whenever anyone (whether it was someone who visited just now or 10min ago) would add to the stats. After removing it from forumhome (since I was gonna see about working with it later) and adjusting the clock on the server, it shows over 2000 members online! It caused the CPU to max out to 100%, to the point where I had to close the forum and delete the sessions. It seems things are up and running again, but now it shows "Most users ever online was 2142, Today at 09:21 AM.", as well as showing members who are online when they shouldn't be online (within showthread) =/
Reply With Quote
  #24  
Old 24 Feb 2005, 00:59
Olsufr Olsufr is offline
 
Join Date: Feb 2003
TTG, it is using standard (for vB3) online system. I didn't change anyone here.
Reply With Quote
  #25  
Old 16 Mar 2005, 03:25
whelck whelck is offline
 
Join Date: Jun 2004
Whatever this is doing isn't right. It says in the past 7 hours I've had 4974 members and 576 guests. I don't even have that many registered members.

*uninstalls*
Reply With Quote
  #26  
Old 18 Mar 2005, 20:55
xtreme-mobile xtreme-mobile is offline
 
Join Date: Jul 2004
am i doing something wrong?

mine just shows like this.... (see screen shot

it just shows amount of threads and thats about it
Attached Files
File Type: doc mod.doc (95.0 KB, 12 views)
Reply With Quote
  #27  
Old 19 Mar 2005, 03:13
Neutral Singh's Avatar
Neutral Singh Neutral Singh is offline
 
Join Date: Sep 2004
Real name: Aman Singh
Thank You, I was looking for this modification for a long long time !!
Reply With Quote
  #28  
Old 19 Mar 2005, 07:10
KanyeWest's Avatar
KanyeWest KanyeWest is offline
 
Join Date: Dec 2004
Real name: A
this hack i still use today from first realease its awseom

Total users last 24h: 542 (345 members and 197 guests)

www.idenonfire.com/forums/ still usin proudly

Last edited by KanyeWest; 19 Mar 2005 at 07:12.
Reply With Quote
  #29  
Old 14 Apr 2005, 15:17
Neutral Singh's Avatar
Neutral Singh Neutral Singh is offline
 
Join Date: Sep 2004
Real name: Aman Singh
Activity during last 24 hour(s): 891 (74 members and 817 guests and [ARG:3 UNDEFINED] spiders)
Ever since i installed that hack to show web spiders on who is online... the above error is bold is showing up. I think in the following code another query about the spiders has to added... Olsufr, it would be wonderful if you could provide the code for adding the count for spiders too... best regards.


// ############# Oleg Subel - 24h visitors' statistics ###############

$datecut24 = TIMENOW - 86400;
$numberregistered24 = 0;
$numberguest24 = 0;

$forumusers24 = $DB_site->query("
SELECT userid, lastactivity FROM " . TABLE_PREFIX . "session
WHERE lastactivity > $datecut24
");

$time24 = TIMENOW ;
while ($loggedin24 = $DB_site->fetch_array($forumusers24))
{
$userid24 = $loggedin24['userid'];
if (!$userid24)
{ // Guest
$numberguest24++;
}
else
{
$numberregistered24++;
}
if ($loggedin24['lastactivity'] < $time24)
{
$time24 = $loggedin24['lastactivity'];
}
}
$time24 = TIMENOW - $time24;
$time24 = floor($time24 / 3600) + (($time24 % 3600) ? 1 : 0);

$numbertotal24 = $numberregistered24 + $numberguest24;

// memory saving
unset($loggedin24);
$DB_site->free_result($forumusers24);
// ############# End of 24h visitors' statistics ###############
Reply With Quote
  #30  
Old 14 Apr 2005, 15:29
eva01_'s Avatar
eva01_ eva01_ is offline
 
Join Date: Aug 2004
Real name: Justin
to get rid of that bold error you have to check your file changes again and make sure you did the template changes as well
__________________
My calculations were that he could have talked you into suicide within fourteen minutes.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:17.

Layout Options | Width: Wide Color: