Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2006, 03:19 PM
bradg bradg is offline
 
Join Date: Jan 2006
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How can I modifiy this code to show one banner at a time on page reload?

This code is inside a array:

<if condition="in_array($forumid, array(59))">
<div align="center"><a href="http://www.zinkcalls.com"><img src="images/banners/zc_banner.gif" width="468" height="60">&nbsp<a
href="http://www.callingducks.com"><img src="images/banners/cdc_banner_001.jpg" width="469" height="60"></div>
<else />

<if condition="in_array($forumid, array(59))">
<div align="center"><a href="http://www.zinkcalls.com"><img src="images/banners/zc_banner.gif" width="468" height="60">&nbsp<a
href="http://www.callingducks.com"><img src="images/banners/cdc_banner_001.jpg" width="469" height="60"></div>
<else />
Reply With Quote
  #2  
Old 11-16-2006, 03:55 PM
VBUsers's Avatar
VBUsers VBUsers is offline
 
Join Date: Aug 2004
Posts: 830
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

why not just use the banner rotator hack?
Reply With Quote
  #3  
Old 11-16-2006, 06:07 PM
bradg bradg is offline
 
Join Date: Jan 2006
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBUsers View Post
why not just use the banner rotator hack?
Its already has a Hack check out the thread I posted yesterday was trying to get a answer to the following?

I found a banner plugin call banner with this code:

$random_number = rand(1, 4);

$random_banner[1] = '<a href="http://www.averyoutdoors.com" target="_blank"><img src="images/banners/GHGDucks.gif" alt="Greenhead Gear" border="0" /></a>';
$random_banner[2] = '<a href="http://www.averyoutdoors.com" target="_blank"><img src="images/banners/GHGDucks2.gif" alt="Greenhead Gear" border="0" /></a>';
$random_banner[3] = '<a href="http://www.averyoutdoors.com" target="_blank"><img src="images/banners/GHGGeese.gif" alt="Greenhead Gear" border="0" /></a>';
$random_banner[4] = '<a href="http://www.mackspw.com/sort.asp?search=GHG" target="_blank"><img src="images/banners/Macks1.gif" alt="Macks Prarie Wings" border="0" /></a>';



but I found this array in the navbar:

<!-- / PAGENAV POPUP -->
</if>
<!-- / BANNERS -->
<if condition="in_array($forumid, array(59))">
<div align="center"><a href="http://www.zinkcalls.com"><img src="images/banners/zc_banner.gif" width="468" height="60">&nbsp<a href="http://www.callingducks.com"><img src="images/banners/cdc_banner_001.jpg" width="469" height="60"></div>
<else />
<if condition="in_array($forumid, array(61))">
<div align="center"><a href="http://www.waterdogtv.com"><img src="images/banners/waterdog_banner.jpg" width="468" height="60"></div>
<else />
<if condition="in_array($forumid, array(54))">
<div align="center"><a href="http://www.flocknockers.com"><img src="images/banners/flocknocker.gif" width="468" height="60"></div>
<else />
<div align="center">$random_banner[$random_number]</div><br>
</div></if></if></if>


I need to add banners to certain forum id, and have them change each time the page reloads!

I keep running into a wall, because nothing is working, I also dont know if i'm having conflicts of codes.

can anyone help with this issue?
Reply With Quote
Reply


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 04:42 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.06922 seconds
  • Memory Usage 2,183KB
  • 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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete