vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   Navbar Customization - Display Ad on Homepage Only (https://vborg.vbsupport.ru/showthread.php?t=320714)

Levelbest 11-05-2015 02:42 PM

Navbar Customization - Display Ad on Homepage Only
 
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.

Code:


<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

Quote:

Originally Posted by squidsk (Post 2558725)
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
Code:

<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 [DATE]1447440667[/DATE] at [TIME]1447440667[/TIME] ---------------

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


All times are GMT. The time now is 08:57 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01065 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete