PDA

View Full Version : Currently Active Users Viewing This Thread


Aadil
01-12-2009, 01:21 AM
IS there a way to make this so Only Admins and super admins can see this?

Thanks

Bellardia
01-12-2009, 01:58 AM
Show Thread Templates > SHOWTHREAD

Find

<if condition="$show['activeusers']">
<!-- currently active users -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="2">
<phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
</td>
</tr>
<tr>
<td class="alt1" colspan="2">
<span class="smallfont">$activeusers</span>
</td>
</tr>
</table>
<!-- end currently active users -->
</if>


Replace

<if condition="is_member_of($bbuserinfo[usergroupid], 6)">
<if condition="$show['activeusers']">
<!-- currently active users -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="2">
<phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
</td>
</tr>
<tr>
<td class="alt1" colspan="2">
<span class="smallfont">$activeusers</span>
</td>
</tr>
</table>
<!-- end currently active users -->
</if>
</if>

Dismounted
01-12-2009, 03:42 AM
It's better to just combine the two (fractionally less processing). Also, you just specify the variable which holds the usergroup ID. :)
<if condition="is_member_of($bbuserinfo, 6) AND $show['activeusers']">
<!-- currently active users -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="2">
<phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
</td>
</tr>
<tr>
<td class="alt1" colspan="2">
<span class="smallfont">$activeusers</span>
</td>
</tr>
</table>
<!-- end currently active users -->
</if>

Aadil
01-12-2009, 04:18 AM
It's better to just combine the two (fractionally less processing). Also, you just specify the variable which holds the usergroup ID. :)
<if condition="is_member_of($bbuserinfo, 6) AND $show['activeusers']">
<!-- currently active users -->
<br />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" colspan="2">
<phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
</td>
</tr>
<tr>
<td class="alt1" colspan="2">
<span class="smallfont">$activeusers</span>
</td>
</tr>
</table>
<!-- end currently active users -->
</if>

so do i just replace my template with that 1? u did there

Bellardia
01-12-2009, 04:22 AM
The section of the template, not the whole thing.

Aadil
01-12-2009, 05:05 PM
Figured it out thanks for the help :D