vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   rotating banners (https://vborg.vbsupport.ru/showthread.php?t=136053)

barbiedoll 01-10-2007 12:17 AM

rotating banners
 
:) I am new to all this.. And am looking for some help getting rotating banners in the header of our website.. I have a picture there now.. I have downloaded a rotating banner mod from here.. but have tried.. & tried & cannot get it to work. I know I am just missing something really small & stupid..

I have examples of what I am doing in another thread in Mod section

Here is the link.. https://vborg.vbsupport.ru/showthrea...12#post1152912

Kirk Y 01-10-2007 12:34 AM

This is what I do...

Create a new Plugin at hook location 'global_start' with the following contents:
PHP Code:

$random_number rand(14);

$random_banner[1] = 'images/logo1.jpg';
$random_banner[2] = 'images/logo2.jpg';
$random_banner[3] = 'images/logo3.jpg';
$random_banner[4] = 'images/logo4.jpg'

If you want to add a banner, just add a new line, change the variable name (_banner[x]), and then increase the rand(1,4), where 4 is the number of banners you have. If you want to remove a banner, just get rid of the line and then decrease the rand(1,4).

Then edit your 'header' template as follows...

Find:
Code:

$stylevar[titleimage]
Replace with:
Code:

$random_banner[$random_number]

barbiedoll 02-01-2007 12:36 AM

Thank you.. !!!! How about centering it??

Kirk Y 02-01-2007 12:51 AM

Find:
Code:

<td align="$stylevar[left]">
Replace with:
Code:

<td align="center">
Should do it...

barbiedoll 03-18-2007 02:12 AM

Thank you !!!!!

Is there any way to add links to the banner's.. So if you would click on the banner it would take you to that ad's website??

Chicago_VLNU_4s 03-18-2007 02:48 AM

good work acid. Could be useful

4x4 Mecca 03-18-2007 04:01 AM

Quote:

Originally Posted by acidburn0520 (Post 1155083)
This is what I do...

Create a new Plugin at hook location 'global_start' with the following contents:
PHP Code:

$random_number rand(14);

$random_banner[1] = 'images/logo1.jpg';
$random_banner[2] = 'images/logo2.jpg';
$random_banner[3] = 'images/logo3.jpg';
$random_banner[4] = 'images/logo4.jpg'

If you want to add a banner, just add a new line, change the variable name (_banner[x]), and then increase the rand(1,4), where 4 is the number of banners you have. If you want to remove a banner, just get rid of the line and then decrease the rand(1,4).

Then edit your 'header' template as follows...

Find:
Code:

$stylevar[titleimage]
Replace with:
Code:

$random_banner[$random_number]

Thanks! I've set it up, and it works great!

mamashid 03-19-2007 05:29 PM

i cant get it to work either way...LOL

Chicago_VLNU_4s 04-04-2007 07:35 PM

ok, got it finally. What about if I wanted it in user cp? I tried to make this same hook in Usercp_complete and it displayed at the very top


All times are GMT. The time now is 11:12 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.01135 seconds
  • Memory Usage 1,739KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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