The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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:
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
|
Comments |
#107
|
||||
|
||||
Hi there,
nice hack, works great and was very easy to install! Guests would be nice as mentioned, what about storing visitors in "whois online"? Then stored visitors online today + members online today = all sessions served today... please state if I see things to easy Anyway: Great hack! [german]Super Sache: Gute Arbeit! [/german] cu, -Tom |
#108
|
|||
|
|||
Quote:
Simply searches into DB for all contacts within the day (for each user is keepen the timemark of last access). The hack infact contains two selects: first for COUNT, second for retrieve rows. Simply, use only the first one... Hwr I suggest you to use the second variation (with new page). Simply you can modify index.php as written and don't create the link into template. Bye |
#109
|
||||
|
||||
Quote:
Sorry if the answer to this is an obvious one, but I'm still getting to grips with vBulletin! |
#110
|
|||
|
|||
They are in different bits in templates.
You should merge that bits in one, but shall work a little with cut&paste... |
#111
|
||||
|
||||
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!
What would the query be? |
#112
|
||||
|
||||
Quote:
|
#113
|
||||
|
||||
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??? |
#114
|
||||
|
||||
Quote:
|
#115
|
||||
|
||||
thanks
|
#116
|
||||
|
||||
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")."\");"); ?> |
#117
|
||||
|
||||
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']; } |
#118
|
||||
|
||||
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 |
#119
|
|||
|
|||
Great hack,works like a dream
|
#120
|
|||
|
|||
Quote:
|
#121
|
||||
|
||||
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?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|