Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Who Was Online Today on forums Details »»
Who Was Online Today on forums
Version: 1.00, by Gary King Gary King is offline
Developer Last Online: Jun 2020 Show Printable Version Email this Page

Version: 3.0.4 Rating:
Released: 01-02-2004 Last Update: 03-16-2004 Installs: 527
 
No support by the author.

PLEASE CLICK THE INSTALL BUTTON IF INSTALLED!

What does this hack do?

It shows the users who visited your forums in the last 24 hours (or today). This hack works similiarly like the one released for vBulletin 2.

NOTE: If you want to show 'Who was online today' on a separate page from forumhome, then download instructions-newpage.txt and onlinetoday.php instead of instructions-regular.txt

Modifications
  • 1 file modification
  • 3 template modifications
  • 0 queries to run

Features
  • supports and uses phrases
  • usernames are formatted properly
  • invisible users only show to people who are supposed to see them (admins and whoever else you allowed)
  • integrated (makes it so that the Who Was Online bar is now collapseable

Screenshots
Look below

Credits: Thanks goes to Mystics, where this hack is based on his

Show Your Support

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

Comments
  #62  
Old 01-09-2004, 12:00 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zeitgeist
That's the same problem I'm having, too. The hack isn't working! Didn't the author noticed that? Where's the bug? :ermm:
I have the same problem as them. The most users ever online in a day resets at midnight.

I will look and see if i can figure out what is going on in a little while.
Reply With Quote
  #63  
Old 01-09-2004, 12:08 PM
Zeitgeist Zeitgeist is offline
 
Join Date: May 2002
Location: Europe
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by eXtremeTim
I have the same problem as them. The most users ever online in a day resets at midnight.

I will look and see if i can figure out what is going on in a little while.
Thanks, extreme. I think you can compare the code from the vB 2.x.x hack with this new hack and so you might be able to find the wrong code in this hack.
Reply With Quote
  #64  
Old 01-09-2004, 12:30 PM
Jean147's Avatar
Jean147 Jean147 is offline
 
Join Date: Apr 2002
Location: NRW, Germany
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

was looking for that. Thx a lot. :top
Reply With Quote
  #65  
Old 01-09-2004, 12:31 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed it.

Here are my changes

Find:
PHP Code:
if ((int)$maxusers['maxonline'] <= $totalonline)
{
    
$time time();
    
$maxloggedin "$totalonline " $time " " $maxusers['maxonline'] . " " $maxusers['maxonlinedate'];
    
$maxusers[0] = $totalonline;
    
$maxusers[1] = $time;

Replace with:
PHP Code:
    if (intval($maxusers['maxonline']) <= $totalonline)
    {
        
$maxusers[0] = $totalonline;
        
$maxusers[1] = TIMENOW;
    } 
Now Find:
PHP Code:
if ((int)$maxusers[2] <= $numbertodayonline) {
    
$time time();
    
$maxloggedin $maxusers[0] . " " $maxusers[1] . $numbertodayonline " $time;
    
$maxusers[2] = $numbertodayonline;
    
$maxusers[3] = $time;

Replace with:
PHP Code:
    if (intval($maxusers['maxonline']) <= $totalonline) {
    
$maxloggedin $maxusers[0] . " " $maxusers[1] . $numbertodayonline " TIMENOW;
    
$maxusers[2] = $numbertodayonline;
    
$maxusers[3] = TIMENOW;
    
$DB_site->query("REPLACE INTO " TABLE_PREFIX "datastore (title, data) VALUES ('maxloggedin', '" addslashes(serialize($maxusers)) . "')");

Reply With Quote
  #66  
Old 01-09-2004, 01:33 PM
Zeitgeist Zeitgeist is offline
 
Join Date: May 2002
Location: Europe
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, it doesn't work. It resets the date to 01-01-1970 and hides the most users ever online on a day completly.
Reply With Quote
  #67  
Old 01-09-2004, 01:51 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack only works if whosonline is on so make sure that you have it turned on.
Reply With Quote
  #68  
Old 01-09-2004, 02:07 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have not been able to recreate your problem I have check all the code im using and this looks like the only parts i changed. Check and make sure you did the replaces correctly.
Reply With Quote
  #69  
Old 01-09-2004, 06:15 PM
Zeitgeist Zeitgeist is offline
 
Join Date: May 2002
Location: Europe
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's a screenshot of my forum after replacing the variables with yours. I'm 100% sure that I've made exactly what you've posted. Who's online is enabled and I haven't made any other changes to index.php *confused*
Reply With Quote
  #70  
Old 01-09-2004, 06:35 PM
eXtremeTim eXtremeTim is offline
 
Join Date: Jun 2002
Location: eXtremewebtech.com
Posts: 1,201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zeitgeist
That's a screenshot of my forum after replacing the variables with yours. I'm 100% sure that I've made exactly what you've posted. Who's online is enabled and I haven't made any other changes to index.php *confused*
Mind posting the whole whosonline block of code you have? I will compare it to mine and see if there are anymore differences. That way i can see if you messed up or if i left something out or if its working becuase of some other change i have done on my board. Seing as my board is already heavily modified. You can check it out on mine running the code i have posted. http://www.extremechatforums.com/forum/index.php
Reply With Quote
  #71  
Old 01-09-2004, 06:48 PM
Zeitgeist Zeitgeist is offline
 
Join Date: May 2002
Location: Europe
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's the whole code of the hack:
Code:
// ### WHO WAS ONLINE TODAY ########################
	if (intval($maxusers['maxonline']) <= $totalonline) 
{ 
		$maxusers[0] = $totalonline; 
		$maxusers[1] = TIMENOW; 
} 
$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, options FROM ".TABLE_PREFIX."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))
{
 $todayuser['options'] = intval($todayuser['options']);
 foreach($_USEROPTIONS AS $optionname => $optionval)
 {
  $todayuser["$optionname"] = iif($todayuser['options'] & $optionval, 1, 0);
 }
 $numbertodayonline++;
 $invisibleuser = '';
 $userid = $todayuser['userid'];
 $lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
 
 if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6)
 {
  $numbertodayonlineinvisible++;
  continue;
 }
 if ($todayuser['invisible'] == 1)
 { // Invisible User but show to Admin
  $invisibleuser = '*';
 }
 $username = fetch_musername($todayuser);
 
 if (!$todayloggedinuser)
 {
eval("\$todayloggedinuser = \"".fetch_template('forumhome_todayloggedinuser')."\";");
}else{
eval("\$todayloggedinuser .= \", ".fetch_template('forumhome_todayloggedinuser')."\";");
}
}
$DB_site->free_result($todayusers);
if ($bbuserinfo[usergroupid] == 6) {
 $todayonline = $numbertodayonline;
} else {
 $todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}
	if (intval($maxusers['maxonline']) <= $totalonline) { 
	$maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . TIMENOW; 
	$maxusers[2] = $numbertodayonline; 
	$maxusers[3] = TIMENOW; 
	$DB_site->query("REPLACE INTO " . TABLE_PREFIX . "datastore (title, data) VALUES ('maxloggedin', '" . addslashes(serialize($maxusers)) . "')"); 
}
$todayrecordusers = $maxusers[2];
$todayrecorddate = vbdate($vboptions['dateformat'],$maxusers[3]);
eval("\$todayloggedinusers = \"".fetch_template('forumhome_todayloggedinusers')."\";");
Reply With Quote
Reply

Thread Tools

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 01:19 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.05434 seconds
  • Memory Usage 2,327KB
  • 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
  • (1)bbcode_code
  • (4)bbcode_php
  • (3)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