Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 03-19-2007, 02:05 AM
TheRed's Avatar
TheRed TheRed is offline
 
Join Date: Oct 2003
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could try using an external script like phpads, there are many open source scripts.
Reply With Quote
  #3  
Old 12-19-2007, 05:59 PM
faqcorner faqcorner is offline
 
Join Date: Apr 2007
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 2 FN LOW View Post
In your header template, replace:

{titleimage}

with

$headerimage


My header template looks like this...


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....?
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
see the "logo" and "/logo"? "$stylevar[titleimage]" I THINK would do it
Reply With Quote
  #4  
Old 12-19-2007, 06:10 PM
jdbnsnobal.net jdbnsnobal.net is offline
 
Join Date: Dec 2007
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We have set this up on our forum www.thebestcasescenario.com (look at front page and refresh, the images rotate every 60 seconds). I'll try to get that code for you and post it here.
Reply With Quote
Reply


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 04:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03646 seconds
  • Memory Usage 2,194KB
  • 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
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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