does AND still work if I want to combine statements, for example if I want to combine if a person is a guest and the forum is 1, show this else show something else...how would I do that?
|
Just use 'AND'
<vb:if condition="$forum[forumid] == 5 AND $show['member']">Show this if forum id is 5 and user is a member.</vb:if> |
yeah, thats what I tried, but I cannot seem to get the forumid thing to work, I am using one of the ad templates
|
You could try putting the condition in the header / footer or navbar template instead of the ad location... it will have the same ultimate effect.
|
So in the template FORUMDISPLAY I've done this:
Code:
<vb:if condition="!in_array($forum['forumid'], array(4, 5))"><vb:if condition="$show['newthreadlink']"><a href="newthread.php?{vb:raw session.sessionurl}do=newthread&f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if></vb:if> Cheers. |
thanks
|
Quote:
Code:
<vb:if condition="!in_array($forum['forumid'], array(4, 5)) AND $show['newthreadlink']"><a href="newthread.php?{vb:raw session.sessionurl}do=newthread&f={vb:raw foruminfo.forumid}" rel="nofollow" class="newcontent_textcontrol" id="newthreadlink_top"><span>+</span> {vb:rawphrase post_new_thread}</a></vb:if> |
Hello,
The "$show['newthreadlink']" was in forumdisplay to begin with, I just added the array bit. I tried what you gave, yet it still didn't hide the New thread button from display :/ |
What exactly are you trying to do- I know hide "New Thread" but under what conditions?
|
Essentially, we've got Easy Forms installed and we want users to only be able to submit a form on particular forums so they can follow a pre-defined template instead of being able to post whatever they want.
I've got a "Notice" on the forums saying with a bit of text, including a link to the needed form, but I know of no other way to hide the "New Thread" button. I originally tried simply taking away permissions for Registered Users to Create New Threads, but then that wouldn't let them upload attachments to the form - which is a necessity. If you know of any other way to do this, that would be greatly appreciated. |
All times are GMT. The time now is 07:49 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|