vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   New banner on refresh? (https://vborg.vbsupport.ru/showthread.php?t=95219)

Xplorer4x4 08-28-2005 01:24 PM

New banner on refresh?
 
I was wodnering how I could make my forums banner change when a page is refreshed?

Bassicly what I am trying to achieve is the same thing that happens here at vbulletin.org. When you refresh or load a new page the forum banner changes randonley.

Could somone please explain how to do this? I would grateley apreciate it. :)

Dan 08-28-2005 01:52 PM

There are quite a few ways to do it may want to search in google but this is how i accomplish random banner images on my blog.

PHP Code:

<?php
$data
[] = "image1";
$data[] = "image2";
$data[] = "image3";
$data[] = "image4";
$banner array_rand($data);
// print out whatever with $banner in it
?>

Put that somewhere torwards the top. (With vBulletin you may need to put this in the php files but I am not sure where it would really go.)

PHP Code:

<img href="<?php echo $data["$banner"]; ?>" />

And that would pick the random image!

Xplorer4x4 08-28-2005 02:09 PM

Thanks anyways but i believe i figuered it out. But suggestions are still welcome :p


All times are GMT. The time now is 08:19 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.01070 seconds
  • Memory Usage 1,714KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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