Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 01-10-2007, 12:17 AM
barbiedoll barbiedoll is offline
 
Join Date: Oct 2006
Location: Ohio
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 01-10-2007, 12:34 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]
Reply With Quote
  #3  
Old 02-01-2007, 12:36 AM
barbiedoll barbiedoll is offline
 
Join Date: Oct 2006
Location: Ohio
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you.. !!!! How about centering it??
Reply With Quote
  #4  
Old 02-01-2007, 12:51 AM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find:
Code:
<td align="$stylevar[left]">
Replace with:
Code:
<td align="center">
Should do it...
Reply With Quote
  #5  
Old 03-18-2007, 02:12 AM
barbiedoll barbiedoll is offline
 
Join Date: Oct 2006
Location: Ohio
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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??
Reply With Quote
  #6  
Old 03-18-2007, 02:48 AM
Chicago_VLNU_4s Chicago_VLNU_4s is offline
 
Join Date: Mar 2006
Location: Chicago
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

good work acid. Could be useful
Reply With Quote
  #7  
Old 03-18-2007, 04:01 AM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acidburn0520 View Post
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!
Reply With Quote
  #8  
Old 03-19-2007, 05:29 PM
mamashid mamashid is offline
 
Join Date: Jan 2007
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i cant get it to work either way...LOL
Reply With Quote
  #9  
Old 04-04-2007, 07:35 PM
Chicago_VLNU_4s Chicago_VLNU_4s is offline
 
Join Date: Mar 2006
Location: Chicago
Posts: 453
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
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 05:49 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.05410 seconds
  • Memory Usage 2,249KB
  • 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
  • (6)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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