Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Members who have visited today (with last 24 hours option). Details »»
Members who have visited today (with last 24 hours option).
Version: 2.31, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.x Rating:
Released: 11-08-2004 Last Update: 07-23-2005 Installs: 627
 
No support by the author.

This modification is no longer available or supported.

A very simple display of all members who have visited the forum 'today' (i.e. since midnight). I looked at the existing hacks that apparently do this, and they either seemed over complicated or had a lot of problems, so I wrote my own simple version.


The main features of Version 2.xx are ;

1. It displays the list on Forum Home under the "Users online" display.

2. The list view is collapsable, so you just see the number.

3. Invisible users are only displayed to those allowed to see them (with a "*")

4. Users who should display as coloured or bold etc should be displayed correctly. (based on the display usergroup)

5. If you 'hover' over a username it will show the time they were last active.

6. The list is in member name order.


If you prefer, then there is an option to make this hack display a rolling 24 hours - un-comment the relevant line in the code.


Addons:
ericgtr has created a CMPS module for this hack, you will find the files here.
paul41598 has created a pop-up display instead of the collapsable display, you will find the files here.

Show Your Support

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

Comments
  #92  
Old 01-03-2005, 11:38 PM
cclaerhout's Avatar
cclaerhout cclaerhout is offline
 
Join Date: Aug 2004
Location: Paris (France)
Posts: 448
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by funkmeister
Doh, yes indeed - that was it

Thanks.
Do i have to change the value "$cutoff = $now - 86400 " if my forum's default time is GMT+1 ? Because at midnight, the number of users who have visited the forum doesn't init.

Great hacks anyway thanks :-)
Reply With Quote
  #93  
Old 01-03-2005, 11:47 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cclaerhout
Do i have to change the value "$cutoff = $now - 86400 " if my forum's default time is GMT+1 ? Because at midnight, the number of users who have visited the forum doesn't init.

Great hacks anyway thanks :-)
That piece of code will give a rolling count for the previous 24 hours and is commented out (unless you have removed the "//"). It is only there as a backup because the vbdate function was not working on some systems - allthough some people are using it by default because this is what they want to do.
Reply With Quote
  #94  
Old 01-04-2005, 06:57 AM
cclaerhout's Avatar
cclaerhout cclaerhout is offline
 
Join Date: Aug 2004
Location: Paris (France)
Posts: 448
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
That piece of code will give a rolling count for the previous 24 hours and is commented out (unless you have removed the "//"). It is only there as a backup because the vbdate function was not working on some systems - allthough some people are using it by default because this is what they want to do.
Thanks for this explanation. I'm using Vb 3.04 and i was forced to remove the // before the code ; Otherwise all users were listed. So, if i well understand, now this hacks is "Who connected last 24 hours"
Reply With Quote
  #95  
Old 01-04-2005, 09:42 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cclaerhout
So, if i well understand, now this hacks is "Who connected last 24 hours"
Yep, that is how yours will be working.
Reply With Quote
  #96  
Old 01-04-2005, 10:45 AM
Kylie Kylie is offline
 
Join Date: Jun 2004
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Paul works well, I've used some other versions but this is the easiest to see. I like the time "alt"
Reply With Quote
  #97  
Old 01-08-2005, 02:37 AM
colcas colcas is offline
 
Join Date: Nov 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi Paul great mod,

I have had it running perfect up to last night - I did the 3.0.5 upgrade and it doesn't show who's been on line today, just a blank box no entries

I'm new to v-bulletin - do you have any ideas what might need to be changed to get it working again

thanks in advance
Reply With Quote
  #98  
Old 01-08-2005, 10:23 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by colcas
hi Paul great mod,

I have had it running perfect up to last night - I did the 3.0.5 upgrade and it doesn't show who's been on line today, just a blank box no entries

I'm new to v-bulletin - do you have any ideas what might need to be changed to get it working again

thanks in advance
Have you re-done the files changes after you upgraded ?

btw - you are not showing as having installed this - please click install.
Reply With Quote
  #99  
Old 01-08-2005, 10:14 PM
colcas colcas is offline
 
Join Date: Nov 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry Paul - I must have forgot to click 'Install'

I checked the new 'index.php' file and it didn't seem to have the

line
// ### LOGGED IN USERS #########################################

This is where I got stuck - it had that line in my 3.0.3 version index.php but doesn't seem to have it in the new 3.0.5 version

the code for the forum home template is in and shows the box for the users who visited today

but as I don't know where to mod the index.php file as it doesn't have the 'LOGGED IN USERS line

hope this clarifies it a bit

Cheers
Reply With Quote
  #100  
Old 01-09-2005, 12:00 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by colcas
Sorry Paul - I must have forgot to click 'Install'

I checked the new 'index.php' file and it didn't seem to have the

line
// ### LOGGED IN USERS #########################################

This is where I got stuck - it had that line in my 3.0.3 version index.php but doesn't seem to have it in the new 3.0.5 version
Well my index.php (3.0.5) has it, at line 274. - Just do a text search for "LOGGED IN".
Reply With Quote
  #101  
Old 01-09-2005, 05:49 AM
Mosaicvb Mosaicvb is offline
 
Join Date: Sep 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed this mod with vb 3.0.5 and it works great. I made some changes and I am posting what I did if you want to have an option that does not require altering the index.php.

1 : create a php file called whos.online.today.php with the following and upload to the root of the forum. :

PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

$now TIMENOW ;
require_once(
'./includes/functions_misc.php');
$cutoff vbmktime(000vbdate('m'$nowfalsefalse), vbdate('d'$nowfalsefalse), vbdate('Y'$nowfalsefalse));
//$cutoff = $now - 86400 ;  // Uncomment this line if you don't have vB 3.0.3 and all users are showing.
$todaysusers $DB_site->query("SELECT userid, lastactivity, options, username, opentag, closetag
FROM " 
TABLE_PREFIX "user as user
LEFT JOIN " 
TABLE_PREFIX "usergroup as usergroup ON(user.usergroupid = usergroup.usergroupid)
WHERE lastactivity > " 
.$cutoff" ORDER BY username" ); 

$totaltoday 0;
while (
$today $DB_site->fetch_array($todaysusers))
{
    
$today[visible] = ;
    
$totaltoday += 1;
    if (
$today[options] & $_USEROPTIONS[invisible]) 
    {
        
$today[visible] = ;
        if ((
$permissions['genericpermissions'] & CANSEEHIDDEN) OR $today['userid'] == $bbuserinfo['userid'])
        {
            
$today[visible] = ;
        }
    }
    if (
$today[visible]) 
    {
           
$wrdate vbdate($vboptions['timeformat'], $today['lastactivity']);
        
$whotoday .= "<a href='member.php?u=$today[userid]' title='$wrdate' >";
        if (
$today[visible] == 2
        {
            
$whotoday .= $today['opentag'].$today[username].$today['closetag']."</a>*, ";
        }
        else 
        {
            
$whotoday .= $today['opentag'].$today[username].$today['closetag']."</a>, ";
        }
    }
}
if (
$whotoday)
{
    
$whotoday substr($whotoday0strlen($whotoday)-2);
}

?>

2: Go to the style manager. Open the style you want to edit.
In the common template section goto the phpinclude_start box and enter :

Code:
ob_start(); 
include('whos.online.today.php');
ob_end_clean();

3: Follow your instructions for replacing the code in the Forumhome template.

Done.

Works like a charm for me. Thanks for your work. I hope I don't offend you by posting what I did.

I would like to know since I dont play in vB a lot whether anything I did would open a security hole.
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 08:34 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06875 seconds
  • Memory Usage 2,337KB
  • 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
  • (1)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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