The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am a code novice.
I am trying to hide the New Thread button for certain usergroups. They can reply to an existing thread but not create new threads. I can control this with permissions, but I am tying to hide the button. I found the code in ForumDisplay Code:
<if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </if></td> Code:
<if condition="is_member_of($bbuserinfo, 6)"> If in group 6, show this... <else /> ...or else, show this. </if> I am ok with basic if else principles, but these are nested and I am getting confused |
#2
|
||||
|
||||
![]()
Your condition looks fine. Did you try it? Another way to go about it would be to create a plugin that sets $show['newthreadlink'] to false for users not in the admin usergroup.
|
#3
|
|||
|
|||
![]()
Sorry, I actually got it working. I didnt realize there were two buttons. I had made the bottom button dissapear the whole time.
For anyone who may read this. This is what I did Code:
<td class="smallfont"><if condition="is_member_of($bbuserinfo, 6)"> <if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else /> </if> <else />   </if> </td> |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|