vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Random "Odd" and "Even" Banners (https://vborg.vbsupport.ru/showthread.php?t=222794)

Mary303 09-09-2009 01:21 PM

Random "Odd" and "Even" Banners
 
I want to have two "random" banners on each page. The code in the [default?? I am new to this, so I am unsure] template says:

PHP Code:

$random_banner[$random_number]
$random_banner[$random_number

Of course, this produces two instances of the same ad. Easiest way to adapt this would seem to be to have one area set to display ads with odd numbers and another area to display ads with even numbers. Is there a built-in vB function for this or do I need a mod? And if I need a mod, is there a relatively simple one that will rotate banners only on page load or page refresh? I don't need want them to rotate at any other time, don't need hit counts or banners targeted to specific forums. Thanks in advance for any help. :)

Lynne 09-09-2009 02:10 PM

Questions regarding specific modifications need to be asked in the modification thread. I would guess that all you need to do is change the second instance to use $random_number_2 and just define that in the plugins you are using.

Mary303 09-09-2009 03:02 PM

Quote:

Originally Posted by Lynne (Post 1882053)
I would guess that all you need to do is change the second instance to use $random_number_2 and just define that in the plugins you are using.

Thank you - I will fiddle with it!


All times are GMT. The time now is 09:20 AM.

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.01047 seconds
  • Memory Usage 1,714KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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