dlcomplete
New Member
Need this info from vb.org
Adding Currently Active Users to your own vB page - vBulletin.org Forum
Adding Currently Active Users to your own vB page - vBulletin.org Forum
// get special data templates from the datastore
$specialtemplates = array(
'maxloggedin',
);
PHP Code:
// pre-cache templates used by all actions
$globaltemplates = array(
'TEST',
'forumhome_loggedinuser',
);
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/functions_bigthree.php');
// ######################### REQUIRE BACK-END ############################
chdir ('/path/to/your/forums');
require_once('./global.php');
require_once(DIR . '/includes/functions_bigthree.php');
// ### LOGGED IN USERS #################################################
$activeusers = '';
if (($vbulletin->options['displayloggedin'] == 1 OR $vbulletin->options['displayloggedin'] == 2 OR ($vbulletin->options['displayloggedin'] > 2 AND $vbulletin->userinfo['userid'])) AND !$show['search_engine'])
{
$show['loggedinusers'] = true;
}
else
{
$show['loggedinusers'] = false;
}
<!-- logged-in users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[align=right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
<a href="online.php$session[sessionurl_q]" rel="nofollow">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
<tr>
<td class="alt2"><a href="online.php$session[sessionurl_q]" rel="nofollow"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
<div>$activeusers</div>
</div>
</td>
</tr>
</tbody>
<!-- end logged-in users -->
<tr>
<td class="tcat" colspan="2">Title</td>
</tr>
<tr>
<td class="alt1" colspan="2">Text</td>
</tr>