Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by Mystics Mystics is offline
Developer Last Online: Jun 2015 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-10-2002 Last Update: Never Installs: 339
 
No support by the author.

Hack Name: Who was online today
Hack Version: 1.0.2
For vB Version:: 2.x
Originally Created by: genial @ Skats Board (Contact)
Documentation, Translation, a few changes and posted by: Mystics

Description:
This Hack adds something like the "Currently Active Users:"-Feature of vBulletin.
The difference is, instead of showing the users, who are currently online, it shows
all Users, who were online on a day and it also displays "Most users ever online on a day".

Summary of the Features:
  • Shows "Number of Active Users Today"
  • Shows "Most users ever online on a day"
  • Shows last online time for each User while pointing the Mouse Cursor on it's name (=mouseover) in the list
Important: The Hack only works 100% correct, when each member is in the same time zone as the Server!

Files to edit: index.php
Templates to edit: forumhome
New Templates: forumhome_todayloggedinusers, forumhome_todayloggedinuser

I have attached the Install Instructions in a Text File.
The Instruction is in English and in German.

I will attach a Screenshot in a Reply to this Thread!

Post any Questions into this Thread!

Updates in 1.0.1: Inserted the two new templates into the template precaching (first step)

Updates in 1.0.2: Fixed a little Bug with the "Most users ever online on a day"-Count
(Replace '$maxusers[2] = $todayonline;' with '$maxusers[2] = $numbertodayonline;' in index.php)

Info: You can find an other version of this Hack here. In this other version the usernames of the members, who were already online today, are not shown on the Forum-Mainpage; the names are shown in an extra File (like online.php), onlinetoday.php (Screenshot).

So, depending on which version of the Hack you prefer, you have to download this:
Version with usernames on the main Site of the Forum

or this:
Version with usernames on extra site (onlinetoday.php)

Regards,
Mystics

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #212  
Old 07-07-2002, 08:28 AM
69-FLy-gUy's Avatar
69-FLy-gUy 69-FLy-gUy is offline
 
Join Date: Oct 2001
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so... has anyone figured out the timezone problem?
Reply With Quote
  #213  
Old 07-08-2002, 11:08 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed on 2.2.6 and working well. Thanks!
Reply With Quote
  #214  
Old 07-09-2002, 02:25 AM
Schorsch's Avatar
Schorsch Schorsch is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for this nice hack!! seems to work fine up to now.

what about the timezone ?? what happens when not ALL users have the same time zone like the server ?
Reply With Quote
  #215  
Old 07-10-2002, 11:10 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I stop admins from being italicized in this hack? Thanks in advance for your help.
Reply With Quote
  #216  
Old 07-11-2002, 01:09 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by GamerForums
How can I stop admins from being italicized in this hack? Thanks in advance for your help.
Replace this
Code:
    if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
      $username = "<b><i>$todayuser[username]</i></b>";
    } else if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
      $username = "<b>$todayuser[username]</b>";
    } else {
      $username = $todayuser['username'];
    }
with:
Code:
    if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
      $username = "<b>$todayuser[username]</b>";
    } else {
      $username = $todayuser['username'];
    }
Reply With Quote
  #217  
Old 07-11-2002, 02:50 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks very much, this is a fantastic addition to my forums!
Reply With Quote
  #218  
Old 07-11-2002, 06:45 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We'll I'm still having that query problem, what is the status on that Mystics? I sent that PM to you with my debug query info a while ago

edit:
How strange, I just uncommented the code and I'm only getting 27 queries (an increase of 2). Although I'm running my forums currently on my computer, but this is strange...hopefully it doesn't go back when I upload to my server..
Reply With Quote
  #219  
Old 07-11-2002, 07:44 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Velocd

Sorry, I think I have forgotten you

I also had only 27 Querys when I used your index.php.

I don't know why there are more querys when you use it on your server.
Reply With Quote
  #220  
Old 07-15-2002, 03:27 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heh, this problem has turned very strange. On my localserver running on my computer, my forum with this hack installed generates just 27 queries. All files on my localserver are EXACTLY the same as the ones running on my webserver. Well, my forums on my webserver with this hack installed generate 43 queries. :dead:

When I comment out the hack I get down to 23 queries. So this appears to be some type of weird database error, since I'm sure it's not in the files. Anyway to zero in on the source of the problem? If it's a database glitch or something.. where might I start looking?
Reply With Quote
  #221  
Old 07-15-2002, 03:37 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, my forum isn't even generating 43 queries anymore with this on, it's generating 49..*dies*
There is something screwed up in my database for sure...
Reply With Quote
  #222  
Old 07-26-2002, 10:56 PM
c-pr0mpt's Avatar
c-pr0mpt c-pr0mpt is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On a forum I work on, the todaylogged in users shows the correct number to me if I am logged in as admin, but if I log out or sign in under a normal user it doesnt count invisible users.

Now I know about the fix to changing the code to $numbertodayonline

But it doesnt work. It still stays the same. Any help?

Here is my code in index.php
Code:
// today online hack begin
  if ((int)$maxusers[0] <= $totalonline) {
    $time = time();
    $maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
    $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
    $maxusers[0] = $totalonline;
    $maxusers[1] = $time;
  }

  $todayloggedinusers = "";
  $numbertodayonline = 0;
  $numbertodayonlineinvisible = 0;

  $todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, invisible FROM user 
                WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . " 
                ORDER BY username");
  while ($todayuser=$DB_site->fetch_array($todayusers)) {
    $numbertodayonline++;
    if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
      $numbertodayonlineinvisible++;
      continue;
    }
  }

  $DB_site->free_result($todayusers);

  if ($bbuserinfo[usergroupid] == 6) {
    $todayonline = $numbertodayonline;
  } else {
    $todayonline = $numbertodayonline - $numbertodayonlineinvisible;
  }
  
  if ((int)$maxusers[2] <= $numbertodayonline) {
    $time = time();
    $maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . $time;
    $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
    $maxusers[2] = $numbertodayonline;
    $maxusers[3] = $time;
  }
  
  $todayrecordusers = $maxusers[2];
  $todayrecorddate = vbdate($dateformat,$maxusers[3]);
  
  eval("\$todayloggedinusers = \"".gettemplate('forumhome_todayloggedinusers')."\";");
//today online hack end
And in te template I am using, $numbertodayonline.

Thanks!
Reply With Quote
  #223  
Old 08-06-2002, 04:19 AM
Schorsch's Avatar
Schorsch Schorsch is offline
 
Join Date: Jul 2002
Location: Germany
Posts: 345
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here the ultimate question :banana:

besides the number of registered members, how can I show the total number of guests who were online ?

I saw this feature on a phpBB2 board, take a look at the screenshot.

isn't there a possibility to realize this cool feature for the hack for vBulletin ???

thanks,
Schorsch
Reply With Quote
  #224  
Old 08-08-2002, 01:34 AM
disillusioned disillusioned is offline
 
Join Date: Aug 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Parse errors hurt my brain...

I followed every step of this hack from beginning to end... And ended up with happy spiffy parse errors... I'm not sure why- Also, we use .php3 files for all of our forums... Now, I'll upload it and all user or $forum relative data is missing- including avatars, status, post counts, and everything else..
I also had a very similar- almost identical parse error with the 'what style are we all using' hack... I'm not sure why this is- I'm uploading in ASCII and everything... but it's quite frustrating to do all that vigorous copy/pasting ;-) and find your board all that much more worse for wear.

Would anyone like to cue me on on how stupid I'm being?
I'd greatly appreciate it!
Reply With Quote
  #225  
Old 08-10-2002, 07:37 AM
Tony G's Avatar
Tony G Tony G is offline
 
Join Date: Nov 2001
Location: Melbourne, Australia
Posts: 8,357
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry for bumping, but there is a problem.

The time for when the most users online isn't working. Everything else works okay.

Any ideas?
Reply With Quote
  #226  
Old 08-10-2002, 08:06 AM
Beams Beams is offline
 
Join Date: Mar 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed fine but noticed it only starts counting the user online from 12midday it seems to work fine until 5-6 am then its back to 0 users. The problem is it doesn't count any users online until 12 midday again so missing 6 hours any ideas why??

Ideally it would be best if it would work from 12 midnight to 12 midnight

Great hack btw

Thanks for any help

Beams
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 06:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07939 seconds
  • Memory Usage 2,371KB
  • Queries Executed 30 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete