<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Bob&apos;s Blog - ColdFusion Tidbits - BlogCFC</title>
			<link>http://www.silverwareconsulting.com/index.cfm</link>
			<description>Some stuff about ColdFusion and Transfer</description>
			<language>en-us</language>
			<pubDate>Thu, 09 Sep 2010 05:06:41 -0400</pubDate>
			<lastBuildDate>Wed, 18 Jun 2008 11:15:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>bob.silverberg@gmail.com</managingEditor>
			<webMaster>bob.silverberg@gmail.com</webMaster>
			
			<item>
				<title>Rotating Banner for BlogCFC - Hack Warning!</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2008/6/18/Rotating-Banner-for-BlogCFC--Hack-Warning</link>
				<description>
				
				So after making my site look pretty, and creating my banner image, I decided that I&apos;d like to create a few images and have them rotate randomly on my blog.  The first complication I discovered is that all of the pages are cached by BlogCFC, so simply introducing code into layout.cfm to rotate the image wouldn&apos;t work.&lt;/p&gt;
&lt;p&gt;Having spent a few hours last night messing with BlogCFC code, I didn&apos;t really want to delve into it again to figure out a way around the caching issue, so I came up with a solution that is probably the &quot;hackiest&quot; thing I&apos;ve done in ages.&lt;/p&gt;
&lt;p&gt;I set up a scheduled task in CF that will randomly select one of 5 images that I&apos;ve created for banner and then copy that image overtop of an image called MyBanner.jpg.  MyBanner.jpg is what my img tag points to in layout.cfm. I&apos;m running that task hourly, so now, even though the page stays cached, the image rotates randomly every hour.&lt;/p&gt;
&lt;p&gt;Here&apos;s the code for RotateBanner.cfm:
&lt;code&gt;
&lt;cfset dir = expandPath(&quot;images/&quot;) /&gt;
&lt;cfset ImageList = &quot;chile_banner_2,chile_banner_3,chile_banner_5,chile_banner_6,chile_banner_7&quot; /&gt;
&lt;cffile action=&quot;copy&quot; source=&quot;#dir##ListGetAt(ImageList,RandRange(1,ListLen(ImageList)))#.jpg&quot; destination=&quot;#dir#MyBanner.jpg&quot;&gt;
&lt;/code&gt;
&lt;/p&gt;
&lt;p&gt;I&apos;m not particularly proud of the code, but hey, I got the job done in about 10 minutes.&lt;/p&gt; 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>BlogCFC</category>				
				
				<pubDate>Wed, 18 Jun 2008 11:15:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2008/6/18/Rotating-Banner-for-BlogCFC--Hack-Warning</guid>
				
			</item>
			
			<item>
				<title>My New BlogCFC Skin</title>
				<link>http://www.silverwareconsulting.com/index.cfm/2008/6/18/My-New-BlogCFC-Skin</link>
				<description>
				
				Now that I&apos;ve started trying to blog more regularly, and now that some people are actually viewing my blog, I figured it was time to ditch the lovely &lt;a href=&quot;http://blogcfc.riaforge.org/&quot;&gt;BlogCFC&lt;/a&gt; vanilla skin and make things a bit prettier around here.&lt;/p&gt;
&lt;p&gt;I was a bit intimidated at first, being very much a back-end developer and not having done much work with css in quite awhile.  With a little moral support from &lt;a href=&quot;http://www.fancybread.com/blog/&quot;&gt;Paul Marcotte&lt;/a&gt;, I found a &lt;a href =&quot;http://www.styleshout.com/templates/preview/Outdoor1-0/index.html&quot;&gt;css template&lt;/a&gt; that I liked at &lt;a href=&quot;http://www.styleshout.com/&quot;&gt;Styleshout.com&lt;/a&gt;, made a couple of changes to it, including getting rid of the wood in the background graphic (thanks Paul), and started making changes to BlogCFC templates.&lt;/p&gt;
&lt;p&gt;A few hours later my blog was reborn.  It was actually pretty easy to do, and I&apos;m quite happy with the results.&lt;/p&gt;
&lt;p&gt;I also replaced the stock photo that comes with the template with a slice from a photo that I took during a hike in &lt;a href=&quot;http://www.torresdelpaine.com/&quot;&gt;Parque Nacional Torres del Paine&lt;/a&gt; in southern Chile in 2004.  You can see the full photo &lt;a href=&quot;http://www.silverwareconsulting.com/images/IMG_8174.JPG&quot;&gt;here&lt;/a&gt;.  I plan to rotate this image with others that I&apos;ve taken on my travels.&lt;/p&gt;
&lt;p&gt;I also took this opportunity to play with Slideshows in BlogCFC, setting one up which contains a few more photos from this trip.  If you enjoy nice scenery and/or are interested in Chile, check it out via the link in the sidebar.&lt;/p&gt;
&lt;p&gt;UPDATE:&lt;/p&gt;
&lt;p&gt;My banner image now &lt;a href=&quot;http://www.silverwareconsulting.com/index.cfm/2008/6/18/Rotating-Banner-for-BlogCFC--Hack-Warning&quot;&gt;rotates hourly&lt;/a&gt;, so the link above may not actually point to a full version of the banner pic.  It&apos;s still a nice photo, though.&lt;/p&gt; 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>BlogCFC</category>				
				
				<category>Personal</category>				
				
				<pubDate>Wed, 18 Jun 2008 08:47:00 -0400</pubDate>
				<guid>http://www.silverwareconsulting.com/index.cfm/2008/6/18/My-New-BlogCFC-Skin</guid>
				
			</item>
			</channel></rss>