<?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>Simply Breath Teching... &#187; Uncategorized</title>
	<atom:link href="http://www.breathteching.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.breathteching.com</link>
	<description>Resources for PHP Programmers and Small Business Operators</description>
	<lastBuildDate>Tue, 01 Mar 2011 09:35:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Asynchronous Image Loading in Table Cells with Cache</title>
		<link>http://www.breathteching.com/2011/02/19/asynchronous-image-loading-in-table-cells-with-cache/</link>
		<comments>http://www.breathteching.com/2011/02/19/asynchronous-image-loading-in-table-cells-with-cache/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 22:43:52 +0000</pubDate>
		<dc:creator>bretto36</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.breathteching.com/?p=93</guid>
		<description><![CDATA[So i&#8217;ve recently created an app that used image in the UITableView cells. When i would load the view it would take forever once the button was pressed for the view to be pushed onto the stack. I realised it was due to the images needing to load from my server. So i implemented a [...]]]></description>
			<content:encoded><![CDATA[<p>So i&#8217;ve recently created an app that used image in the UITableView cells. When i would load the view it would take forever once the button was pressed for the view to be pushed onto the stack.</p>
<p>I realised it was due to the images needing to load from my server. So i implemented a number of Asynchronous Image Loading classes but they all weren&#8217;t sufficient for what i wanted.</p>
<p>I needed something that cached the images, something that was super easy to implement, and robust.</p>
<p>Enter SDWebImage</p>
<p>With a simple call to your UIImageView you can make image loading hassle free and much faster than traditional image loading.</p>
<div class="wp_syntax">
<div class="code">
<pre class="objc" style="font-family:monospace;">

[cell.imageView setImageWithURL: [NSURL URLWithString:@"http://www.google.com.au/logos/2011/brancusi11-hp.jpg"]
placeholderImage: [UIImage imageNamed: @"placeholder.png"]];
</pre>
</div>
</div>
<p>You&#8217;re done!</p>
<p>The class also has examples in the Readme about adding Asynchronous image calls into other elements etc.</p>
<p>Enjoy!<span id="more-93"></span><!--more--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.breathteching.com/2011/02/19/asynchronous-image-loading-in-table-cells-with-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP Ecommerce Scale Image instead of Cropping</title>
		<link>http://www.breathteching.com/2010/04/26/wp-ecommerce-scale-image-instead-of-cropping/</link>
		<comments>http://www.breathteching.com/2010/04/26/wp-ecommerce-scale-image-instead-of-cropping/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 04:46:29 +0000</pubDate>
		<dc:creator>bretto36</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.breathteching.com/?p=53</guid>
		<description><![CDATA[Ok i recently had the problem where i wanted to define a max size for the images in my shopping cart. I didn&#8217;t want to set a static size for my entire carts images. Eg I wanted it to be max of 300px height or width but not 300px wide and 300px high. So if [...]]]></description>
			<content:encoded><![CDATA[<p>Ok i recently had the problem where i wanted to define a max size for the images in my shopping cart. I didn&#8217;t want to set a static size for my entire carts images.</p>
<p>Eg I wanted it to be max of 300px height or width but not 300px wide and 300px high.</p>
<p>So if the image is landscape it would be 300px wide and whatever it works it out to be height (eg 200px, anything lower than 300px). If it was portrait then i want the largest dimension to be the height (at 300px with the above example).<br />
<script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Here are the things i did to achieve this.</p>
<p>Please note &#8211; you will need knowledge of PHP to achieve this.</p>
<p>First you need to add this section of code to the file misc.functions.php &#8211; located in WP Ecommerce folder/wpsc-includes/<br />
Add this code to the switch($scaling_method) { statement (make sure it&#8217;s above the last option<br />
<code>case 'scale':<br />
if (empty($width) || empty($height))<br />
{<br />
if (!empty($width))<br />
$maxSize = $width;<br />
else if (!empty($height))<br />
$maxSize = $height;<br />
else<br />
{<br />
//error<br />
}<br />
}else<br />
{<br />
if ($width &gt; $height)<br />
$maxSize = $width;<br />
else<br />
$maxSize = $height;<br />
}</code></p>
<p>list($temp_w, $temp_h) = calculate_image_width_and_height($source_w, $source_h, $maxSize, $allowEnlarge=true);<br />
$width = $temp_w;<br />
$height = $temp_h;</p>
<p>break;</p>
<p>Replace<br />
<code><br />
// select our scaling method<br />
$scaling_method = 'cropping';<br />
</code><br />
with<br />
<code><br />
// select our scaling method<br />
$scaling_method = 'scale';<br />
</code></p>
<p>You&#8217;ll also have to change theme.functions.php in the same directory as misc.functions.php<br />
You&#8217;ll need to remove the css that the file creates.<br />
Namely the Single View Styling<br />
And the last 3 Default View Styling css statements.</p>
<p>The final change is part of your theme &#8211; i&#8217;m using the default theme, i&#8217;m not sure if you&#8217;ll have to change it for other themes or not.</p>
<p>Default theme &#8211; change single_product.php put a table around the following divs (below the div class=&#8217;textcol&#8217; div)<br />
<code>&lt;table width='100%' class='nocolour'&gt;<br />
&lt;tr&gt;<br />
&lt;td valign='top'&gt;<br />
&lt;div&gt;<br />
Image Stuff is here<br />
&lt;/div&gt;<br />
&lt;/td&gt;<br />
&lt;td valign='top'&gt;<br />
&lt;div&gt;<br />
...<br />
&lt;/div&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;</code></p>
<p>I think some css changes need to be done to get this to work (namely removing the postition:relative and some of the floats and positioning for imagecol and producttext)</p>
<p>Once that is all done &#8211; you need to go the Presentation area of the Settings Area of WP E-commerce. Go to the Single Product Image Size part and fill in only one of the text boxes, leave the other blank.<br />
That should make it work for your images. I&#8217;ll be doing this for another client soon so if the process is different i&#8217;ll let you know</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breathteching.com/2010/04/26/wp-ecommerce-scale-image-instead-of-cropping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a catch all sub domain system</title>
		<link>http://www.breathteching.com/2010/04/22/creating-a-catch-all-sub-domain-system/</link>
		<comments>http://www.breathteching.com/2010/04/22/creating-a-catch-all-sub-domain-system/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 23:18:21 +0000</pubDate>
		<dc:creator>bretto36</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.breathteching.com/?p=49</guid>
		<description><![CDATA[Ok recently i needed a catch all system for a website i was creating. All the tutorials i went through needed me to change the httpd.conf file. Pretty hard to do when on shared hosting. But found the solution to it using CPanel functions. Instead of adding *.domain.com to the httpd.conf file ServerAlias www.domain.com domain.com [...]]]></description>
			<content:encoded><![CDATA[<p>Ok recently i needed a catch all system for a website i was creating. All the tutorials i went through needed me to change the httpd.conf file. Pretty hard to do when on shared hosting. But found the solution to it using CPanel functions.</p>
<p>Instead of adding *.domain.com to the httpd.conf file</p>
<p>ServerAlias www.domain.com domain.com *.domain.com</p>
<p>Answer below</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>You can create a subdomain using the cpanel function with * as the subdomain title. You can set it&#8217;s fileroot as public_html to redirect to the root folder, or set up as something else.</p>
<p>if you want an example of htaccess that would send the subdomain to the script -</p>
<p>&lt;IfModule mod_rewrite.c&gt;<br />
Options +FollowSymLinks<br />
Options +Indexes<br />
RewriteEngine On<br />
RewriteBase /</p>
<p>RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).domain.com [NC]<br />
RewriteRule (.*) $1?subDomain=%2 [L]</p>
<p>&lt;/IfModule&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breathteching.com/2010/04/22/creating-a-catch-all-sub-domain-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8216;Length&#8217; is null or not an object error in FCKEditor</title>
		<link>http://www.breathteching.com/2009/06/01/length-is-null-or-not-an-object-error-in-fckeditor/</link>
		<comments>http://www.breathteching.com/2009/06/01/length-is-null-or-not-an-object-error-in-fckeditor/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 02:08:13 +0000</pubDate>
		<dc:creator>bretto36</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.breathteching.com/2009/06/01/length-is-null-or-not-an-object-error-in-fckeditor/</guid>
		<description><![CDATA[So i&#8217;m back after a lengthy absence in posting fixes. No that&#8217;s not because i haven&#8217;t had any frustrating bugs that i&#8217;ve worked long and hard to solve. Simply i&#8217;ve been too busy. Came across this problem in IE where it throws a length is null or not an object error. After lengthy google searching [...]]]></description>
			<content:encoded><![CDATA[<p>So i&#8217;m back after a lengthy absence in posting fixes. No that&#8217;s not because i haven&#8217;t had any frustrating bugs that i&#8217;ve worked long and hard to solve. Simply i&#8217;ve been too busy. Came across this problem in IE where it throws a length is null or not an object error.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>After lengthy google searching and tinkering I found the problem to be an extra comma at the end of one of my custom toolbar sets in the fckconfig.js file</p>
<p>/editor/fckconfig.js is the default file path.</p>
<p>Hope this helps anyone in trouble.</p>
<p>Cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breathteching.com/2009/06/01/length-is-null-or-not-an-object-error-in-fckeditor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>file_exists doesn&#8217;t work for me</title>
		<link>http://www.breathteching.com/2009/02/05/file_exists-doesnt-work-for-me/</link>
		<comments>http://www.breathteching.com/2009/02/05/file_exists-doesnt-work-for-me/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 00:53:44 +0000</pubDate>
		<dc:creator>bretto36</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.breathteching.com/2009/02/05/file_exists-doesnt-work-for-me/</guid>
		<description><![CDATA[Ok i&#8217;ve run across this problem a few times in my programming life, where file_exists always returns false. I don&#8217;t think i&#8217;ve ever properly fixed it. Generally I make some crappy work around, which ends up causing more harm than good. So here&#8217;s a small checklist to solve the problem. Check the file path you [...]]]></description>
			<content:encoded><![CDATA[<p>Ok i&#8217;ve run across this problem a few times in my programming life, where file_exists always returns false. I don&#8217;t think i&#8217;ve ever properly fixed it. Generally I make some crappy work around, which ends up causing more harm than good.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>So here&#8217;s a small checklist to solve the problem.</p>
<ol>
<li> Check the file path you are actually sending the function. eg file_exists(BASE_DIR . &#8220;/images/image1.jpg&#8221;);
<ul>
<li>I always like to do a print_r on whatever is in between the brackets just to make sure i&#8217;m not completely inept.</li>
<li>For this example i have too many &#8216;/&#8217; that could be causing me dilemmas.</li>
</ul>
</li>
<li>Check that the folders/files you are accessing don&#8217;t have any safe mode restrictions.</li>
<li>If those 2 solutions didn&#8217;t work and you have ensured you have passed the correct file path then put a call to the function &#8220;<span class="refname">clearstatcache()</span>&#8221; before the file_exists function.</li>
</ol>
<p>If you still have problems even after that, then send me a comment and I&#8217;ll help you debug it.</p>
<p>Happy Coding</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breathteching.com/2009/02/05/file_exists-doesnt-work-for-me/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FCKEditor shows current website instead of editor area</title>
		<link>http://www.breathteching.com/2009/01/05/fckeditor-shows-current-website-instead-of-editor-area/</link>
		<comments>http://www.breathteching.com/2009/01/05/fckeditor-shows-current-website-instead-of-editor-area/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 04:35:21 +0000</pubDate>
		<dc:creator>bretto36</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.breathteching.com/2009/01/05/fckeditor-shows-current-website-instead-of-editor-area/</guid>
		<description><![CDATA[FCKEditor can sometime display a website in it&#8217;s iframe instead of the editor panel. This is especially common when using .htaccess rewrite engine. A friend of mine encountered this issue for a second time, we both always seem to forget the solution, so he suggested I write a blog about it. When using FCKEditor and [...]]]></description>
			<content:encoded><![CDATA[<p>FCKEditor can sometime display a website in it&#8217;s iframe instead of the editor panel. This is especially common when using .htaccess rewrite engine.</p>
<p>A friend of mine encountered this issue for a second time, we both always seem to forget the solution, so he suggested I write a blog about it.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>When using FCKEditor and our cms we use htaccess redirects, but because they cascade through the sub folders FCKEditor also follows these Redirects.</p>
<p>To make FCKEditor work properly simple add&#8230;</p>
<p>RewriteEngine off</p>
<p>&#8230;to the .htaccess file in the editor directory.  This will keep FCKEditor using it default settings and not trying to use your parent folder redirects.</p>
<p>Enjoy!</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.breathteching.com/2009/01/05/fckeditor-shows-current-website-instead-of-editor-area/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firefox Losing Session Variables on Redirect</title>
		<link>http://www.breathteching.com/2008/04/28/firefox-losing-session-variables-on-redirect/</link>
		<comments>http://www.breathteching.com/2008/04/28/firefox-losing-session-variables-on-redirect/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 07:10:02 +0000</pubDate>
		<dc:creator>bretto36</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.breathteching.com/2008/04/28/firefox-losing-session-variables-on-redirect/</guid>
		<description><![CDATA[So I&#8217;ve been attempting to deal with an issue on a CMS I made for quite sometime. When People logged into the CMS they would be redirected to the Homepage from the Login page. They would get a first glimpse of the homepage then once they clicked a link they would be redirected back to [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been attempting to deal with an issue on a CMS I made for quite sometime. When People logged into the CMS they would be redirected to the Homepage from the Login page. They would get a first glimpse of the homepage then once they clicked a link they would be redirected back to the login page as the SESSION variables would disappear.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>The problem was firefox feels that http://www.mysite.com is a totally separate site to http://mysite.com so it resets the SESSION variables.</p>
<p>I changed my links which i had prepended the domain to for some unknown reason (I&#8217;m sure there was a logical reason when i wrote it), so I changed it to /pageNames.html and all was well in the world again.</p>
<p>While researching this bug I found some other solutions</p>
<ul>
<li>Call session_write_close() before using a header redirect in PHP</li>
<li>The worst possible solution would be to pass the SESSION Id (SID) in the url (not recommended) but nevertheless if worse comes to worse it is a solution.</li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1300158297655257";
/* 468x60, created 6/28/09 */
google_ad_slot = "9266821861";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Hope this helps someone. Until next bug.. keep up the good work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.breathteching.com/2008/04/28/firefox-losing-session-variables-on-redirect/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

