PDA

View Full Version : Defining a forum id conditional?


defi
02-21-2006, 05:33 PM
Does anyone know anyway to define a forumid conditional?

What I'm basically looking to do is replace the new thread button on 4 different forums with a new link, but I want the other forums to remain intact.

Is there a global forumid conditional to call here?

Reeve of shinra
02-21-2006, 05:54 PM
It would be something like this:


<if condition="$forum[forumid] = 1 OR $forum[forumid] = 3 OR $forum[forumid] = 5">
<img src="./board/images/logo/logo-xbox.jpg" />
<else />

<if condition="$forum[forumid] = 2 OR $forum[forumid] = 4 OR $forum[forumid] = 6">
<img src="./board/images/logo/logo-playstation.jpg" />
<else />

<img src="$stylevar[titleimage]" />
</if>
</if>
</if>

defi
02-23-2006, 05:04 AM
perfect - thanks!

ChrisBaktis
03-05-2006, 03:17 PM
What would the conditional be if I wanted something to appear on all the pages EXCEPT the forumhome?

thanks

tehste
03-05-2006, 07:49 PM
What would the conditional be if I wanted something to appear on all the pages EXCEPT the forumhome?

thanks

<if condition="$forum[forumid]!=0">
hehe
</if>

Why not use in_array() rather than all the ORS

Reeve of shinra
03-05-2006, 08:31 PM
I actually just learned about the array =)

ChrisBaktis
03-05-2006, 10:03 PM
What im trying to do is add a second column in the navigation bar on all pages except the forum home - All the information appears if I remove the conditional (on all the pages) - If I add the <if> condition then none of the code shows up on any page.

any ideas?

<if condition="$forum[forumid]!=0">
<td class="alt1">
<table width="200" border="0">
<tr>
<td align="center">
<a href="http://www.rustysoaptraders.com/forums/tickets.php"><b>Buy Tickets Here:</a> </b><br> <a href="http://www.coasttocoasttickets.com/concerts/">Concert Tickets</a>
- <a href="http://www.coasttocoasttickets.com/nfl/">NFL Tickets</a><br><a
href="http://www.coasttocoasttickets.com/mlb/">MLB Tickets</a><b></font></a><br>
</td>
</tr>
</table>
</td>
</if>

*** Update ***

I just realized that the conditional is working if im in a thread - but doesnt work on any Main forum page - when I say main forum page I mean everything outside of a post...

this is the code

<if condition="$forum[forumid] != 0">
<td class="alt1">
<table width="200" border="0">
<tr>
<td align="center">
<a href="http://www.rustysoaptraders.com/forums/tickets.php"><b>Buy Tickets Here:</a> </b><br> <a href="http://www.coasttocoasttickets.com/concerts/">Concert Tickets</a>
- <a href="http://www.coasttocoasttickets.com/nfl/">NFL Tickets</a><br><a
href="http://www.coasttocoasttickets.com/mlb/">MLB Tickets</a><b></font></a><br>
</td>
</tr>
</table>
</td>
</if>

ChrisBaktis
03-08-2006, 01:27 PM
Any ideas what I can change to make it show on the main forums?