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 |
#432
|
|||
|
|||
Might be a dumb question but how can I get it to work with 2.3.3? They changed the coding some.
|
#433
|
||||
|
||||
Quote:
Yes, but a little bit. there's only a little thing in index.php In the 2.3.3 you have if (($maxusers[0] <= $totalonline AND $maxusers[0] > 0) OR sizeof($maxusers) == 1) { instead of if ((int)$maxusers[0] <= $totalonline) { so, if you whant to modify, write // today online hack begin if (($maxusers[0] <= $totalonline AND $maxusers[0] > 0) OR sizeof($maxusers) == 1) { $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++; $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 = "<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']; } if (!$todayloggedinuser) { eval("\$todayloggedinuser = \"".gettemplate('forumhome_todayloggedinuser')."\" ;"); } else { eval("\$todayloggedinuser .= \", ".gettemplate('forumhome_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; $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 And it's done i hope this help you |
#434
|
||||
|
||||
Hi,
I user vBIndex and want to show the last 5 Online Users in an Box... is it possible with this? |
#435
|
|||
|
|||
Works great, cheers.
|
#436
|
|||
|
|||
Quote:
|
#437
|
|||
|
|||
I have this hack installed on my Forum 2.2.9
I have recently moved to a dedicated server which is set to Mountain Time (US) I have compensated for the 7 hour time difference by offsetting the Forum base time, so the default time for my site is GMT (UK) The problem is the Who's online section doesn't start counting who has been on line untill 2 pm as opposed to starting at midnight. Is there any way I can resolve this without altering the server time. Thax |
#438
|
|||
|
|||
Ok guys forgive me here I am a newbe at this.
I am trying to get this hack to work. I have Vboard ver 2. I have loaded all the hacks but I still get the original page???? I think it is still showing the default page? Do I have to deleate the default template or something?? Anyhelp would be appreciated.. Scabs |
#439
|
|||
|
|||
I'm on vB2.3.4 and am having trouble with this hack. I can get it to show up, but the data is puzzling. For example, if I log out I get "0" members online today, even though there are people on the board right now! If I log in I get a number, but it seems that the tally resets at about 6am every day (I guess something to do with my server time) and all the names are cleared. However, what I would REALLY like is for it to give the names of visitors to the site in the past 24 hours, kind of a floating window of time, since I would like to see if anyone is visiting the site at, for example, 3 am in the morning. Unless I get up before 6 am and check the board their names will disappear by the time I get online. Make sense?
Long story short.....there is a feature in the Admn CP that lists visitors in the last 24 hours. It seems ideal. Is there a way to tap into that information, or duplicate it, and display it on my forum homepage? |
#440
|
|||
|
|||
I'm not using all of this hack, just the part that shows which members have "already visited the board today". So I dont know what affect it will have on "Number of Active Users Today:"
My forum (ver 2.2.8) is in the 'GMT' timezone but the server it is hosted on is US Eastern (-5) timezone. After installing the hack everything worked as expected until 24hrs later when the "already visited the board today" showed 'nil' member 'names', even though members had been visiting my forum. So I am experimenting with using 'gmmktime' instead of 'mktime' as used in the hack, which creates the Unix timestamp from the server. I found this little snippet of information on a WWW search that provoked me to change the function. "The timestamp returned is based upon the number of seconds from the epoch GMT, and then modified by the time zone settings on the server. Where you want time zone independence, you should use the function gmmktime" So far so good, in that the member list now shows in "already visited the board today". This might be a solution for some others who run forums in a different timezone to the server that it is hosted on. I've only been running with 'gmmktime' for a few hours so it is impossible to say if this will work permanently, if it still shows the 'members' 24 hours from now then it might be a solution. The change is to the hack in index.php Change WHERE lastactivity > " . (mktime To WHERE lastactivity > " . (gmmktime Like many others I am very new to coding in PHP so maybe an 'expert' or two might like to comment. |
#441
|
|||
|
|||
Nice one Rand M... you've just helped sort mine out, in index.php I found
(($bbuserinfo['timezoneoffset']+7) and changed it to (($bbuserinfo['timezoneoffset']-7) cheers dude.... sorted now |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|