View Single Post
  #1  
Old 03-15-2007, 11:18 PM
2 FN LOW 2 FN LOW is offline
 
Join Date: Feb 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Rotating Header Images

Can anybody help me set up a header so it will rotate images when the page refreshes?

i have tried abunch of the mods/hacks on this site and i cant seem to get any of them to work. I have no idea where im going wrong..If somebody can take a walk through with me that would be great. Thanks

heres what i have done....My header is already modified to begin with, so i think thats where i keep messing up...

i am using these instructions..

Quote:
Random Header Image
by filburt1

1. Save all your header images in the format headerN.jpg, where N goes from 1 to the total number of header images.


2. Add the following to your phpinclude template, changing "customimages/headerimages/" to the location of your header image. Replacements will not likely work so you probably won't be able to use {imagesfolder}:

$totalheaderimages = 4; // change to the number of header images you have
$randomindex = rand(1, $totalheaderimages);
$headerimage = "customimages/toptitles/toptitle$randomindex.jpg";


3. In your header template, replace:

{titleimage}

with

$headerimage


Done.
so i create a folder on my server called forumbanners....I then go about adding the plugin...there are 7images im using so i change the plugin code to this

Quote:
$random_number = rand(1, 7);

$random_banner[1] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner1.gif" alt="" border="0" /></a>';
$random_banner[2] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner2.gif" alt="" border="0" /></a>';
$random_banner[3] = '<a href="http://www.obsession2sped.com/forums"><img src="forumbanner/banner3.gif" alt="" border="0" /></a>';
$random_banner[4] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner4.gif" alt="" border="0" /></a>';
$random_banner[5] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner5.gif" alt="" border="0" /></a>';
$random_banner[6] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner6.gif" alt="" border="0" /></a>';
$random_banner[7] = '<a href="http://www.obsession2speed.com/forums"><img src="forumbanner/banner7.gif" alt="" border="0" /></a>';
now this is where i get lost...the instructions say
In your header template, replace:

{titleimage}

with

$headerimage


My header template looks like this...
Quote:
<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>

</tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output
i changed what it says to change and no pictures come up at all...just a link that says the name of my forums...I dont understand where i am going wrong...By the way, i am using the newest version of VB and i installed the plugin for PHP in global_start.

anybody....?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01361 seconds
  • Memory Usage 1,780KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete