vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to disable stick thread option for moderator? (https://vborg.vbsupport.ru/showthread.php?t=266024)

begin 06-30-2011 05:03 AM

How to disable stick thread option for moderator?
 
I want to setting mods and super-mods can not using ( or not showing ) stick thread option when administrative .

What do I do?

Jeff Ledger 06-30-2011 06:49 AM

The sticky thread permission is a part of thread tools permission, and IMO there are no way to disable it to specific group from admin control panel but you still may do this trick

in your forumdisplay template

find

Code:

                                                <li><label><input type="radio" name="do" value="stick" /> {vb:rawphrase stick_threads}</label></li>
                                                <li><label><input type="radio" name="do" value="unstick" /> {vb:rawphrase unstick_threads}</label></li>


replace with

Code:

<vb:if condition="is_member_of($vbulletin->userinfo, 7)">
                                                <li><label><input type="radio" name="do" value="stick" /> {vb:rawphrase stick_threads}</label></li>
                                                <li><label><input type="radio" name="do" value="unstick" /> {vb:rawphrase unstick_threads}</label></li>
</vb:if>

Look at the line
<vb:if condition="is_member_of($vbulletin->userinfo, 7)">

it means only user of group 7 (admin's group, can be found in ACP, Usergroup manager) can see the sticky options).

You can add more group by using comma.

or you can replace with the following

Code:

<vb:if condition="$vbulletin->userinfo['userid'] == 2">
                                                <li><label><input type="radio" name="do" value="stick" /> {vb:rawphrase stick_threads}</label></li>
                                                <li><label><input type="radio" name="do" value="unstick" /> {vb:rawphrase unstick_threads}</label></li>
</vb:if>

<vb:if condition="$vbulletin->userinfo['userid'] == 2">

replace 2 with your id. So you are the only one who can see these options.

begin 06-30-2011 09:52 AM

thank you so much.

i used $vbulletin->userinfo as $bbuserinfo . it's work.
because I read that, use $ bbuserinfo when editing in the template, I did not understand the difference.


All times are GMT. The time now is 03:12 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.01808 seconds
  • Memory Usage 1,713KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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