vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   A Simple PHP Banner Rotator? (https://vborg.vbsupport.ru/showthread.php?t=124834)

Tammy05 10-14-2006 06:01 PM

Quote:

Originally Posted by acidburn0520
It will work on any version of vBulletin that supports the Plugin System. At the moment, anything 3.5.x and up.

thast odd because i did everyting correctly however the header area showed up empty.

Kirk Y 10-14-2006 06:23 PM

I'm using it on my 3.6.2 forum, so I can assure you that it works. Recheck all the steps and be sure you didn't miss something.

bada_bing 10-15-2006 12:54 AM

subscribes

Shazz 10-15-2006 01:00 AM

Thats the most easiest plugin and cleanest to install
If there was reputation stats I would add one to you acidburn0520
/me props*

Kirk Y 10-15-2006 01:07 AM

lol, thanks Shazz. Happy to help. :)

Criticize 02-07-2007 01:07 PM

My banners are not rotating, I have 5 that are currently setup but two of the same banners keep showing. Please help me.

www.club246.com is the site

Thank you!

Kirk Y 02-07-2007 04:15 PM

It's all random, each banner has a 1/5 chance of being displayed... assuming you've installed it right, you'll eventually see them all. Post up the Plugin code you're using just be sure, though.

double_d 01-06-2008 06:14 AM

Quote:

Originally Posted by Kirk Y (Post 1059879)
Okay, let me see if I can explain it better:

Add a New Plugin using Hook Location "global_start".
Code:

$random_number = rand(1, 5);

$random_banner[1] = '<a href="http://www.link1.com/"><img src="path/to/banner1.gif" alt="" border="0" /></a>';
$random_banner[2] = '<a href="http://www.link2.com/"><img src="path/to/banner2.gif" alt="" border="0" /></a>';
$random_banner[3] = '<a href="http://www.link3.com/"><img src="path/to/banner3.gif" alt="" border="0" /></a>';
$random_banner[4] = '<a href="http://www.link4.com/"><img src="path/to/banner4.gif" alt="" border="0" /></a>';
$random_banner[5] = '<a href="http://www.link5.com/"><img src="path/to/banner5.gif" alt="" border="0" /></a>';

Remember to change all the Image Paths to the location of the banners you want to display.

Then edit whatever template you'd like to display the random banner in and stick this code wherever you'd like it to show:
Code:

$random_banner[$random_number]

what does this mean
i would like this
do i have to write a php script and call it global_start ???
only new at this
please help me

daniel d

MoT3rror 01-06-2008 06:49 AM

Hook Location: global_start (Makes it available on anypage)
Title: Random Banner (You can make your own name)
Execution Order: 1
PHP Code:
Quote:

$random_number = rand(1, 5);

$random_banner[1] = '<a href="http://www.link1.com/"><img src="path/to/banner1.gif" alt="" border="0" /></a>';
$random_banner[2] = '<a href="http://www.link2.com/"><img src="path/to/banner2.gif" alt="" border="0" /></a>';
$random_banner[3] = '<a href="http://www.link3.com/"><img src="path/to/banner3.gif" alt="" border="0" /></a>';
$random_banner[4] = '<a href="http://www.link4.com/"><img src="path/to/banner4.gif" alt="" border="0" /></a>';
$random_banner[5] = '<a href="http://www.link5.com/"><img src="path/to/banner5.gif" alt="" border="0" /></a>';
Plugin is Active: Yes

Then you put
Quote:

$random_banner[$random_number]
in a template.

Kirk Y 01-06-2008 04:11 PM

AdminCP -> Products & Plugins -> Add New Plugin


All times are GMT. The time now is 10:26 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.02089 seconds
  • Memory Usage 1,737KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete