<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: CSS Random Background Image Rotation</title>
	<atom:link href="http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/</link>
	<description>Lafinboy's notes on CSS, (X)HTML, Web2.0, et al</description>
	<pubDate>Fri, 16 May 2008 04:15:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: ed harrison</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22289</link>
		<dc:creator>ed harrison</dc:creator>
		<pubDate>Mon, 17 Mar 2008 16:48:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22289</guid>
		<description>John try this.

On your import url change link to "  ("/dynamic_css.php")  ".

Your just adding the " / " to it.

With no images the choice is the link to dynamic_css.php is wrong or the link to the images folder is wrong.</description>
		<content:encoded><![CDATA[<p>John try this.</p>
<p>On your import url change link to &#034;  (&#034;/dynamic_css.php&#034;)  &#034;.</p>
<p>Your just adding the &#034; / &#034; to it.</p>
<p>With no images the choice is the link to dynamic_css.php is wrong or the link to the images folder is wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22284</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 17 Mar 2008 14:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22284</guid>
		<description>Thanks ed for the quick response

i have taken out that line from the css, but now i do have any images

Thanks for any help i dont have that much experience with PHP or CSS</description>
		<content:encoded><![CDATA[<p>Thanks ed for the quick response</p>
<p>i have taken out that line from the css, but now i do have any images</p>
<p>Thanks for any help i dont have that much experience with PHP or CSS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dietmar</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22282</link>
		<dc:creator>Dietmar</dc:creator>
		<pubDate>Mon, 17 Mar 2008 14:26:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22282</guid>
		<description>Thanks a lot!

I found the problem: I'm working on a Mac, and the ._header3.jpg is the thumbnail file. 

Now the problem should be fixed.

dietmar</description>
		<content:encoded><![CDATA[<p>Thanks a lot!</p>
<p>I found the problem: I&#039;m working on a Mac, and the ._header3.jpg is the thumbnail file. </p>
<p>Now the problem should be fixed.</p>
<p>dietmar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ed harrison</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22279</link>
		<dc:creator>ed harrison</dc:creator>
		<pubDate>Mon, 17 Mar 2008 13:36:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22279</guid>
		<description>John I see in your css file this.

#header{ background-image:url(images/random-images/yatch-image-swap-3.jpg)}

Remove that line. Your $element is also " header " in the random php code as seen on this line of your page code 


 &#160;
 
</description>
		<content:encoded><![CDATA[<p>John I see in your css file this.</p>
<p>#header{ background-image:url(images/random-images/yatch-image-swap-3.jpg)}</p>
<p>Remove that line. Your $element is also &#034; header &#034; in the random php code as seen on this line of your page code </p>
<p> &nbsp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22261</link>
		<dc:creator>John</dc:creator>
		<pubDate>Mon, 17 Mar 2008 08:34:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22261</guid>
		<description>I have problems with getting the images to change? i have kept the script as is,but i only get one image.

test Site: 

http://www.jdwebsolutions-testarea51.com/registerayatch/about-register-a-yacht.html 

any help would be great.

Thanks

John</description>
		<content:encoded><![CDATA[<p>I have problems with getting the images to change? i have kept the script as is,but i only get one image.</p>
<p>test Site: </p>
<p><a href="http://www.jdwebsolutions-testarea51.com/registerayatch/about-register-a-yacht.html" rel="nofollow">http://www.jdwebsolutions-testarea51.com/registerayatch/about-register-a-yacht.html</a> </p>
<p>any help would be great.</p>
<p>Thanks</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ed harrison</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22242</link>
		<dc:creator>ed harrison</dc:creator>
		<pubDate>Sun, 16 Mar 2008 22:15:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22242</guid>
		<description>To Dietmar. Thanks for info.

Checked your site again and saw two things.

When the header image fails right click the area and pick " view background image ". The name of the image has changed. Example " header3.jpg " becomes " ._header3.jpg ".

Now your server thinks that is a good file. Just type in

http://www.zonewicz.de/img/random/._header3.jpg

You dont get a 404 error.

Make sure your random image folder only has good image files in it.

I also noticed your element is called " container " and in your css file you also have " #container ". When I did my random images I placed all my css for the random images in the " dynamic_css.php " file on the $css line.</description>
		<content:encoded><![CDATA[<p>To Dietmar. Thanks for info.</p>
<p>Checked your site again and saw two things.</p>
<p>When the header image fails right click the area and pick &#034; view background image &#034;. The name of the image has changed. Example &#034; header3.jpg &#034; becomes &#034; ._header3.jpg &#034;.</p>
<p>Now your server thinks that is a good file. Just type in</p>
<p><a href="http://www.zonewicz.de/img/random/._header3.jpg" rel="nofollow">http://www.zonewicz.de/img/random/._header3.jpg</a></p>
<p>You dont get a 404 error.</p>
<p>Make sure your random image folder only has good image files in it.</p>
<p>I also noticed your element is called &#034; container &#034; and in your css file you also have &#034; #container &#034;. When I did my random images I placed all my css for the random images in the &#034; dynamic_css.php &#034; file on the $css line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dietmar</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22237</link>
		<dc:creator>Dietmar</dc:creator>
		<pubDate>Sun, 16 Mar 2008 21:18:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22237</guid>
		<description>Oups, I forget to tell: only the "index2.shtml" is for testing purposes. All the other sites are working well, but without same new improovememnts, like the image roatation.

So when you hit the reload button several times, sometimes there is no image loaded by the dynamic_css script.

dietmar</description>
		<content:encoded><![CDATA[<p>Oups, I forget to tell: only the &#034;index2.shtml&#034; is for testing purposes. All the other sites are working well, but without same new improovememnts, like the image roatation.</p>
<p>So when you hit the reload button several times, sometimes there is no image loaded by the dynamic_css script.</p>
<p>dietmar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ed harrison</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22230</link>
		<dc:creator>ed harrison</dc:creator>
		<pubDate>Sun, 16 Mar 2008 14:55:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22230</guid>
		<description>Dietmar I went to your site link and and went thru the pages and randomly updating the pages.

On the first page I did a page source and your " import url to dynamic_css.php " was there in  " index2.shtml ".

When your problem occurred, on links, I did a page source and " links.html " was missing the " import url to dynamic_css.php ".

So I went back to your home page, with menu, and did another page source and the file changed to " index.shtml " and it was missing " import url to dynamic_css.php ".

Then I manually went back to " index2.shtml " and all was fine.

It appears only file " index2.shtml " has the import url and some of your other pages dont have it. Plus your home button calls " index.stml " when it should call index2.shtml ".

You need to check you menu links. Plus the " import url " needs to be in all pages where you want to see the random image in header.</description>
		<content:encoded><![CDATA[<p>Dietmar I went to your site link and and went thru the pages and randomly updating the pages.</p>
<p>On the first page I did a page source and your &#034; import url to dynamic_css.php &#034; was there in  &#034; index2.shtml &#034;.</p>
<p>When your problem occurred, on links, I did a page source and &#034; links.html &#034; was missing the &#034; import url to dynamic_css.php &#034;.</p>
<p>So I went back to your home page, with menu, and did another page source and the file changed to &#034; index.shtml &#034; and it was missing &#034; import url to dynamic_css.php &#034;.</p>
<p>Then I manually went back to &#034; index2.shtml &#034; and all was fine.</p>
<p>It appears only file &#034; index2.shtml &#034; has the import url and some of your other pages dont have it. Plus your home button calls &#034; index.stml &#034; when it should call index2.shtml &#034;.</p>
<p>You need to check you menu links. Plus the &#034; import url &#034; needs to be in all pages where you want to see the random image in header.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dietmar</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22229</link>
		<dc:creator>Dietmar</dc:creator>
		<pubDate>Sun, 16 Mar 2008 14:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-22229</guid>
		<description>I'm having a problem with your script.
After some instant reloads there is no image displayed. Sometimes ths happens very often, sometimes not.

Actual testing page:
http://www.zonewicz.de/index2.shtml

Any suggestions.

Very much thx, dietmar</description>
		<content:encoded><![CDATA[<p>I&#039;m having a problem with your script.<br />
After some instant reloads there is no image displayed. Sometimes ths happens very often, sometimes not.</p>
<p>Actual testing page:<br />
<a href="http://www.zonewicz.de/index2.shtml" rel="nofollow">http://www.zonewicz.de/index2.shtml</a></p>
<p>Any suggestions.</p>
<p>Very much thx, dietmar</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amtcubus</title>
		<link>http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-21674</link>
		<dc:creator>amtcubus</dc:creator>
		<pubDate>Fri, 07 Mar 2008 16:31:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.thought-after.com/2006/05/26/css-random-background-image-rotation/#comment-21674</guid>
		<description>I use a different way to get my random background image, since this code didnt help me on my Server.

I have a php file wich is a little bit different then this one :

&#60;?php
//Setup
$base_dir= '/srv/www/htdocs';
$out_dir = '/html/pics/backgrounds/';

$img_folder = $base_dir . $out_dir;

//Do the Work
$out = null;

//Search only for *.gif files
$extensions = 'gif';
$extensions = explode('&#124;', $extensions);
$files = array(); 
if($img_folder == '') {
  $img_folder = './';
}
$handle = opendir($img_folder);
while(false !== ($file = readdir($handle))) {
  foreach($extensions as $extension) {
    if(preg_match("/\." . $extension . "$/x", $file)) {
      $files[] = $file;
      $x  ;
    }
  }
}
// Close the directory handle
closedir($handle);
if(phpversion() 

I include this file in my index.php at the top( include('path/to/file/random_bg.php'); ).

Then i use this in the  of my index.php :

  
    BODY {
		background:		url("'.$out.'") no-repeat;
		background-position:	100% 100%;
		background-attachment:	fixed;
		background-color:	#E8E8E8;
		font-family:		Batang;
		font-weight:		bold;
		font-size:		12pt;
	}
  

Note : Everything is still in the  and echo ' '; tags.

This way it works for me.</description>
		<content:encoded><![CDATA[<p>I use a different way to get my random background image, since this code didnt help me on my Server.</p>
<p>I have a php file wich is a little bit different then this one :</p>
<p>&lt;?php<br />
//Setup<br />
$base_dir= &#039;/srv/www/htdocs&#039;;<br />
$out_dir = &#039;/html/pics/backgrounds/&#039;;</p>
<p>$img_folder = $base_dir . $out_dir;</p>
<p>//Do the Work<br />
$out = null;</p>
<p>//Search only for *.gif files<br />
$extensions = &#039;gif&#039;;<br />
$extensions = explode(&#039;|', $extensions);<br />
$files = array();<br />
if($img_folder == &#034;) {<br />
  $img_folder = &#039;./&#039;;<br />
}<br />
$handle = opendir($img_folder);<br />
while(false !== ($file = readdir($handle))) {<br />
  foreach($extensions as $extension) {<br />
    if(preg_match(&#034;/\.&#034; . $extension . &#034;$/x&#034;, $file)) {<br />
      $files[] = $file;<br />
      $x  ;<br />
    }<br />
  }<br />
}<br />
// Close the directory handle<br />
closedir($handle);<br />
if(phpversion() </p>
<p>I include this file in my index.php at the top( include(&#039;path/to/file/random_bg.php&#039;); ).</p>
<p>Then i use this in the  of my index.php :</p>
<p>    BODY {<br />
		background:		url(&#034;&#039;.$out.&#039;&#034;) no-repeat;<br />
		background-position:	100% 100%;<br />
		background-attachment:	fixed;<br />
		background-color:	#E8E8E8;<br />
		font-family:		Batang;<br />
		font-weight:		bold;<br />
		font-size:		12pt;<br />
	}</p>
<p>Note : Everything is still in the  and echo &#039; &#039;; tags.</p>
<p>This way it works for me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
