Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2010, 06:07 PM
45wheelgun 45wheelgun is offline
 
Join Date: May 2009
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default limit viewing of "currently active users"

I would like to limit the viewing of the list of "currently active users" on the main forum page to 3 user groups only (admin/mod/supermod). I can't seem to find a switch in the settings or a hack on vbulletin.org that addresses this need.

Seem like the syntax shouldn't be to hard, but I don't trust myself to not screw it up. Can someone give me the short answer? IE: add the following to thisorthat template before/after thisorthat code.

Thanks,
Dave

--------------- Added [DATE]1267702664[/DATE] at [TIME]1267702664[/TIME] ---------------

Bump to the top. I am assuming this is just a conditional wrapped around the existing code. Can some one throw me a bone?
Reply With Quote
  #2  
Old 03-04-2010, 12:41 PM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use IF Condition to show to the usergroups that you want. But if they go to yousite.com/online.php they will still be able to see it.
Reply With Quote
  #3  
Old 03-04-2010, 03:49 PM
swiper the fox swiper the fox is offline
 
Join Date: Dec 2007
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AdminCP ---- Usergroups----Usergroup Manager
Edit usergroup & find:

Who's Online Permissions

Can View Who's Online Yes No <=== choose here whether you want viewing or not

is this what you are looking for ?
Reply With Quote
  #4  
Old 03-04-2010, 05:37 PM
45wheelgun 45wheelgun is offline
 
Join Date: May 2009
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChopSuey View Post
Use IF Condition to show to the usergroups that you want. But if they go to yousite.com/online.php they will still be able to see it.
I have online.php turned off based on user group permissions.

I am referring to the "currently active users" list that appears on the forum home page in the "What's going on" area. My moderators and I find that a handy tool, but we don't want it visible to the public. Unlike the online.php, "currently active users" only has an "on/off" switch in the adminCP, it doesn't appear in the user group permissions.

I was hoping someone could point me to the template I need to edit. I am thinking it is the forum home template. I think I only need to edit the "logged in" section as I have it turned off for visitors. I was hoping for someone to point me to the section of code that need the If Condition in front of it and the /IF at the end, along with the proper syntax to make it happen.

Thank you for the replies everyone.

Dave

--------------- Added [DATE]1267731761[/DATE] at [TIME]1267731761[/TIME] ---------------

Quote:
Originally Posted by swiper the fox View Post
Can View Who's Online Yes No <=== choose here whether you want viewing or not

is this what you are looking for ?
Actually, no, but thanks. I have that turned off for the user groups, but I am referring to the list that appears in the "What is going on?" section. I have that list set so it only shows to people who are logged in, but i want to restrict it even more and only show it to Mods/Admins.
Reply With Quote
  #5  
Old 03-04-2010, 08:16 PM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find that part where logged in users is defined and place it inside the if conditional:

<if condition="is_member_of($bbuserinfo, 5,6,7)">the code here</if> and it should do the trick.

I don''t use vb 3 but if you would post the appropriate code here I will make the changes for you.
Reply With Quote
  #6  
Old 03-04-2010, 11:37 PM
45wheelgun 45wheelgun is offline
 
Join Date: May 2009
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you for the replies. I think this is the code I need from the forumhome template. Hopefully someone here can confirm I have the correct spot:

PHP Code:
<if condition="$show['loggedinusers']">
<!-- 
logged-in users -->
<
tbody>
    <
tr>
        <
td class="thead" colspan="2">
            <
a style="float:$stylevar[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]">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered2="$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]"><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="$recordusers2="$recorddate3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
                <
div>$activeusers</div>
            </
div>
        </
td>
    </
tr>
</
tbody>
<!-- 
end logged-in users -->
</if> 
Reply With Quote
  #7  
Old 03-05-2010, 04:29 AM
ChopSuey ChopSuey is offline
 
Join Date: Jun 2009
Location: Alaska
Posts: 2,140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NO you have the correct spot.
Here ya go
HTML Code:
<if condition="is_member_of($bbuserinfo, 5,6,7)">
<if condition="$show['loggedinusers']">
<!-- logged-in users -->
<tbody>
    <tr>
        <td class="thead" colspan="2">
            <a style="float:$stylevar[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]">$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]"><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 -->
</if>
</if>
Reply With Quote
  #8  
Old 03-05-2010, 08:48 AM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That should do it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06552 seconds
  • Memory Usage 2,263KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete