vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Currently Active Users Viewing This Thread (https://vborg.vbsupport.ru/showthread.php?t=201459)

Aadil 01-12-2009 01:21 AM

Currently Active Users Viewing This Thread
 
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
HTML Code:

<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
HTML Code:

<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. :)
HTML Code:

<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

Quote:

Originally Posted by Dismounted (Post 1709266)
It's better to just combine the two (fractionally less processing). Also, you just specify the variable which holds the usergroup ID. :)
HTML Code:

<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


All times are GMT. The time now is 01:11 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01055 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete