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 |
#212
|
||||
|
||||
so... has anyone figured out the timezone problem?
|
#213
|
||||
|
||||
Installed on 2.2.6 and working well. Thanks!
|
#214
|
||||
|
||||
thanks for this nice hack!! seems to work fine up to now.
what about the timezone ?? what happens when not ALL users have the same time zone like the server ? |
#215
|
||||
|
||||
How can I stop admins from being italicized in this hack? Thanks in advance for your help.
|
#216
|
||||
|
||||
Quote:
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']; } Code:
if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) { $username = "<b>$todayuser[username]</b>"; } else { $username = $todayuser['username']; } |
#217
|
||||
|
||||
Thanks very much, this is a fantastic addition to my forums!
|
#218
|
||||
|
||||
We'll I'm still having that query problem, what is the status on that Mystics? I sent that PM to you with my debug query info a while ago
edit: How strange, I just uncommented the code and I'm only getting 27 queries (an increase of 2). Although I'm running my forums currently on my computer, but this is strange...hopefully it doesn't go back when I upload to my server.. |
#219
|
||||
|
||||
@Velocd
Sorry, I think I have forgotten you I also had only 27 Querys when I used your index.php. I don't know why there are more querys when you use it on your server. |
#220
|
||||
|
||||
Heh, this problem has turned very strange. On my localserver running on my computer, my forum with this hack installed generates just 27 queries. All files on my localserver are EXACTLY the same as the ones running on my webserver. Well, my forums on my webserver with this hack installed generate 43 queries. :dead:
When I comment out the hack I get down to 23 queries. So this appears to be some type of weird database error, since I'm sure it's not in the files. Anyway to zero in on the source of the problem? If it's a database glitch or something.. where might I start looking? |
#221
|
||||
|
||||
lol, my forum isn't even generating 43 queries anymore with this on, it's generating 49..*dies*
There is something screwed up in my database for sure... |
#222
|
||||
|
||||
On a forum I work on, the todaylogged in users shows the correct number to me if I am logged in as admin, but if I log out or sign in under a normal user it doesnt count invisible users.
Now I know about the fix to changing the code to $numbertodayonline But it doesnt work. It still stays the same. Any help? Here is my code in index.php Code:
// today online hack begin if ((int)$maxusers[0] <= $totalonline) { $time = time(); $maxloggedin = "$totalonline " . $time . " " . $maxusers[2] . " " . $maxusers[3]; $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'"); $maxusers[0] = $totalonline; $maxusers[1] = $time; } $todayloggedinusers = ""; $numbertodayonline = 0; $numbertodayonlineinvisible = 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")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . " ORDER BY username"); while ($todayuser=$DB_site->fetch_array($todayusers)) { $numbertodayonline++; if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6) { $numbertodayonlineinvisible++; continue; } } $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; $DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'"); $maxusers[2] = $numbertodayonline; $maxusers[3] = $time; } $todayrecordusers = $maxusers[2]; $todayrecorddate = vbdate($dateformat,$maxusers[3]); eval("\$todayloggedinusers = \"".gettemplate('forumhome_todayloggedinusers')."\";"); //today online hack end Thanks! |
#223
|
||||
|
||||
here the ultimate question :banana:
besides the number of registered members, how can I show the total number of guests who were online ? I saw this feature on a phpBB2 board, take a look at the screenshot. isn't there a possibility to realize this cool feature for the hack for vBulletin ??? thanks, Schorsch |
#224
|
|||
|
|||
Parse errors hurt my brain...
I followed every step of this hack from beginning to end... And ended up with happy spiffy parse errors... I'm not sure why- Also, we use .php3 files for all of our forums... Now, I'll upload it and all user or $forum relative data is missing- including avatars, status, post counts, and everything else.. I also had a very similar- almost identical parse error with the 'what style are we all using' hack... I'm not sure why this is- I'm uploading in ASCII and everything... but it's quite frustrating to do all that vigorous copy/pasting ;-) and find your board all that much more worse for wear. Would anyone like to cue me on on how stupid I'm being? I'd greatly appreciate it! |
#225
|
||||
|
||||
Sorry for bumping, but there is a problem.
The time for when the most users online isn't working. Everything else works okay. Any ideas? |
#226
|
|||
|
|||
Installed fine but noticed it only starts counting the user online from 12midday it seems to work fine until 5-6 am then its back to 0 users. The problem is it doesn't count any users online until 12 midday again so missing 6 hours any ideas why??
Ideally it would be best if it would work from 12 midnight to 12 midnight Great hack btw Thanks for any help Beams |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|