Log in

View Full Version : conditional help


neocorteqz
08-27-2004, 04:07 AM
Ok, I'd like to create a conditional for a script to show up in a specific forum.

<if condition="THIS_SCRIPT == 'script name'"> </if>

I know that'd be the code to start, what I don't know is what the code would be after that, if I wanted to display it in just a specific forum, say http://www.nemesisforums.net/forumdisplay.php?f=11

Thanks.

Colin F
08-27-2004, 04:36 AM
<if condition="$forumid == 11">do foo</if>]

neocorteqz
08-27-2004, 07:15 AM
I'm trying to add a script to a single page, a screenie is attached of what it looks like.

I'm trying to add that to one single topic, instead of all the topics, so would the code be

<if conditional="THIS_SCRIPT == 'scriptname'" and "$forumid == '11'">Code here</if>


?

Here's the attached screenie.

Thanks for the help. :)

Colin F
08-27-2004, 07:58 AM
na, change $forumid to $threadid and change the 11 to whatever the threadid is.

neocorteqz
08-27-2004, 09:02 AM
na, change $forumid to $threadid and change the 11 to whatever the threadid is.
Ahh, so you don't need the script name.. Thought ya did if it was calling to an external script.

thanks.

nexialys
08-27-2004, 09:56 AM
the if condition is to integrate any PHP conditional, written the PHP way, so you have to put your details in the brackets...:<if condition="THIS_SCRIPT == 'scriptname' AND $forumid == '11'">Code here</if>

you can add the THIS_SCRIPT because some other page may require $forumid (like the bug report, articles, etc...)