PDA

View Full Version : Show Only To Guest & On Specific Forum Code Help



arc
Tue 30th Dec '08, 2:24pm
Hi,

I am currently showing a 300x250 banner on the first post of every thread to GUEST ONLY. Members don't see it.



<if condition="$show[guest]">
<p style="float:right; padding-left:5px; text-align:center;">
<a href="http://www.website.com"><img src="image.jpg" border="0"></a>
</p>
</if>


So this code shows up on everywhere. I have a sponsor forum where I don't want it to show up (forumid 53)...and this is the code i tried to use:



<if condition="$show[guest]">
<p style="float:right; padding-left:5px; text-align:center;">
<if condition="!in_array($forumid, array(53))">
<a href="http://www.website.com"><img src="image.jpg" border="0"></a>
</if>
<if condition="in_array($forumid, array(53))">
&nbsp;
</if>
</p>
</if>


But that doesn't seem to work as if you're a guest it still shows the original image (image.jpg). Am I missing something?

Thanks!

Jake Bunce
Tue 30th Dec '08, 5:49pm
This thread has conditions for forumid:

http://www.vbulletin.com/forum/showthread.php?t=198875

arc
Tue 30th Dec '08, 6:31pm
thanks jake for the info. i found what i needed.

here's what i did incase anyone in the future is looking to do what i did...



<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid] AND !in_array($GLOBALS[forumid], array(53))">