Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Alternating Random Background Images 
 
I am using Rainbow Pearl and Black Pearl in my new forum but would like to alternate the background image in the header.  I have tried adapting what I have read to suit but without success.

Is this even possible?

Thank you
 



 
CrocodileSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Alternating Random Background Images 
 
hi i use black pearl, can you clarify what you want to do exactly?
 




____________
www.DutchaGoGo.com (development/under construction ...Forever?¿?)
 
Joshua203Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Alternating Random Background Images 
 
Sorry.  I guess I wasn't clear.

I am using a background image in the header of my site.  Check it out here.

I would like to alternate that image.  How do I do it?

thanks
 



 
CrocodileSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Alternating Random Background Images 
 
uuhm looking at that link i guess you have to replace site-logo-6.png
 




____________
www.DutchaGoGo.com (development/under construction ...Forever?¿?)
 
Joshua203Send private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Alternating Random Background Images 
 
I answered here:
http://www.phpbb.com/community/view...72585#p11772585

Mighty Gorgon wrote: 
You should alter top_header.png in stylesheet.css with the dynamically generated image.

Code: [Download] [Hide]
  1. #top_logo{  
  2.     border-width: 0px 0px 0px 0px;  
  3.     margin: 0px 0px 0px 0px;  
  4.     padding: 0px 0px 0px 0px;  
  5.     background: url('./images/top_header.png') repeat;  
  6.     height: 150px;  


You need a dynamic image and there are several ways for doing that.

Usually you should code a php files which generate the images and then use directly the PHP files (with correct headers) or use an htaccess rule to redirect a PNG call to the PHP files.

So in a nutshell, here is a demo for a dynamic PHP image (supposing you have the JPG files listed in the array):
Code: [Download] [Hide]
  1. <?php  
  2.  
  3. $img_array = array('bkg_01.jpg', 'bkg_02.jpg', 'bkg_03.jpg', 'bkg_04.jpg', 'bkg_05.jpg', 'bkg_06.jpg', 'bkg_07.jpg', 'bkg_08.jpg', 'bkg_09.jpg', 'bkg_10.jpg', 'bkg_11.jpg', 'bkg_12.jpg', 'bkg_13.jpg', 'bkg_14.jpg', 'bkg_15.jpg');  
  4.  
  5. $img_rnd = rand(0, sizeof($img_array) - 1);  
  6.  
  7. header('Content-type: image/jpg');  
  8. header('Content-Disposition: filename=' . $img_array[$img_rnd]);  
  9. readfile($img_array[$img_rnd]);  
  10.  
  11. ?> 


Suppose you call this PHP file my_bg.php then you can use this file directly in the CSS (or use htaccess to redirect that file using a JPG call instead).

 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML

HideSimilar Topics

Topic Author Forum Replies Last Post
This topic is locked: you cannot edit posts or make replies. Alternating Post Alignment tc1967uk Old Support Topics 0 Mon 30 Apr, 2007 07:41 View latest post
tc1967uk
No new posts Random Attachments Domic Old Support Topics 0 Fri 25 Apr, 2008 12:42 View latest post
Domic
No new posts Random Images And Banners Wylie Old Styles Topics 0 Fri 12 Sep, 2008 01:31 View latest post
Wylie
No new posts Random Background Changer Mighty Gorgon Free PHP Scripts 6 Tue 13 Sep, 2011 16:28 View latest post
Joshua203
No new posts Random Avatar Mighty Gorgon Free PHP Scripts 8 Sat 22 Oct, 2011 07:27 View latest post
Joshua203




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron