PDA

View Full Version : Navbar Customization - Display Ad on Homepage Only


Levelbest
11-05-2015, 02:42 PM
I've given up on using the weighting system trying to figure out how to make this happen... so I need some help. In VB3, I used the following code to implement an ad in the navbar that displayed an AD only on the homepage.

Need help converting it to VB4 and where to place it.



<if condition="THIS_SCRIPT == 'index'">

<!-- / ADS BEGIN -->

<table class="tborder" cellpadding="$stylevar[cellpadding]"
cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat" width="100%">INTERCOT Sponsors</td>
</tr>
<tr>
<td class="alt1" width="100%">

THE AD CODE GOES HERE

</td>
</tr>
</table>

<!-- / ADS END -->

</if>



Thanks in advance!

JOHN

Levelbest
11-09-2015, 07:58 PM
Anyone have any idea how to accomplish this on vb4? Would really appreciate the help.

Levelbest
11-13-2015, 02:31 PM
Now I've moved into begging mode? Anyone? Anyone? Bueller?

squidsk
11-13-2015, 03:14 PM
Use the ad manager in admincp and choose the location you want to have the ad code appear and then put it the code that went where you have "the ad code goes here" in that location.

Dragonsys
11-13-2015, 03:22 PM
Use the ad manager in admincp and choose the location you want to have the ad code appear and then put it the code that went where you have "the ad code goes here" in that location.

This
But, in your code, the if needs to be vb:if
<vb:if condition="THIS_SCRIPT == 'index'">

<!-- / ADS BEGIN -->

<table class="tborder" cellpadding="{vb:stylevar cellpadding}"
cellspacing="{vb:stylevar cellspacing}" border="0" width="100%" align="center">
<tr>
<td class="tcat" width="100%">INTERCOT Sponsors</td>
</tr>
<tr>
<td class="alt1" width="100%">

THE AD CODE GOES HERE

</td>
</tr>
</table>

<!-- / ADS END -->

</vb:if>

of course cellpadding & cellspacing are not valid Stylevars, so you will need to adjust these to the actual Stylevars you are wanting to use.

Levelbest
11-13-2015, 03:30 PM
Thanks folks... Will give it a shot this afternoon.

--------------- Added 1447440667 at 1447440667 ---------------

Let me just say - you guys are awesome. And the solution is elegant in it's simplicity and execution. Can't thank you enough!