<?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>Tims Tech Blog &#187; My PHP / MySQL Life</title>
	<atom:link href="http://www.golen.net/blog/category/my-php-mysql-life/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.golen.net/blog</link>
	<description>My blog looks bad because I&#039;m working on making yours look better</description>
	<lastBuildDate>Fri, 03 Sep 2010 18:53:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WPTouch and Webcomic Working Together</title>
		<link>http://www.golen.net/blog/2010/08/31/wptouch-and-webcomic-working-together/</link>
		<comments>http://www.golen.net/blog/2010/08/31/wptouch-and-webcomic-working-together/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 03:51:39 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[My PHP / MySQL Life]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[webcomic]]></category>
		<category><![CDATA[wptouch]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=1176</guid>
		<description><![CDATA[I happen to be a user of both WPTouch (a plugin that makes my blog mobile friendly) and Webcomic (a plugin and theme that allows you to organize comic series). The problem lies in that webcomic uses a custom post type for displaying the images associated with each comic and WPTouch has no idea how to display a webcomic. Thus, <a href="http://www.golen.net/blog/2010/08/31/wptouch-and-webcomic-working-together/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>I happen to be a user of both WPTouch (a plugin that makes my blog mobile friendly) and Webcomic (a plugin and theme that allows you to organize comic series). The problem lies in that webcomic uses a custom post type for displaying the images associated with each comic and WPTouch has no idea how to display a webcomic. Thus, when someone visits my site on a mobile device, they can see any text that I post for a webcomic, but they can&#8217;t see the image associated with my post. Today I resolved to fix that problem and I was successful. While it&#8217;s not the most elegant of solutions, it at least works for now and I hope it can help others.</p>
<p><span id="more-1176"></span></p>
<p>The solution is to modify your WPTouch plugin to manually link to the images associated with your webcomics. Now, I ended up buying the WPTouch pro version, because it is more updated, and it gives you themes. I&#8217;m hoping that it will be worth it for me since 50% of my sites traffic is from iPhones.</p>
<p>Once you&#8217;ve installed WPTouch Pro, edit the file wp-content/plugins/wptouch-pro/themes/classic/iphone/single.php</p>
<p>Add the following code on line 45</p>
<blockquote><p>&lt;?php<br />
$categories = get_the_category();<br />
$category = $categories[0]-&gt;category_nicename;<br />
$webcomic = get_post_meta(get_the_ID(), &#8216;webcomic&#8217;);<br />
if ($webcomic){<br />
echo &#8216;&lt;img src=&#8221;&#8216;.get_bloginfo( &#8216;url&#8217; ).&#8217;/wp-content/webcomic/&#8217;.$category.&#8217;/&#8217;.$webcomic[0]['files']['full'][0].&#8217;&#8221; alt=&#8221;" /&gt;&#8217;;<br />
}<br />
?&gt;</p></blockquote>
<p>Here&#8217;s what it does. First it grabs the category slug that the post is in. This is needed because that&#8217;s how Webcomic organizes your images. Second, it gets the webcomic metadata for the post. If the metadata exists, then we echo out the full sized image. That&#8217;s pretty much it!</p>
<p>If you have questions, I will try to help you out as best I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/08/31/wptouch-and-webcomic-working-together/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adobe: Worst Customer Support Ever &#8211; Flash Builder 4 Premium Profiler Not Working</title>
		<link>http://www.golen.net/blog/2010/08/16/adobe-worst-customer-support-ever/</link>
		<comments>http://www.golen.net/blog/2010/08/16/adobe-worst-customer-support-ever/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 23:17:44 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[My PHP / MySQL Life]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[customer support]]></category>
		<category><![CDATA[flash builder 4]]></category>
		<category><![CDATA[not working]]></category>
		<category><![CDATA[profiler]]></category>
		<category><![CDATA[worst]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=1127</guid>
		<description><![CDATA[This blog is a chronicle of my adventure with Adobe in trying to get support for Flash Builder 4. You see, I purchased the premium version of the product 5 days ago, and one of the key features for the premium version is a &#8220;profiler&#8221;. Now, I got the application installed fine, and everything works EXCEPT for the &#8220;profiler&#8221;, the <a href="http://www.golen.net/blog/2010/08/16/adobe-worst-customer-support-ever/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>This blog is a chronicle of my adventure with Adobe in trying to get support for Flash Builder 4. You see, I purchased the premium version of the product 5 days ago, and one of the key features for the premium version is a &#8220;profiler&#8221;. Now, I got the application installed fine, and everything works EXCEPT for the &#8220;profiler&#8221;, the one feature that I paid $700 for. What follows is how Adobe chooses to conduct support for a $700 product.<br />
<span id="more-1127"></span></p>
<h2>Friday &#8211; 08/13/2010</h2>
<ul>
<li>called tech support
<ul>
<li>they said support is only covered under a support contract</li>
</ul>
</li>
<li>talked with someone on chat support
<ul>
<li>they said they would escalate the case to tier 2 support and they would contact me</li>
</ul>
</li>
</ul>
<h2>Monday &#8211; 08/16/2010</h2>
<ul>
<li>No contact from tier 2 support &#8211; case shows as &#8216;withdrawn&#8217; on Adobe&#8217;s website</li>
<li>used online form to schedule a callback, got a message that callbacks weren&#8217;t working until Tuesday</li>
<li>chatted with chat support (transcript in email)
<ul>
<li>they ended up scheduling a call back from tech support for me</li>
</ul>
</li>
<li>on the meantime was on hold with tech support
<ul>
<li>spoke to someone who said Flash Builder 4 required a contract for support and they gave me the number</li>
<li>800-585-0774 to purchase a support contract</li>
</ul>
</li>
<li>callback called me back 12 times
<ul>
<li>several times I chose option 9 to cancel the call back</li>
<li>finally used option 1 to speak with person to turn off the call backs</li>
<li>the person said he would close the case to stop the callbacks</li>
</ul>
</li>
<li>2 more callbacks
<ul>
<li>used option 1 to speak to another person to turn off the callbacks</li>
<li>stayed on hold for over 5 minutes and ended the call</li>
</ul>
</li>
<li>1 more callback
<ul>
<li>used option 1 again, no one answered within 5 minutes. I ended the call</li>
</ul>
</li>
<li>contacted @adobe on twitter
<ul>
<li>they referred me to @adobe_care</li>
<li>they attempted to find out what my issue with the profiler was</li>
<li>they said they would check with the flash builder team and get back to me</li>
</ul>
</li>
<li>called 800-585-0774 (direct sales) to see why I needed to purchase support for a $700 product that doesn&#8217;t work
<ul>
<li>she said that the issue should be handled by tech support without a support contract</li>
<li>transferred me to Flash builder tech support team</li>
</ul>
</li>
<li>speaking with tech support
<ul>
<li>he told me i need a support contract and this is not the right tech support for flash builder 4</li>
<li>he also told me he is the same person that I&#8217;ve spoken to twice today already (Abhishek)</li>
<li>he told me that direct sales was wrong and that if I had purchased a support contract then I would have gotten the right support number to call.</li>
<li>I asked to speak with his manager</li>
<li>he said he would transfer me to his manager</li>
<li>he again advised me that I needed to purchase a support contract</li>
<li>the manager came on the line (dsandeep)</li>
<li>he confirmed that I needed a support contract and that there is a dedicated flash builder team</li>
<li>I told him to put me in touch with that team.</li>
<li>he said he would transfer me to that team after documenting my case.</li>
</ul>
</li>
<li>I was transferred to direct sales (Rueben)
<ul>
<li>he said I should have two incedents covered within 90 days of purchase</li>
<li>he didn&#8217;t know the proper team to support the product</li>
<li>he tried to sell me one incedent for $34, I told him he just told me I had two icenddents to use</li>
</ul>
</li>
<li>he transferred me back to Abhishek at tech support
<ul>
<li>I related the story to him</li>
<li>he asked if I had a support contract #</li>
<li>I tried to clarify that direct sales told me I had two free incedents and all I have is an email with serial numbers</li>
<li>I gave him the serial number from my email</li>
<li>he gave me the number for flash builder support team 888-649-2990</li>
</ul>
</li>
<li>called that number (enterpise solutions)
<ul>
<li>they hung up on me after I tried to get the name of the person I was speaking to</li>
</ul>
</li>
<li>called back
<ul>
<li>told her my issue with the profiler and gave her account info</li>
<li>she said she is tier 2 and that I should have never spoken to tier 1 (I could have told her that)</li>
<li>she said I would be contacted back within 24 hours to do a webex session for the assistence</li>
<li>we went through the troubleshooting that I had already done and she confirmed that I would need a webex session to get any further</li>
</ul>
</li>
</ul>
<h2>Tuesday &#8211; 08/17/2010</h2>
<ul>
<li>I was contacted by Bruce on Twitter
<ul>
<li>he asked some basic troubleshooting, then wanted to have tech support contact me</li>
<li>I gave him my case number</li>
<li>he said he would escalate the case to tier 3 and I would be contacted</li>
</ul>
</li>
<li>I was called by someone on tier 2 support (I think)
<ul>
<li>he said they are still looking into the problem, but he found information that it could be a bug in flash player 10.1 and to try installing 10.0 and see if the profiler would work</li>
<li>he sent me a link with information on the 10.1 problem</li>
<li>I installed version 10.0, but the problem still persisted</li>
</ul>
</li>
<li>I emailed the tier 2 guy back and told him I still had the problem
<ul>
<li>He said they were continuing to look at the problem and would stay in contact with me</li>
</ul>
</li>
</ul>
<h2>Wednesday &#8211; 08/18/2010</h2>
<ul>
<li>Got an email from someone saying they would continue to look into my case</li>
</ul>
<h2>Thursday &#8211; 08/19/2010</h2>
<ul>
<li>Finally got a call from a technician that wanted to remotely connect to my computer
<ul>
<li>He was able to connect and worked on my computer for about 45 minutes until I had to leave</li>
<li>all that was accomplished was that he could recreate the problem in a completely sterile environment, thereby determining it wasn&#8217;t something that I was doing wrong</li>
<li>We agreed to pick it back up again on Monday when I would be back in the office.</li>
</ul>
</li>
</ul>
<h2>Monday &#8211; 08/23/2010</h2>
<ul>
<li>No contact from Adobe</li>
</ul>
<h2>Tuesday &#8211; 08/24/2010</h2>
<ul>
<li>Updated my case online saying I hadn&#8217;t heard from anyone on Monday like I was expecting
<ul>
<li>No response</li>
</ul>
</li>
<li>Contacted Adobe_care on Twitter saying I hadn&#8217;t heard anything from them since Thursday
<ul>
<li>Got an almost immediate response to my case asking me to do a couple more trouble-shooting steps</li>
<li>All the steps had been done by the tech last week when he was remotely connected to my computer</li>
<li>I updated the case with the results from the trouble-shooting and that the problem was still not resolved</li>
<li>No response yet from Adobe</li>
</ul>
</li>
</ul>
<h2>Wednesday &#8211; 08/25/2010</h2>
<ul>
<li>Updated my Adobe case with &#8220;Hello?&#8221; after not receiving any response</li>
<li>Got an email response 6 hours after updating the case
<ul>
<li>They said that since the mm.cfg file didn&#8217;t exist on my computer to create it and put the following contents in it, then relaunch Flash Builder 4 and see if the profiler will work.
<ul>
<li>ErrorReportingEnable=1</li>
<li> TraceOutputFileEnable=1</li>
<li> TraceOutputEnable=1</li>
</ul>
</li>
<li>The suggestion didn&#8217;t fix the problem and I updated the case with that information</li>
</ul>
</li>
</ul>
<h2>Thursday &#8211; 08/26/2010</h2>
<ul>
<li>Sent @adobe_care a DM to see what I needed to do to get my case escalated and a resolution</li>
<li>found this guy&#8217;s article which sounds like he&#8217;s having as much fun as I am <a href="http://iconnectdots.com/2010/08/adobe-gets-1st-prize-for-worst-customer-service-ever.html">http://iconnectdots.com/2010/08/adobe-gets-1st-prize-for-worst-customer-service-ever.html</a></li>
<li>Received an update to my case in which they are trying to convince me that they won&#8217;t support it on 64bit Windows 7 referencing the system requirements at <a href="http://www.adobe.com/products/flex/systemreqs/">http://www.adobe.com/products/flex/systemreqs/</a>
<ul>
<li>OS Requirement: Windows 7 (32 or 64 bit running in 32-bit mode)
<ul>
<li>Ok, so you do support the 64 bit version, if the apps running in 32 bit mode</li>
</ul>
</li>
<li>According to this article (which is just a better way of proving my point) <a href="http://www.techsupportalert.com/content/how-windows7-vista64-support-32bit-applications.htm">http://www.techsupportalert.com/content/how-windows7-vista64-support-32bit-applications.htm</a> if the application is installed in Program Files (x86) then it will always run in 32 bit mode.</li>
<li>This is nothing but a poor attempt at prolonging the case</li>
</ul>
</li>
</ul>
<h2>Friday &#8211; 08/27/2010</h2>
<ul>
<li>Got a message from @adobe_care on Twitter that the case had been stuck with tier 2 support and they were escalating it to tier 3
<ul>
<li>They said the 64-bit issue was still on the table</li>
</ul>
</li>
</ul>
<h2>Saturday &#8211; 08/28/2010</h2>
<ul>
<li>I installed Adobe Flash Builder 4 Premium on a second computer running Windows Vista 32-bit operating system
<ul>
<li>I also made sure that Flash Player 10.0 was installed</li>
<li>Verified the the profiler would still not launch</li>
<li>Updated the Adobe case saying that it still didn&#8217;t work with a supported OS so they couldn&#8217;t use the &#8220;not supported&#8221; defense</li>
<li>DMed @adobe_care and let them know that I confirmed it didn&#8217;t work on 32-bit windows Vista</li>
</ul>
</li>
</ul>
<h2>Monday &#8211; 08/30/2010</h2>
<ul>
<li>Got an update on the case this morning saying &#8220;I am escalating this case to my<br />
Senior, so that a collective research and response mechanism be<br />
generated.&#8221; We&#8217;ll see how that goes.</li>
<li>I asked them to update the case on a daily basis with status</li>
<li>Got a call from tier 3 support, a guy named Kurt Mossman @kurtmossman.
<ul>
<li>He is my hero!</li>
<li>In 5 minutes he had my profiler fixed and the case closed.</li>
<li>Below you will find my solution and the short amount of troubleshooting that we did</li>
</ul>
</li>
</ul>
<h2>Conclusion</h2>
<p>After almost 2 weeks, and probably 10-15 hours of fighting with Adboe support, we found a resolution to my problem.</p>
<p>Here was the solution:</p>
<ol>
<li>open a command prompt</li>
<li>run the command: netstat –ano | find /i “9999”</li>
<li>In my case I had an output that showed TCP    0.0.0.0:9999           0.0.0.0:0              LISTENING</li>
<li>After identifying that port 9999 was already in use, it was a simple matter to change the port that the Flash Builder 4 Profiler uses</li>
<li>Launch Flash Builder</li>
<li>Go to Windows &gt; Prefrences</li>
<li>Go to Flash Builder &gt; Profiler &gt; Connections</li>
<li>Change the port number to something that isn&#8217;t being used according to your test.txt file (we used 9997)</li>
<li>Click Apply &gt; Ok</li>
<li>Close Flash Builder</li>
<li>Launch Flash Builder</li>
<li>Launch the Profiler</li>
<li>WORKS!</li>
</ol>
<p>I have to say this is one of the worst support cases I&#8217;ve ever had the luck to be involved in. If I didn&#8217;t have bad luck. I&#8217;d have no luck at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/08/16/adobe-worst-customer-support-ever/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>FIX: IE7 Drop Down Menu Appearing Behind Other Elements</title>
		<link>http://www.golen.net/blog/2010/07/20/fix-ie7-drop-down-menu-appearing-behind-other-elements/</link>
		<comments>http://www.golen.net/blog/2010/07/20/fix-ie7-drop-down-menu-appearing-behind-other-elements/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 15:24:30 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[My PHP / MySQL Life]]></category>
		<category><![CDATA[jqtouch]]></category>
		<category><![CDATA[behind]]></category>
		<category><![CDATA[behind elements]]></category>
		<category><![CDATA[drop down]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[menu]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=1080</guid>
		<description><![CDATA[I ran into an interesting problem today with a wordpress theme that I developed for a client. I was using the same drop-down menu from the new TwentyTen theme, and everything was working fine&#8230; or so I thought. As it turns out, when viewing the theme in IE7, the drop-down menu was appearing behind other elements on the page. I <a href="http://www.golen.net/blog/2010/07/20/fix-ie7-drop-down-menu-appearing-behind-other-elements/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>I ran into an interesting problem today with a wordpress theme that I developed for a client. I was using the same drop-down menu from the new TwentyTen theme, and everything was working fine&#8230; or so I thought. As it turns out, when viewing the theme in IE7, the drop-down menu was appearing behind other elements on the page.</p>
<p><span id="more-1080"></span>I quickly turned to Google to see if a solution had already been found for something like this. I knew it was only happening in IE7 and all other browsers rendered it properly. I also had figured that it was a z-index problem. I soon learned that many other people have had the exact same problem that I was having. The bad news is that there were no real solutions to fix the problem. Luckily, for everyone&#8217;s enjoyment, I have found a simple and elegant solution that fixes it once and for all.</p>
<p>The solution:</p>
<p>Take the content that is being put in front of the drop-down and for IE browsers only, set the z-index value as a negative. Many solutions say to just make the menu have a high z-index value, but I tried that to no avail. I also saw that it wasn&#8217;t a viable solution for at least half of the people out there who were experiencing the problem. I used jquery to implement the solution like this:</p>
<p><code></p>
<pre>$(document).ready(function() {
    // lower the z-index to negative to fix the overlapping drop-down menu problem
    // for IE 7 browsers only
    if(!jQuery.support.leadingWhitespace){
        $('#home_header').css('z-index', -2);
    }
});</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/07/20/fix-ie7-drop-down-menu-appearing-behind-other-elements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JQTouch &#8211; AJAX PHP Login Form</title>
		<link>http://www.golen.net/blog/2010/05/29/jqtouch-ajax-php-login-form/</link>
		<comments>http://www.golen.net/blog/2010/05/29/jqtouch-ajax-php-login-form/#comments</comments>
		<pubDate>Sun, 30 May 2010 04:01:40 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[jqtouch]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=738</guid>
		<description><![CDATA[It seems a lot of users lately have been asking questions about AJAX forms with JQTouch and wondering how they work. I have put together some video tutorials which walks you through creating a login form from scratch. The form submits via AJAX, validates the form variables, then uses a cookie based system to remember if you&#8217;ve logged in or <a href="http://www.golen.net/blog/2010/05/29/jqtouch-ajax-php-login-form/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>It seems a lot of users lately have been asking questions about AJAX forms with JQTouch and wondering how they work. I have put together some video tutorials which walks you through creating a login form from scratch. The form submits via AJAX, validates the form variables, then uses a cookie based system to remember if you&#8217;ve logged in or not. Please leave me comments if you like what I&#8217;ve put together or if you have any questions or feedback.</p>
<p>You can download a copy of the code <a href="http://www.golen.net/blog/wp-content/uploads/2010/05/jqtouch.zip">here</a></p>
<p><a href="http://golen.net/videos/jqt_01">Part 1: Creating the home page</a></p>
<p><a href="http://golen.net/videos/jqt_02">Part 2: Creating the form handler</a></p>
<p><a href="http://golen.net/videos/jqt_03">Part 3: Creating the logoff handler and adding logic to the home page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/05/29/jqtouch-ajax-php-login-form/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Better CSS Part 6: Coding Standards</title>
		<link>http://www.golen.net/blog/2010/05/13/better-css-part-6-coding-standards/</link>
		<comments>http://www.golen.net/blog/2010/05/13/better-css-part-6-coding-standards/#comments</comments>
		<pubDate>Thu, 13 May 2010 15:10:30 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[My PHP / MySQL Life]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=364</guid>
		<description><![CDATA[How should you code your CSS to make it easiest and fastest to locate elements? Keep all your code for a style on one line. This is probably going to shock most of you because you are so used to seeing CSS with a single style taking up multiple lines, one line for each style attribute. Why is this wrong? <a href="http://www.golen.net/blog/2010/05/13/better-css-part-6-coding-standards/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>How should you code your CSS to make it easiest and fastest to locate elements?</p>
<p><span id="more-364"></span></p>
<ol>
<li>Keep all your code for a style on one line.<br />
This is probably going to shock most of you because you are so used to seeing CSS with a single style taking up multiple lines, one line for each style attribute. Why is this wrong? For two reasons. First, it makes an incredibly tall file. Remember our number one goal? To quickly and easily find elements and styles. Tell me what&#8217;s easier, finding a class by scrolling through a file with 5000 lines, or finding a class  in a file with only 100 lines. It&#8217;s a no brainer. First and foremost you should always give priority to locating the class or id name. For example:<br />
<a href="http://www.golen.net/blog/wp-content/uploads/2010/05/Capture1.jpg"><img title="Capture" src="http://www.golen.net/blog/wp-content/uploads/2010/05/Capture1.jpg" alt="" width="358" height="112" /></a><br />
Second, it decreases the amount of whitespace in your code which can help you decrease your file size (goal number four)</li>
<li>Use shorthand whenever possible.<br />
To me, this is a no brainer. By using shorthand you&#8217;re making your code easier to follow and you&#8217;re decreasing the size of your files at the same time (goals two, three, and four). For example:<br />
<a href="http://www.golen.net/blog/wp-content/uploads/2010/05/Capture.jpg"><img title="Capture" src="http://www.golen.net/blog/wp-content/uploads/2010/05/Capture.jpg" alt="" width="506" height="78" /></a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/05/13/better-css-part-6-coding-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better CSS Part 5: Layout Structure</title>
		<link>http://www.golen.net/blog/2010/05/12/better-css-part-5-layout-structure/</link>
		<comments>http://www.golen.net/blog/2010/05/12/better-css-part-5-layout-structure/#comments</comments>
		<pubDate>Wed, 12 May 2010 15:00:45 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[My PHP / MySQL Life]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=362</guid>
		<description><![CDATA[Many people (me included) can get in the habit of placing things in a CSS file wherever you want. I want to put an end to that. Your styles should be placed in logical groups that either make sense, and/or follow the layout of your site. This will make it so much easier for you to come back in 6 <a href="http://www.golen.net/blog/2010/05/12/better-css-part-5-layout-structure/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>Many people (me included) can get in the habit of placing things in a CSS file wherever you want. I want to put an end to that.</p>
<p><span id="more-362"></span></p>
<p>Your styles should be placed in logical groups that either make sense, and/or follow the layout of your site. This will make it so much easier for you to come back in 6 months to modify something, or allow someone else to make changes with ease. I do both logical groups and site layout groups. This can be done in a couple of ways, using different CSS files, or using comment blocks in a single CSS file, or both (preferred). I typically use several CSS files.</p>
<p>&#8220;default.css&#8221; will contain styles that I use for every site. It&#8217;s usually code that will attempt to globaly reset elements so that they behave the same way on the majority of browsers. It will also contain common formatting classes that I use on all my sites. Styles like text_red, hide, or text_center.</p>
<p>&#8220;style.css&#8221; will contain styles that are used on more than one page. These will typically be layout related styles, fonts, backgrounds, etc.</p>
<p>&#8220;home.css&#8221; will contain only styles that are needed for the home page. Only include this file on your home page to try and keep down the overall size of your CSS. I use the same tactic for all my pages. If there are styles that will only be used on a single page, then I always put those in a separate CSS file and only include it on the page that needs them.</p>
<p>Also, you should take care to organize the code in your CSS files. I typically put all my font styling in one single section at the top. I will also have a link styling section. After that I break down the organization that roughly follows the HTML layout. For example, put all of your sidebar styles together, or all your footer styles together.</p>
<p><a href="http://www.golen.net/blog/2010/05/06/better-css-par…ding-standards/">Next I will talk about coding standards</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/05/12/better-css-part-5-layout-structure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better CSS Part 4: Naming Conventions</title>
		<link>http://www.golen.net/blog/2010/05/11/better-css-part-4-naming-conventions/</link>
		<comments>http://www.golen.net/blog/2010/05/11/better-css-part-4-naming-conventions/#comments</comments>
		<pubDate>Tue, 11 May 2010 15:40:10 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[My PHP / MySQL Life]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=360</guid>
		<description><![CDATA[When you are giving names to your ids and classes use names that are appropriate and clear. If you had a class just called &#8220;wrapper&#8221; and someone else was looking at your CSS they would have no idea what it is used for or where it&#8217;s in use. Give it a more descriptive name like &#8220;wrapper_header&#8221; or &#8220;wrapper_image&#8221;. I also <a href="http://www.golen.net/blog/2010/05/11/better-css-part-4-naming-conventions/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>When you are giving names to your ids and classes use names that are appropriate and clear. If you had a class just called &#8220;wrapper&#8221; and someone else was looking at your CSS they would have no idea what it is used for or where it&#8217;s in use. Give it a more descriptive name like &#8220;wrapper_header&#8221; or &#8220;wrapper_image&#8221;. I also prefer to use an underscore to seperate words in my class and id names, but it&#8217;s also acceptable to use camel case like &#8220;wrapperHeader&#8221; or &#8220;wrapperImage&#8221;. In my opinion I feel that using an underscore is more readable at a glance, but using camel case does get rid of a character if you&#8217;re really worried about file sizes.<br />
<span id="more-360"></span></p>
<p>For styles that have multiple words in the name, put the most common term first, and the more descriptive term last. It will be easier for you to spot your styles later. In my &#8220;wrapper&#8221; example above I have two wrappers, one around a header, and one around images. Since the wrapper is the object that&#8217;s common to both, it gets put first in my style name. Another example is if you have multiple forms I give them ids like &#8220;frm_login&#8221;, &#8220;frm_contact&#8221;, &#8220;frm_order&#8221;, etc.</p>
<p><a href="http://www.golen.net/blog/2010/05/06/better-css-par…yout-structure/">In my next article, I will discuss how you layout your CSS files.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/05/11/better-css-part-4-naming-conventions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better CSS Part 3: ids vs. classes</title>
		<link>http://www.golen.net/blog/2010/05/10/better-css-part-3-ids-vs-classes/</link>
		<comments>http://www.golen.net/blog/2010/05/10/better-css-part-3-ids-vs-classes/#comments</comments>
		<pubDate>Mon, 10 May 2010 16:45:16 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[My PHP / MySQL Life]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=358</guid>
		<description><![CDATA[This is a touchy subject. Whether you should use the id attribute or the class attribute in your HTML to style things with CSS. One thing is certain, XHTML standards say that ids must be unique. If you have multiple ids that are the same, then you need to refer to them with classes instead. With that out of the <a href="http://www.golen.net/blog/2010/05/10/better-css-part-3-ids-vs-classes/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>This is a touchy subject. Whether you should use the id attribute or the class attribute in your HTML to style things with CSS. One thing is certain, XHTML standards say that ids must be unique. If you have multiple ids that are the same, then you need to refer to them with classes instead. With that out of the way, it seems clear to me that the majority of your styling is going to be done using classes.<br />
<span id="more-358"></span></p>
<p>I will typically use ids to refer to content sections that are unique like header, body, and footer. The rest of the time I use classes.</p>
<p>An interesting way to use classes is to have several mini-classes like text_b (for bold), text_i (for italic), and text_u (for underline). Then I can combine as many or as few of those classes in my HTML. This can really save you some time since it will decrease the amount of CSS code that you have to write.</p>
<p>Sorry that this article is so short, but it&#8217;s just a small topic.</p>
<p><a href="http://www.golen.net/blog/2010/05/06/better-css-par…ng-conventions/">In my next article I will talk about CSS Naming Conventions.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/05/10/better-css-part-3-ids-vs-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQTouch &#8211; Tap Event Handling for Browsers and Mobile Devices</title>
		<link>http://www.golen.net/blog/2010/05/08/jqtouch-tap-event-handling-for-browsers-and-mobile-devices/</link>
		<comments>http://www.golen.net/blog/2010/05/08/jqtouch-tap-event-handling-for-browsers-and-mobile-devices/#comments</comments>
		<pubDate>Sat, 08 May 2010 16:23:15 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[jqtouch]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=388</guid>
		<description><![CDATA[JQTouch is an awesome platform when it comes to making a mobile optimized website. One problem that I run into a lot is that I develop on my PC, and it&#8217;s extremely cumbersome to debug and test on my mobile device during the development process. Instead, I use my PC browser to do most of my debugging and testing, then <a href="http://www.golen.net/blog/2010/05/08/jqtouch-tap-event-handling-for-browsers-and-mobile-devices/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>JQTouch is an awesome platform when it comes to making a mobile optimized website. One problem that I run into a lot is that I develop on my PC, and it&#8217;s extremely cumbersome to debug and test on my mobile device during the development process. Instead, I use my PC browser to do most of my debugging and testing, then I just test out major revisions on my cell phone.</p>
<p><span id="more-388"></span></p>
<p>In a lot of my mobile websites I have pages that are loaded via ajax. These dynamic pages have elements on them that need to have events attached to them. JQuery (the thing JQTouch is built on) allows you to do this through live binding. You can read more about that <a href="http://api.jquery.com/live/" target="_blank">here</a>.</p>
<p>The problem with this lies in the fact that iPhones/iPods/iPads need to bind elements to a custom &#8216;tap&#8217; event rather than a &#8216;click&#8217; event that browsers need. If you bind things to the &#8216;click&#8217; event, it will work fine in browsers, but fail in an iPhone (and vice versa with the &#8216;tap&#8217; event). I needed a simple solution that would do some quick OS detection to logically bind things to either the &#8216;tap&#8217; or the &#8216;click&#8217; event. Did you catch that? I said OS detection, not browser detection. How come? By doing OS detection you&#8217;ll have a much greater chance of detecting a specific class of device. In my case, all I need to know is if they are on an iPhone/iPod/iPad or something else entirely. This also helps with Google Android compatibility since it also requires the &#8216;click&#8217; event.</p>
<p>This is my OS Detection script. It&#8217;s capable of doing browser detection as well, but I stripped all of that out to make it more light weight for my purposes. Just include this file in your website before you initialize your JQTouch.</p>
<p><a href="http://www.golen.net/blog/wp-content/uploads/2010/05/browserDetect1.js">Download browserDetect.js</a></p>
<p>Now, here is how you use it with JQTouch to bind the proper events to elements.</p>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre>if (BrowserDetect.OS == 'iPhone/iPod'){
	$('.chartnavlink').live('tap', handleClickChartnavlink);
} else {
	$('.chartnavlink').live('click', handleClickChartnavlink);
}</pre>
<p></code></p>
<p>If you find this helpful, please just leave a quick comment. Also, I encourage any feedback. I&#8217;m always willing to learn newer and better things!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/05/08/jqtouch-tap-event-handling-for-browsers-and-mobile-devices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQTouch DynamicHeight Extension</title>
		<link>http://www.golen.net/blog/2010/05/07/jqtouch-dynamicheight-extension/</link>
		<comments>http://www.golen.net/blog/2010/05/07/jqtouch-dynamicheight-extension/#comments</comments>
		<pubDate>Fri, 07 May 2010 17:00:39 +0000</pubDate>
		<dc:creator>Tim Golen</dc:creator>
				<category><![CDATA[jqtouch]]></category>

		<guid isPermaLink="false">http://www.golen.net/blog/?p=396</guid>
		<description><![CDATA[This is an extension for JQTouch (a framework built on top of JQuery) that allows you to build mobile optimized websites. This extension arose out of the need to have a dynamic min-height setting rather than relying on the static min-height settings in the jqtouch.css file. This allows for greater cross-browser compatability when aligning items to the bottom of a <a href="http://www.golen.net/blog/2010/05/07/jqtouch-dynamicheight-extension/" title="Continue reading">&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>This is an extension for <a href="http://jqtouch.com" target="_blank">JQTouch</a> (a framework built on top of <a href="http://jquery.com" target="_blank">JQuery</a>) that allows you to build mobile optimized websites. This extension arose out of the need to have a dynamic min-height setting rather than relying on the static min-height settings in the jqtouch.css file. This allows for greater cross-browser compatability when aligning items to the bottom of a page or on background elements.</p>
<div><span id="more-396"></span></div>
<p>Specifically I wrote this extension to solve two problems.</p>
<p>The first problem was that my website has an absolute positioned navigation bar at the bottom of the page and it would work fine in the iPhone fullscreen mode, but when viewing the webpage in a UI Webview it was adding about 20 pixels of padding to the bottom of the page causing a large gap.  Also, when viewing the site on an iPad it would add a HUGE amount of padding. You can take this a step further to realize that anytime the height of a browser window is different than the static min-height values in JQTouch (420 pixels), that you would see this problem (affirmed with viewing site in a PC browser with different heights).</p>
<p>The second problem was that when I loaded a new ajax page, the background of the new div was cut off at the min-height value. I was using a radial gradient on the background of the new div, so there was a clear line at the bottom where the gradient was stopped short.</p>
<p>Well, this extension solves all those problems! You no longer have to worry about setting the height of your page!</p>
<h2><span style="font-weight: normal; font-size: 13px;"> </span>Installation:</h2>
<div>
<ol>
<li><a href="http://www.golen.net/blog/wp-content/uploads/2010/05/jqt.dynamicheight1.js">Download Extension</a> v 1.1</li>
<li>Include that file with the rest of your JQTouch files</li>
</ol>
</div>
<h2>Code:</h2>
<p><code> </code></p>
<p><code> </code></p>
<p><code></p>
<pre>$(function(){
	// reset our heights on page load
	jQT.resetHeight();
});</pre>
<p></code></p>
<h2>Tips:</h2>
<p>Use the jQT.resetHeight() function on page load, when you load new ajax content, and when the orientation changes.</p>
<h2>Changelog:</h2>
<h4>1.1</h4>
<ul>
<li>added an optional parameter to resetHeight() for a hard minimum to be specified. For example, if you never wanted the height to be less than 420 pixels just do</li>
</ul>
<pre>jQT.resetHeight(420);</pre>
<p>That&#8217;s it! Did you find this useful? Please leave a comment and let me know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.golen.net/blog/2010/05/07/jqtouch-dynamicheight-extension/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
