Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
  #1  
Old 11-05-2015, 02:42 PM
Levelbest Levelbest is offline
 
Join Date: Sep 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 11-09-2015, 07:58 PM
Levelbest Levelbest is offline
 
Join Date: Sep 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone have any idea how to accomplish this on vb4? Would really appreciate the help.
Reply With Quote
  #3  
Old 11-13-2015, 02:31 PM
Levelbest Levelbest is offline
 
Join Date: Sep 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now I've moved into begging mode? Anyone? Anyone? Bueller?
Reply With Quote
  #4  
Old 11-13-2015, 03:14 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
Levelbest
  #5  
Old 11-13-2015, 03:22 PM
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Location: DFW, Texas
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by squidsk View Post
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.
Reply With Quote
Благодарность от:
Levelbest
  #6  
Old 11-13-2015, 03:30 PM
Levelbest Levelbest is offline
 
Join Date: Sep 2005
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Благодарность от:
Dragonsys
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:50 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04811 seconds
  • Memory Usage 2,215KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (3)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete