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
  #82  
Old 01-22-2002, 02:19 PM
SWFans.net's Avatar
SWFans.net SWFans.net is offline
 
Join Date: Oct 2001
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great. Thanks again.
Reply With Quote
  #83  
Old 01-25-2002, 12:30 PM
Wolf42's Avatar
Wolf42 Wolf42 is offline
 
Join Date: Nov 2001
Location: Vienna, Austria, Europe
Posts: 150
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dein Hack funzt tadellos! THX!!
Reply With Quote
  #84  
Old 01-28-2002, 03:24 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very very useful hack, but I have some synchro problem... :greedy:

Installation type #1: I definetively don't think the followin code finds out the right midnight time when the server hasn't the same user's time zone... leased:
PHP Code:
WHERE lastactivity " . mktime(0,0,0,date("m"),date("d"),date("Y")) . " 
???

Thanks a lot.
Bye
Reply With Quote
  #85  
Old 01-28-2002, 03:41 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by genial
[...]and replace this line:
PHP Code:
$unixtoday $bbuserinfo[timeoffset] * 3600 $unixtoday
with this:
PHP Code:
$unixtoday $unixtoday + ($bbuserinfo['timezoneoffset'] - $timeoffset) * 3600
and test it again.
i hope so it will work well. please give me your feedback about it.
Excuse me.
If you make the correction to $unixtoday between the two SELECTs, you'll obtain different results from SELECT COUNT and SELECT... Shouldn't you ?

I think it should be bette place the
PHP Code:
$unixtoday $unixtoday + ($bbuserinfo['timezoneoffset'] - $timeoffset) * 3600
right after the first $unixtoday = assignment.

Do you agree ?
Reply With Quote
  #86  
Old 01-28-2002, 09:38 PM
genial's Avatar
genial genial is offline
 
Join Date: Nov 2001
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The problem is, if the timezone of a member is -5 cet and another user has +7 cet, then there are problems with the correct count of today-online-record. Therefore, for the online record counts it has to be taken an uniform timezone, namely the servertime.
To reset the display of the today-online-member-names at 0:00 hours of his time zone the display of the today-member-names has to be called up separately at his timezone.

I have a solution for this problem in my head, but momentarely i don't have the time to realize this. therefore it needs much more time to release the new version of this hack, that includes a fix for this problem. to this point the present hack works only 100%, when each member is in the same timezone as the server.
Reply With Quote
  #87  
Old 01-29-2002, 08:23 AM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah. Infact yesterday I applied the hack and found about 270 users from the midnight with all your corrections.
Today I have 0 (zero!) users, according to the same hack...

Actually I think the traslation you made to $unixtoday var had the wrong sign ... :?:

I though to a simpler solution, I guess.
Simply, replace in the ORIGINAL HACK CODE:
PHP Code:
mktime(0,0,0,date("m"),date("d"),date("Y")); 
with:
PHP Code:
mktime($timeoffset-$bbuserinfo['timezoneoffset'],0,0,date("m"),date("d"),date("Y")); 
This should traslate the server's midnight time towards the user one.

What do you thin about ?
Reply With Quote
  #88  
Old 01-29-2002, 08:43 AM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mystics
[...]"Most users ever online on a day".
[...]Greetz,
Mystics
Excuse me. I don't understand how this hack make the difference between storing into db the maxusers of the original VB index.php and the maxusers for the entire day.
It seems these two numbers are stored in the same field of the same table, and the second overwrites the first one.

Mystics, please, could you explain better those steps:
PHP Code:
  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;
  }

  [...]
  [...]
  [...]
  
  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;
  } 
Thanks a lot.
Bye
Reply With Quote
  #89  
Old 01-29-2002, 11:35 AM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Jawelin
Mystics, please, could you explain better those steps
The records are stored in the Template maxloggedin

Before the hack: only the number and the Time of the "Most users ever online at the same time" was stored in this Template.

Therefore the content looked like:
Code:
21 1010710015
21 = $maxusers[0] = $totalonline = Number of the "Most users ever online at the same time"
1010710015 = $maxusers[1] = $time = Unix-Time of the moment when the record was reached

After the Hack: First the number and the Time of the "Most users ever online at the same time" and then the number and the Time of the "Most users ever online on a day" is stored in this Template.

Therefore the content look like:
Code:
21 1010710015 84 1010530336
84 = $maxusers[2] = $numbertodayonline = Number of the "Most users ever online on a day"
1010530336 = $maxusers[3] = $time = Unix-Time of the moment when the record was reached
Reply With Quote
  #90  
Old 01-29-2002, 02:00 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot for such an exaustive answer.
I asked because, after having installed the hack for two days, I always got 0 as the maximum value and today as the date.
But I think it was due to the timezone problem.
About that, what do you think about my simple workaround of your hack code (3 posts above here) ?
Quote:
Originally posted by Jawelin
Simply, replace in the ORIGINAL HACK CODE:
PHP Code:
mktime(0,0,0,date("m"),date("d"),date("Y")) 
with:
PHP Code:
mktime($timeoffset-$bbuserinfo['timezoneoffset'],0,0,date("m"),date("d"),date("Y")) 
This should traslate the server's midnight time towards the user one.
Thanks again.
Reply With Quote
  #91  
Old 01-30-2002, 04:17 AM
zadi zadi is offline
 
Join Date: Jan 2002
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On our forums we use the colored users online hack which colorizes members by usergroups. When we added the "Who-was-Online-Today" we noticed that it showed up in "black" (our link color). Well we wanted one that matched the colors shown in the CUO hack and so my co-admin hacked the hack. Enjoy. Remember to modify $mod["$userid"] or $todayuser['usergroupid'] == # to reflect your usergroup colors & ids.


created by genial @http://www.skats-board.de (eMail: phenomenal_genial@hotmail.com)
documentation & posted (with a few little changes) by Mystics (eMail: mystics27@gmx.net)

Modified by The Tech for Zadi
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:40 AM.


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.05001 seconds
  • Memory Usage 2,347KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (9)bbcode_php
  • (4)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
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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