View Full Version : Can certain box appear in certain forum / catagories?
SauravG
12-30-2007, 09:26 AM
I want a form to appear in specific forums or catagories after post #1. I am not sure how to do this. I have done it so it appears in all forums after post #1.
This is the code I use.
<!-- iRapid Links Checker starts here -->
<if condition="$post[postcount] == 1">
<iframe name="home" src="http://www.irapid.co.uk/test/link.html" border="0" frameborder="0" width="500" height="149"></iframe>
</if>
<!-- iRapid Links Checker starts here -->
Thanks in advance.
valdet
12-30-2007, 10:11 AM
Try this conditional
<if condition="$forum[forumid] == X"></if>so now your box would be like this:
<!-- iRapid Links Checker starts here -->
<if condition="$forum[forumid] == X">
<if condition="$post[postcount] == 1">
<iframe name="home" src="http://www.irapid.co.uk/test/link.html" border="0" frameborder="0" width="500" height="149"></iframe>
</if>
</if>
<!-- iRapid Links Checker starts here -->I hope that helps you out.
Best regards,
Val.
SauravG
12-30-2007, 10:33 AM
Try this conditional
so now your box would be like this:
I hope that helps you out.
Best regards,
Val.
Awesome thank you!
I had a feeling it would be something similar to $forum[forumid] == X but wasnt sure if I could have two if's. Works :)
Is it possible so I only have to enter the catagory number rather than the forum number as I have over 200 (sub)forums and I only want it in half of them?
Regards,
Saurav
valdet
12-30-2007, 11:08 AM
Is it possible so I only have to enter the catagory number rather than the forum number as I have over 200 (sub)forums and I only want it in half of them?
Try this one.
<if condition="in_array($forumid, array(X,Y,Z))"></if>
Add as much forum/category ids as you want separated by commas
Regards,
Val.
SauravG
12-30-2007, 11:11 AM
Unfortunately it doesn't work :(
Thanks for trying.
Regards,
Saurav
valdet
12-30-2007, 11:14 AM
how about this one
<if condition="in_array($forum['forumid'], array(1,2,4,6,10,21,38))"></if>
SauravG
12-30-2007, 11:17 AM
Nope, doesn't work sorry.
Regards,
Saurav
Opserty
12-30-2007, 11:28 AM
$foruminfo instead of $forum
SauravG
12-30-2007, 01:30 PM
$foruminfo instead of $forum
Just tried that, still no luck.
Regards,
Saurav
Dismounted
12-31-2007, 02:34 AM
Which template are you using this in?
SauravG
12-31-2007, 11:42 AM
I am using it in postbit. Thats the only way I could think of having the form after every first post. But I only want it in some forums, not all.
Regards,
Saurav
Opserty
12-31-2007, 01:31 PM
I thought foruminfo worked in the postbit, hmm. Try $post or $thread
P.S. Be aware that there may be conflicts between your form and the inlinemod form if you are adding forms to the postbit, make sure you test it out first.
SauravG
12-31-2007, 01:53 PM
I thought foruminfo worked in the postbit, hmm. Try $post or $thread
P.S. Be aware that there may be conflicts between your form and the inlinemod form if you are adding forms to the postbit, make sure you test it out first.
Hey
There were confilcts, thats why I put the form on a new HTML page and just added an iframe to save me time. Now I just need it in certain forums and not in every forum.
I tried this, but it doesnt work for catagories. So if forumid 234 has 10 subforums, it only works for the threads in the forum234, not its subforums.
<!-- iRapid Links Checker starts here -->
<if condition="in_array($thread['forumid'], array(234))">
<if condition="$post[postcount] == 1">
<iframe name="home" src="http://www.irapid.co.uk/test/link.html" border="0" frameborder="0" width="500" height="149"></iframe>
</if>
</if>
<!-- iRapid Links Checker starts here -->
Thanks for trying.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.