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
  #112  
Old 02-11-2002, 05:22 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Martz
How difficult would it be to change the query to show the the maximum number of users today, concurrently? This would be good for checking how many people have been on at once, instead of in total. It would be a great addition!
Uhm.......are you talking about "Currently Active Users", which is a standard feature of vBulletin?
Reply With Quote
  #113  
Old 02-15-2002, 01:36 AM
mondaynightmike's Avatar
mondaynightmike mondaynightmike is offline
 
Join Date: Jan 2002
Location: Northamptonshire
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hhi i have the coloured user hack installed and i can't get this to run with it. Sorry i am a newbie.

The currently active users work fine shows me as red etc

but current active users today (this hack) just shows everyone as black. Can anyone help???
Reply With Quote
  #114  
Old 02-15-2002, 01:40 AM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by mondaynightmike
but current active users today (this hack) just shows everyone as black. Can anyone help???
-> Who-was-Online-Today [Modified to use with Colored Users Online]
Reply With Quote
  #115  
Old 02-15-2002, 01:41 AM
mondaynightmike's Avatar
mondaynightmike mondaynightmike is offline
 
Join Date: Jan 2002
Location: Northamptonshire
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #116  
Old 02-16-2002, 02:20 AM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If anyone uses the seperate page to show their today online users, this is what they need in that pages php file:

Code:
<?php

error_reporting(7);
$templatesused = 'error_whosonlinedisabled,maxloggedin,whowasonline_todayloggedinusers,whowasonline_todayloggedinuser,whosonline_legend,whowasonline';
$loadmaxusers=1;

require('./global.php');

if (!$WOLenable) {
  eval("standarderror(\"".gettemplate("error_whosonlinedisabled")."\");");
}

$permissions = getpermissions(0,-1,$bbuserinfo['usergroupid']);
$usergroupdef = $permissions;

if (!$usergroupdef['canwhosonline']) {
  show_nopermission();
}

$forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid
                                  FROM moderator
                                  LEFT JOIN user
                                  ON (moderator.userid=user.userid)
                                  ORDER BY user.username');
  while ($moderator=$DB_site->fetch_array($forummoderators)) {
    $imodcache["$moderator[forumid]"][] = $moderator;
    $mod["$moderator[userid]"] = 1;
  }
  $DB_site->free_result($forummoderators);
  unset($moderator);

  $maxusers=explode(" ", gettemplate('maxloggedin',0,0));

  // today online hack begin
  if ((int)$maxusers[0] <= $totalonline) {
    $time = time();
    $maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3];
    $maxusers[0] = $totalonline;
    $maxusers[1] = $time;
  }

  $todayloggedinusers = "";
  $numbertodayonline = 0;
  $numbertodayonlineinvisible = 0;
  $numbertodayonline = 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")) . " 
                ORDER BY username");
  while ($todayuser=$DB_site->fetch_array($todayusers)) {
    $numbertodayonline++;
    $invisibleuser = '';
    $userid = $todayuser['userid'];
    $lastactivetime = vbdate($timeformat, $todayuser[lastactivity]);
    if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
      $numbertodayonlineinvisible++;
      continue;
    }
    if ($todayuser['invisible'] == 1) { // Invisible User but show to Admin
      $invisibleuser = '*';
    }
    if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
      $username = "<FONT COLOR=#FF0000>$todayuser[username]</FONT>";

    } else if (($todayuser['usergroupid'] == 5) and $highlightadmin) {
      $username = "<FONT COLOR=#FF5501>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 7) and $highlightadmin) {
      $username = "<FONT COLOR=#A46F0A>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 14) and $highlightadmin) {
      $username = "<FONT COLOR=#A46F0A>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 10)) {
      $username = "<FONT COLOR=#00CC00>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 13)) {
      $username = "<FONT COLOR=#00CC00>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 9)) {
      $username = "<FONT COLOR=#0945A9>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 8)) {
      $username = "<FONT COLOR=#5409A9>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 2)) {
      $username = "<FONT COLOR=#666666>$todayuser[username]</FONT>";
    } else {
      $username = $todayuser['username'];
    }
    if (!$todayloggedinuser) {
      eval("\$todayloggedinuser = \"".gettemplate('whowasonline_todayloggedinuser')."\";");
    } else {
      eval("\$todayloggedinuser .= \", ".gettemplate('whowasonline_todayloggedinuser')."\";");
    }
  }

  $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;
    $maxusers[2] = $numbertodayonline;
    $maxusers[3] = $time;
  }
  
  $todayrecordusers = $maxusers[2];
  $todayrecorddate = vbdate($dateformat,$maxusers[3]);

  eval("\$todayloggedinusers = \"".gettemplate('whowasonline_todayloggedinusers')."\";");

  if ($WOLrefresh) {
    $metarefresh = "<META HTTP-EQUIV=\"refresh\" CONTENT=\"$WOLrefresh; URL=onlinetoday.php?s=$session[sessionhash]$formeta\"> ";
  }
  if ($highlightadmin) {
  	eval("\$legendtable = \"".gettemplate("whosonline_legend")."\";");
  }
  eval ("\$tablehead = \"$tablehead\";");
  eval("dooutput(\"".gettemplate("whowasonline")."\");");

?>
Reply With Quote
  #117  
Old 02-16-2002, 02:33 AM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the colors which match the ones used in VBStats and also the other colored CURRENT online users hack.

Code:
 if ($todayuser['invisible'] == 1) { // Invisible User but show to Admin
      $invisibleuser = '*';
    }
    if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
      $username = "<FONT COLOR=red>$todayuser[username]</FONT>";

    } else if (($todayuser['usergroupid'] == 5) and $highlightadmin) {
      $username = "<FONT COLOR=darkred>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 7) and $highlightadmin) {
      $username = "<FONT COLOR=green>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 4)) {
      $username = "<FONT COLOR=black>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 8)) {
      $username = "<FONT COLOR=orange>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 3)) {
      $username = "<FONT COLOR=black>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 1)) {
      $username = "<FONT COLOR=black>$todayuser[username]</FONT>";

	} else if (($todayuser['usergroupid'] == 2)) {
      $username = "<FONT COLOR=blue>$todayuser[username]</FONT>";
    } else {
      $username = $todayuser['username'];
    }
Reply With Quote
  #118  
Old 02-16-2002, 11:25 AM
mondaynightmike's Avatar
mondaynightmike mondaynightmike is offline
 
Join Date: Jan 2002
Location: Northamptonshire
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok another quesiton yeturdya my most ever users online in one day was 18 today it says 11. Whats going on? i looked through these pages but ocuold not find it, you may have posted it and i missed it. Can anyone help? I am using at the bottom of my forums http://www.f1modelnews.com/modelforums

thanks
Reply With Quote
  #119  
Old 02-16-2002, 04:47 PM
Edgar Edgar is offline
 
Join Date: Dec 2001
Location: Belgium
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack,works like a dream
Reply With Quote
  #120  
Old 02-16-2002, 09:03 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by mondaynightmike
ok another quesiton yeturdya my most ever users online in one day was 18 today it says 11. Whats going on?
thanks
Is your timezone the same of your server one ?
Reply With Quote
  #121  
Old 02-16-2002, 09:12 PM
mondaynightmike's Avatar
mondaynightmike mondaynightmike is offline
 
Join Date: Jan 2002
Location: Northamptonshire
Posts: 123
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

um i have mine set a GMT i use 34sp.com as a server. I don't know what they run at. Can i change what time they run at?
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 07:08 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.06453 seconds
  • Memory Usage 2,330KB
  • 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
  • (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
  • (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