The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Members who have visited today (with last 24 hours option). Details »» | |||||||||||||||||||||||||||
Members who have visited today (with last 24 hours option).
Developer Last Online: Nov 2023
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
|
Comments |
#602
|
||||
|
||||
|
#603
|
|||
|
|||
error on VBulletin 3.6.9 Version
|
#604
|
|||
|
|||
Solve:
Code:
Step 1. In Index.php ; Find ; // ### LOGGED IN USERS ################################################# And insert this code above it ; // ############### Paul M - Who has visited today v2.31 ################# $tnow = date('YmdHis',TIMENOW - $vboptions['hourdiff']); $cutoff = TIMENOW - (substr($tnow,8,2)*3600 + substr($tnow,10,2)*60 + substr($tnow,12,2)); //$cutoff = TIMENOW - 86400 ; // ## Uncomment this line if you want a rolling 24 hours display ## // $todaysusers = $db->query("SELECT userid, lastactivity, options, username, user.usergroupid, displaygroupid, groupa.opentag as opentaga, groupa.closetag as closetaga, groupb.opentag as opentagb, groupb.closetag as closetagb FROM " . TABLE_PREFIX . "user as user LEFT JOIN " . TABLE_PREFIX . "usergroup as groupa ON(user.usergroupid = groupa.usergroupid) LEFT JOIN " . TABLE_PREFIX . "usergroup as groupb ON(user.displaygroupid = groupb.usergroupid) WHERE lastactivity > " .$cutoff. " ORDER BY username" ); $totaltoday = 0; unset ($whotoday); while ($today = $db->fetch_array($todaysusers)) { $totaltoday += 1; $today['opentag'] = $today['opentaga'] ; $today['closetag'] = $today['closetaga'] ; if ($today['displaygroupid']) { $today['opentag'] = $today['opentagb'] ; $today['closetag'] = $today['closetagb'] ; } $today[visible] = 1 ; if ($today['options'] & $_USEROPTIONS['invisible']) { $today['visible'] = 0 ; if (($permissions['genericpermissions'] & CANSEEHIDDEN) OR $today['userid'] == $bbuserinfo['userid']) { $today['visible'] = 2 ; } } 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($whotoday, 0, strlen($whotoday)-2); } // ############# End of Who has visited today ############### Step 2. In the FORUMHOME Template ; Find; <!-- end logged-in users --> and add after; <!-- Todays active users --> <tbody> <tr> <td class="thead" colspan="2"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_todayusers')"><img id="collapseimg_forumhome_todayusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_todayusers].gif" alt="" border="0" /></a> Total users that have visited today: $totaltoday </td> </tr> </tbody> <tbody id="collapseobj_forumhome_todayusers" style="$vbcollapse[collapseobj_forumhome_todayusers]"> <tr> <td class="alt2"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="Users online today" border="0" /></td> <td class="alt1" width="100%"><div class="smallfont">$whotoday</div></td> </tr> </tbody> <!-- Todays active users --> Step 3. This is optional, but will speed up the query if you have a large number of members; Run the following SQL query; ALTER TABLE user ADD INDEX (lastactivity) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|