vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Random Background Image in Postbit? (https://vborg.vbsupport.ru/showthread.php?t=188530)

Jaxel 08-19-2008 04:15 AM

Random Background Image in Postbit?
 
I saw some other forums do this, so I know its possible...

If you visit a page on my forum: http://www.8wayrun.com/showthread.php?t=1

You will see that the postbit has a background image. If you keep refreshing the page, you will see that the background image rotates between another image. I am doing this with a script I found here: http://alistapart.com/articles/randomizer/ . I call the script in the background section of First Alternating Color in my style preferences with:
Code:

#EEEEEE url(http://www.8wayrun.com/customstyles/exm-light/postbit.php) no-repeat top right
The postbit.php automatically searches the directory and randomly choses and image to display.

So whats the problem? Well as you will notice, even though the randomizer works, it only works ONCE per page load. I would like it to randomly chose and image everytime its called in the page... which should be in every post bit. With any luck, each post will have it's own background image. Does anyone know how I can do this? Possibly be able to fix the code in the postbit.php? Please, no javascript; and I would prefer to be able to continue calling it in the CSS stylesheets; the less template editing the better.


All times are GMT. The time now is 07:39 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.00949 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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