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

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
  #12  
Old 01-03-2004, 05:18 PM
Asterik's Avatar
Asterik Asterik is offline
 
Join Date: Jul 2003
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it has the exact same text *bad grammar* as Chroder's one
Reply With Quote
  #13  
Old 01-03-2004, 05:32 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

some errors ...
this
Code:
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid" title="Last online at $lastactivetime">$username</a>$invisibleuser
should be
Code:
<a href="member.php?s=$session[sessionhash]&amp;action=getinfo&amp;userid=$userid" title="Last online at $lastactivetime">$username</a>$invisibleuser
I would also recommend using vb phrases (add new ones)
Also, add template names to $globaltemplates array
Reply With Quote
  #14  
Old 01-03-2004, 05:33 PM
MGM MGM is offline
 
Join Date: Jan 2003
Location: Michigan
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks Gary!!

MGM out
Reply With Quote
  #15  
Old 01-03-2004, 05:39 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you gonna make one for the WOL?
Reply With Quote
  #16  
Old 01-03-2004, 05:44 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mods and admins don't show in formatted text (bold/italic).
Reply With Quote
  #17  
Old 01-03-2004, 08:23 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zelda-King
Mods and admins don't show in formatted text (bold/italic).
try (not tested)
Replace
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:
$username = fetch_musername($todayuser);
Reply With Quote
  #18  
Old 01-03-2004, 08:38 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That did the trick, thanks!
Reply With Quote
  #19  
Old 01-03-2004, 09:07 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Invisible users show for all and not just admins. The fix is as follows:

Find:
PHP Code:
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity 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)) {
    
$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 '*';
    } 
Replace with:
PHP Code:
$todayusers=$DB_site->query("SELECT userid,(user.options & $_USEROPTIONS[invisible]) AS invisible, username, usergroupid, lastactivity 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)) {
    
$numbertodayonline++;
    
$invisibleuser '';
    
$userid $todayuser['userid'];
    
$lastactivetime vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
    if ((
$todayuser['invisible']) and ($bbuserinfo['usergroupid']!=6)) {
        
$numbertodayonlineinvisible++;
        continue;
    }
    if ((
$todayuser['invisible']) and ($bbuserinfo['usergroupid']==6)) { // Invisible User but show to Admin
        
$invisibleuser '*';
    } 

-----------
In case my copying and pasting are screwy, what needs to be fixed is the query. It needs to check the options field in the table. invisible was a vb2 field and isn't in vb3. It also needs to change the if statements because invisible will not equal 1. It just won't equal zero.

I also moved the templates to the cache on my board, but didn't bother with the phrases. Things seem to be working ok now.

Amy
Reply With Quote
  #20  
Old 01-03-2004, 09:22 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another glitch. This one in the forumhome_todayloggedinusers template.

Find:
Code:
Number of Active Users Today: $numbertodayonline</b></div>
Replace with:

Code:
Number of Active Users Today: $todayonline</b></div>
Reply With Quote
  #21  
Old 01-04-2004, 05:15 AM
uae's Avatar
uae uae is offline
 
Join Date: Jul 2002
Location: Irvine, California
Posts: 312
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Gary ...
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 09:55 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.05122 seconds
  • Memory Usage 2,333KB
  • 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
  • (6)bbcode_code
  • (2)bbcode_php
  • (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
  • (3)pagenav_pagelink
  • (2)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