PDA

View Full Version : IF Statement help...


CodeRed
07-31-2012, 08:23 PM
We currently use this for FORUMDISPLAY

<vb:if condition="$foruminfo['forumid'] == 18">
html code here
</vb:if>


I'm trying to figure out a similar IF Statement to be used when posting a NEW thread in a SPECIFIC forum


Sample link here:
http://www.websitelink.com/forum/newthread.php?do=newthread&f=15


So that if someone is creating a new thread in that forum ID 15 there will be some additonal information thats displayed above the portion of the text editor box. Posting rules etc.


Also, How can that new IF Statement be catered to cover two forum IDs such as 15 & 20?


Thanks a ton!

Simon Lloyd
07-31-2012, 08:51 PM
Here's what you need<vb:if condition="$_REQUEST['do'] == 'newthread' AND $foruminfo['forumid'] == 18">for multiple forums use the IN ARRAY argument
<vb:if condition="$_REQUEST['do'] == 'newthread' AND in_array($forum['forumid'], array(18,21,31,66))">

CodeRed
07-31-2012, 09:10 PM
Thanks a ton Simon! I really appreciate it, I'll get it added tonight

:)