The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Help Needed Finding/Closing bad "if" ...
I get an error while trying to wrap my ads in the following condition:
<if condition="$foruminfo[forumid] == "xxx""> <!-- no ads--> <else /> ad code here </if> I've been told i'm missing a slash or closing </if> statement. I can't find the bad if in the document... can someone help me troubleshoot it out please. Quote:
Quote:
|
#2
|
|||
|
|||
I don't know where you put that bit of code but it's for vB3. For vB4 it should look like this:
HTML Code:
<vb:if condition="$foruminfo['forumid'] == "xxx""> <!-- no ads--> <vb:else /> ad code here </vb:if> EDIT: put single quotes around forumid |
#3
|
|||
|
|||
I appreciate your assistance...
i get the following error: Quote:
Quote:
|
#4
|
|||
|
|||
Oops, I think I see the problem:
HTML Code:
<vb:if condition="$foruminfo['forumid'] == 50"> <!-- no ads--> <vb:else /> ad code here </vb:if> |
#5
|
||||
|
||||
Replace all of this:
HTML Code:
<if condition="$forum[forumid] == "50""> <!-- no ads--> <else /> <div style=""><div style="width: 700px; height: 270px; margin-left: auto; margin-right: auto; clear: both;"> <div style="width: 350px; float: left;"> <center> <!--/* OpenX iFrame Tag v2.8.7 (Rich Media - OpenX) */--> <!--/* * This tag has been generated for use on a non-SSL page. If this tag * is to be placed on an SSL page, change the * 'http://www.xxxxx.com/openx/www/delivery/...' * to * 'https://www.xxxxx.com/openx/www/delivery/...' * * The backup image section of this tag has been generated for use on a * non-SSL page. If this tag is to be placed on an SSL page, change the * 'http://www.xxxx.com/openx/www/delivery/...' * to * 'https://www.xxxx.com/openx/www/delivery/...' * * If iFrames are not supported by the viewer's browser, then this * tag only shows image banners. There is no width or height in these * banners, so if you want these tags to allocate space for the ad * before it shows, you will need to add this information to the <img> * tag. */--> <iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&cb={random}&ct0={clickurl}' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&cb={random}&n=axxxa&ct0={clickurl}' border='0' alt='' /></a></iframe> </center> </div><div style="width: 350px; float: left;"> <center> <!--/* OpenX iFrame Tag v2.8.7 (Rich Media - OpenX) */--> <!--/* * This tag has been generated for use on a non-SSL page. If this tag * is to be placed on an SSL page, change the * 'http://www.xxxxx.com/openx/www/delivery/...' * to * 'https://www.xxxxx.com/openx/www/delivery/...' * * The backup image section of this tag has been generated for use on a * non-SSL page. If this tag is to be placed on an SSL page, change the * 'http://www.xxxx.com/openx/www/delivery/...' * to * 'https://www.xxxx.com/openx/www/delivery/...' * * If iFrames are not supported by the viewer's browser, then this * tag only shows image banners. There is no width or height in these * banners, so if you want these tags to allocate space for the ad * before it shows, you will need to add this information to the <img> * tag. */--> <iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&cb={random}&ct0={clickurl}' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&cb={random}&n=axxxa&ct0={clickurl}' border='0' alt='' /></a></iframe> </center> </div></div></div> </if> HTML Code:
<vb:if condition="$forum['forumid'] == 50"> <!-- no ads --> <vb:else /> <div style=""> <div style="width:700px;height:270px;margin-left:auto;margin-right:auto;clear:both;"> <div style="width:350px;float:left;"> <center> <iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&cb={random}&ct0={clickurl}' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&cb={random}&n=axxxa&ct0={clickurl}' border='0' alt='' /></a></iframe> </center> </div> <div style="width: 350px; float: left;"> <center> <iframe id='xxxx' name='xxxx' src='http://www.xxxx.com/openx/www/delivery/afr.php?zoneid=3&cb={random}&ct0={clickurl}' frameborder='0' scrolling='no' width='300' height='250'><a href='http://www.xxxxx.com/openx/www/delivery/ck.php?n=axxxa&cb={random}' target='_blank'><img src='http://www.xxxx.com/openx/www/delivery/avw.php?zoneid=3&cb={random}&n=axxxa&ct0={clickurl}' border='0' alt='' /></a></iframe> </center> </div> </div> </div> </vb:if> |
#6
|
|||
|
|||
wow... finally works!
thanks guys! --------------- Added [DATE]1327360021[/DATE] at [TIME]1327360021[/TIME] --------------- still using this... <vb:if condition="$foruminfo['forumid'] == 50"> <!-- no ads--> <vb:else /> ad code here </vb:if> how do i make the the ad code show only for guest still? |
#7
|
|||
|
|||
how do i make the ad code for this condition display only for guest?
|
#8
|
||||
|
||||
Try this
HTML Code:
<vb:if condition="$foruminfo['forumid'] == 50" AND $show['member']> <!-- no ads--> <vb:else /> ad code here </vb:if> |
#9
|
|||
|
|||
the ad code still showed for all members.
|
#10
|
||||
|
||||
Yeah, I see where I screwed up on that first code. Also, not sure why I didn't think of this first, but replace this
HTML Code:
<vb:if condition="$foruminfo['forumid'] == 50"> <!-- no ads--> <vb:else /> ad code here </vb:if> HTML Code:
<vb:if condition="$foruminfo['forumid'] != '50' AND $show['guest']"> ad code here </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|