<?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: In pursuit of rotated polaroids</title>
	<atom:link href="http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/</link>
	<description>Links, technical notes, whatnot.</description>
	<pubDate>Mon, 06 Oct 2008 18:53:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: leu</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-1891</link>
		<dc:creator>leu</dc:creator>
		<pubDate>Thu, 23 Mar 2006 20:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-1891</guid>
		<description>wow, found this through google, it is just what i needed.

Thank you very much :)</description>
		<content:encoded><![CDATA[<p>wow, found this through google, it is just what i needed.</p>
<p>Thank you very much <img src='http://www.notes.xythian.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roxanne</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-1798</link>
		<dc:creator>Roxanne</dc:creator>
		<pubDate>Sat, 11 Feb 2006 22:46:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-1798</guid>
		<description>Very nice! Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>Very nice! Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eduo</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-1379</link>
		<dc:creator>eduo</dc:creator>
		<pubDate>Mon, 05 Dec 2005 18:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-1379</guid>
		<description>Something else that might be done is to leave the background url in the CSS as it is but specify it as well in the header.php section, calling it again in a style tag.

The way I have something similar to this set-up is to load a random image from the header.php section and if for whatever reason the image is not accessibly/not there/etc. then it'll load the default one from the .css file. This has the advantage of not processing the CSS file, being easy to integrate directly in the header.php file and thus avoiding set-up problems and to lessen the load on the server (which can just serve the CSS file to the clients without preprocessing it and then the clients can just cache it normally).

It took a while for me to comment on this, but I thought it could help others. I love this theme but I'm not using it yet but this method I outlined is the one I'm using right now in a connections theme (which I use for testing, mostly)</description>
		<content:encoded><![CDATA[<p>Something else that might be done is to leave the background url in the CSS as it is but specify it as well in the header.php section, calling it again in a style tag.</p>
<p>The way I have something similar to this set-up is to load a random image from the header.php section and if for whatever reason the image is not accessibly/not there/etc. then it&#8217;ll load the default one from the .css file. This has the advantage of not processing the CSS file, being easy to integrate directly in the header.php file and thus avoiding set-up problems and to lessen the load on the server (which can just serve the CSS file to the clients without preprocessing it and then the clients can just cache it normally).</p>
<p>It took a while for me to comment on this, but I thought it could help others. I love this theme but I&#8217;m not using it yet but this method I outlined is the one I&#8217;m using right now in a connections theme (which I use for testing, mostly)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-381</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Mon, 10 Oct 2005 00:29:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-381</guid>
		<description>Oops, looks like php code got munged in my comment..

Step (2) should be:

	&#60;?php
	/* Fetch a random polaroaid image in the travelogue/images/polaroids directory
	   based on
	      http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/
	*/
	
	$randy = 'wp-content/themes/travelogue';
	
	$fileList = array();
	$handle = opendir($randy . '/images/polaroids');
	while ( false !== ( $file = readdir($handle) ) ) {
		$file_info = pathinfo($file);
		if ('jpg' == strtolower( $file_info['extension'])) {
			$fileList[] = $file;
		}
	}
	closedir($handle);

	$randy .= '/images/polaroids/' . $fileList[time() % count($fileList)];
	?&#62;
	
&#60;style type="text/css" media="screen"&#62;
.polaroid1 {
	background: url('&#60;?php echo $randy?&#62;') no-repeat;
}

&#60;/style&#62;</description>
		<content:encoded><![CDATA[<p>Oops, looks like php code got munged in my comment..</p>
<p>Step (2) should be:</p>
<p>	&lt;?php<br />
	/* Fetch a random polaroaid image in the travelogue/images/polaroids directory<br />
	   based on<br />
	      <a href="http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/" rel="nofollow">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/</a><br />
	*/</p>
<p>	$randy = &#8216;wp-content/themes/travelogue&#8217;;</p>
<p>	$fileList = array();<br />
	$handle = opendir($randy . &#8216;/images/polaroids&#8217;);<br />
	while ( false !== ( $file = readdir($handle) ) ) {<br />
		$file_info = pathinfo($file);<br />
		if (&#8217;jpg&#8217; == strtolower( $file_info['extension'])) {<br />
			$fileList[] = $file;<br />
		}<br />
	}<br />
	closedir($handle);</p>
<p>	$randy .= &#8216;/images/polaroids/&#8217; . $fileList[time() % count($fileList)];<br />
	?&gt;</p>
<p>&lt;style type=&#8221;text/css&#8221; media=&#8221;screen&#8221;&gt;<br />
.polaroid1 {<br />
	background: url(&#8217;&lt;?php echo $randy?&gt;&#8217;) no-repeat;<br />
}</p>
<p>&lt;/style&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-380</link>
		<dc:creator>Alan</dc:creator>
		<pubDate>Mon, 10 Oct 2005 00:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-380</guid>
		<description>Thanks for the code! I did a slight twist to reduce the number of set up steps.

(1) Comment out the polaroid1 class in style.css

(2) In header,php, put in the HEAD section (below the REL tag for the stylesheet):

	
	

.polaroid1 {
	background: url('') no-repeat;
}

</description>
		<content:encoded><![CDATA[<p>Thanks for the code! I did a slight twist to reduce the number of set up steps.</p>
<p>(1) Comment out the polaroid1 class in style.css</p>
<p>(2) In header,php, put in the HEAD section (below the REL tag for the stylesheet):</p>
<p>.polaroid1 {<br />
	background: url(&#8221;) no-repeat;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Purple Baron</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-292</link>
		<dc:creator>Purple Baron</dc:creator>
		<pubDate>Sat, 16 Jul 2005 03:00:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-292</guid>
		<description>Hi, Do you have a downloadable theme that makes it simple to change the photo?  I like your great improvement, but dont have the know-how to do this on my site.

PurpleBaron.</description>
		<content:encoded><![CDATA[<p>Hi, Do you have a downloadable theme that makes it simple to change the photo?  I like your great improvement, but dont have the know-how to do this on my site.</p>
<p>PurpleBaron.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lynn</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-186</link>
		<dc:creator>Lynn</dc:creator>
		<pubDate>Sun, 15 May 2005 21:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-186</guid>
		<description>That's pretty cool.  I also may want to borrow some time (way, way) in the future.  At the moment I can barely handle developing a css page I can stand, though.
</description>
		<content:encoded><![CDATA[<p>That&#8217;s pretty cool.  I also may want to borrow some time (way, way) in the future.  At the moment I can barely handle developing a css page I can stand, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-185</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Sat, 14 May 2005 21:30:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.notes.xythian.net/2005/05/14/in-pursuit-of-random-polaroids/#comment-185</guid>
		<description>Ken, great work on improving my Travelogue theme! This implementation of the random image is what I had wanted to do originally, but felt it would have been a little too complex for the average user. Kudos to you!

Perhaps in the future I'll have to ask your permission to borrow this code, no sense in reinventing the wheel. Thanks and good luck!</description>
		<content:encoded><![CDATA[<p>Ken, great work on improving my Travelogue theme! This implementation of the random image is what I had wanted to do originally, but felt it would have been a little too complex for the average user. Kudos to you!</p>
<p>Perhaps in the future I&#8217;ll have to ask your permission to borrow this code, no sense in reinventing the wheel. Thanks and good luck!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
