<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jessie Canon &#124; Philadelphia ColdFusion Web Developer</title>
	<atom:link href="http://www.jcanon.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jcanon.org</link>
	<description>Philadelphia ColdFusion / PHP Web Developer</description>
	<lastBuildDate>Thu, 16 Feb 2012 18:02:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to use JQuery lightbox with cfimage</title>
		<link>http://www.jcanon.org/2011/04/22/how-to-use-jquery-lightbox-with-cfimage/</link>
		<comments>http://www.jcanon.org/2011/04/22/how-to-use-jquery-lightbox-with-cfimage/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 12:26:06 +0000</pubDate>
		<dc:creator>Jessie Canon</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.jcanon.org/?p=156</guid>
		<description><![CDATA[Recently I needed to pull images dynamically from a network drive, and be able to use JQuery lightbox with them. So I came up with a small function to assist me. I wanted to use cfimage to accomplish this, but all I really wanted was the temporary filename ColdFusion generates to display the file to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I needed to pull images dynamically from a network drive, and be able to use JQuery lightbox with them. So I came up with a small function to assist me.</p>
<p>I wanted to use cfimage to accomplish this, but all I really wanted was the temporary filename ColdFusion generates to display the file to the screen. That way I could use it with regular HTML tags.</p>
<p>First, I performed a cfimage &#8220;<strong>Read</strong>&#8221; on the network drive location where the image was stored.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span>cfimage <span style="color: #0000FF;">action</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;read&quot;</span> source<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#APPLICATION.uploadPath#<span style="color: #000099; font-weight: bold;">\#</span>uploaded_photo#&quot;</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;newPhotoName&quot;</span> <span style="color: #0000FF;">/&gt;</span></span></div></td></tr></tbody></table></div>
<p>&#8220;<strong>APPLICATION.uploadPath</strong>&#8221; is a variable I use to store the actual file path where the images are stored.<br />
&#8220;<strong>uploaded_photo</strong>&#8221; is the database field that contains the filename.</p>
<p>&#8220;<strong>newPhotoName</strong>&#8221; will now be assigned to something we really can&#8217;t make sense of. It will look something like this, &#8220;coldfusion.image.Image@29ff90bf&#8221;. So what do we do with it?</p>
<p>Lets pass this string into our function.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> newPhotoName <span style="color: #0000FF;">=</span> getCustomImg<span style="color: #0000FF;">&#40;</span>newPhotoName<span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span></div></td></tr></tbody></table></div>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cffunction</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;getCustomImg&quot;</span> <span style="color: #0000FF;">access</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;public&quot;</span> returntype<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;string&quot;</span> output<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;false&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfargument</span> <span style="color: #0000FF;">name</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;image&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;string&quot;</span> <span style="color: #0000FF;">required</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;true&quot;</span> <span style="color: #0000FF;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> <span style="color: #000000; font-weight: bold;">var</span> cfFileURL<span style="color: #0000FF;">=</span> <span style="color: #009900;">&quot;&quot;</span> <span style="color: #0000FF;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfsavecontent</span> variable<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;cfFileURL&quot;</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span>cfimage <span style="color: #0000FF;">action</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;writetobrowser&quot;</span> source<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#ARGUMENTS.image#&quot;</span> <span style="color: #0000FF;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfsavecontent</span><span style="color: #0000FF;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> cfFileURL <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replace</span><span style="color: #0000FF;">&#40;</span>cfFileURL, <span style="color: #009900;">'&lt;img src=&quot;'</span>, <span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> cfFileURL <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replace</span><span style="color: #0000FF;">&#40;</span>cfFileURL, <span style="color: #009900;">'&quot; alt=&quot;&quot; /&gt;'</span>, <span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfreturn</span> <span style="color: #0000FF;">trim</span><span style="color: #0000FF;">&#40;</span>cfFileURL<span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span><br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cffunction</span><span style="color: #0000FF;">&gt;</span></span></div></td></tr></tbody></table></div>
<p>OK, so what does this function do? </p>
<p>What I&#8217;m really after here is the full URL path to the temporary ColdFusion image. So I do a &#8220;<strong>cfsavecontent</strong>&#8221; to capture the output as variable I can parse later.</p>
<p>Inside of my &#8220;<strong>cfsavecontent</strong>&#8220;, I use the &#8220;<strong>cfimage</strong>&#8221; tag with the action &#8220;<strong>writetobrowser</strong>&#8220;. This will actually give me the HTML markup for the image to display to the browser. You&#8217;ll wind up with something like this:</p>
<div class="codecolorer-container html4strict mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.your-url.com/CFFileServlet/_cf_image/_cfimg-4341467501479857784.PNG&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Next, our function is going to strip out all of the HTML we don&#8217;t want.</p>
<div class="codecolorer-container cfm mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="cfm codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> cfFileURL <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replace</span><span style="color: #0000FF;">&#40;</span>cfFileURL, <span style="color: #009900;">'&lt;img src=&quot;'</span>, <span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span><br />
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> cfFileURL <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">replace</span><span style="color: #0000FF;">&#40;</span>cfFileURL, <span style="color: #009900;">'&quot; alt=&quot;&quot; /&gt;'</span>, <span style="color: #009900;">''</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">/&gt;</span></span></div></td></tr></tbody></table></div>
<p>Now we have a fully usable image path we can use however we like. &#8220;http://www.your-url.com/CFFileServlet/_cf_image/_cfimg-4341467501479857784.PNG&#8221;</p>
<p>Finally, just use your variable in your HTML markup.</p>
<div class="codecolorer-container html4strict mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#newPhotoName#&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;lightbox&quot;</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#newPhotoName#&quot;</span><span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></div></td></tr></tbody></table></div>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jcanon.org/2011/04/22/how-to-use-jquery-lightbox-with-cfimage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing WordPress 3.1 404 Errors</title>
		<link>http://www.jcanon.org/2011/03/29/fixing-wordpress-3-1-404-errors/</link>
		<comments>http://www.jcanon.org/2011/03/29/fixing-wordpress-3-1-404-errors/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 13:04:34 +0000</pubDate>
		<dc:creator>Jessie Canon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.jcanon.org/?p=133</guid>
		<description><![CDATA[I&#8217;m still loving all of the new features in WordPress 3.1, even though I have run into a few snags. After updating one of my client&#8217;s sites, I noticed that every single page and post was giving a 404 error. I did all of the usual things, checking my .htaccess file, made sure mod_rewrite was [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m still loving all of the new features in WordPress 3.1, even though I have run into a few snags. After updating one of my client&#8217;s sites, I noticed that every single page and post was giving a 404 error. I did all of the usual things, checking my .htaccess file, made sure mod_rewrite was working etc&#8230; After seeing it wasn&#8217;t any of those I decided to disable my plugins to see if that was causing the problem, and YES!</p>
<p>If you are experiencing 404&#8242;s in WordPress 3.1 follow these steps:</p>
<ol>
<li>Disable all of your plugins and see if that is the root of the problem.</li>
<li>Turn your plugins back on, 1 by 1 until you find the offending plugin.</li>
<li>Empty your WordPress cache.</li>
<li>Go to &#8220;Settings&#8221;, &#8220;Permalinks&#8221; and press save. This will refresh your permalink structure.</li>
</ol>
<p>For me, the offending plugin was &#8220;Top Level Categories&#8221;. Glad that&#8217;s over with!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jcanon.org/2011/03/29/fixing-wordpress-3-1-404-errors/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 3.1 Admin Bar Missing</title>
		<link>http://www.jcanon.org/2011/03/15/wordpress-3-1-admin-bar-missing/</link>
		<comments>http://www.jcanon.org/2011/03/15/wordpress-3-1-admin-bar-missing/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 12:41:30 +0000</pubDate>
		<dc:creator>Jessie Canon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.jcanon.org/?p=127</guid>
		<description><![CDATA[I use WordPress for many of my clients, including myself, so I&#8217;ve been ecstatic over the changes since 3.0. However, in 3.1 I noticed that some of my WordPress sites displayed the new admin toolbar on their pages, while others did not. If you are logged in and just see a blank space with no [...]]]></description>
			<content:encoded><![CDATA[<p>I use WordPress for many of my clients, including myself, so I&#8217;ve been ecstatic over the changes since 3.0. However, in 3.1 I noticed that some of my WordPress sites displayed the new admin toolbar on their pages, while others did not. If you are logged in and just see a blank space with no admin bar, you are probably missing the wp_footer() tag in your footer.php file. Once I added that in, poof, problem solved.</p>
<div class="codecolorer-container php mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span><br />
&lt;/body&gt;<br />
&lt;/html&gt;</div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jcanon.org/2011/03/15/wordpress-3-1-admin-bar-missing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://www.jcanon.org/2011/03/01/welcome/</link>
		<comments>http://www.jcanon.org/2011/03/01/welcome/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 05:00:46 +0000</pubDate>
		<dc:creator>Jessie Canon</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://blog.jcanon.org/?p=30</guid>
		<description><![CDATA[I&#8217;ve tried to keep a blog at various times in my life, but they never seemed to work out. I&#8217;ve always managed to delete them, and start over. Well hopefully that won&#8217;t happen again&#8230; I&#8217;ve been a web developer for the past 5 years, mostly using ColdFusion. I plan to use this space to write [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried to keep a blog at various times in my life, but they never seemed to work out. I&#8217;ve always managed to delete them, and start over. Well hopefully that won&#8217;t happen again&#8230; I&#8217;ve been a web developer for the past 5 years, mostly using ColdFusion. I plan to use this space to write about my ever expanding knowledge on the subject, receive help from the web development community and to share my trials and misfortunes along the way.</p>
<p>My biggest inspirations are: My wife <a href="http://www.merrywifeofcanon.com" target="_blank">Somer</a>; her fanatical love for writing has made me both very proud and envious. <a href="http://www.coldfusionjedi.com" target="_blank" class="broken_link" rel="nofollow">Raymond Camden</a> &amp; <a href="http://www.bennadel.com" target="_blank">Ben Nadel</a>; their ColdFusion blogs have saved me countless times, and have always been the bar for which I am constantly trying to reach.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jcanon.org/2011/03/01/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

