<?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>Painted Digital &#187; Development</title>
	<atom:link href="http://painteddigital.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://painteddigital.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 00:01:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using Ninja Skills to Take Down A WordPress Virus</title>
		<link>http://painteddigital.com/2010/using-ninja-skills-to-take-down-a-wordpress-virus/</link>
		<comments>http://painteddigital.com/2010/using-ninja-skills-to-take-down-a-wordpress-virus/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 22:13:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Media Temple]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://painteddigital.com/?p=818</guid>
		<description><![CDATA[Oddly, I have acquired a WordPress virus for the second time now. And both versions have been the same attack: My posts and pages all get a script added to the end of them which will redirect the viewer once per day I believe. The worst part is that it infects all posts and pages. [...]]]></description>
			<content:encoded><![CDATA[<p>Oddly, I have acquired a WordPress virus for the second time now. And both versions have been the same attack: My posts and pages all get a script added to the end of them which will redirect the viewer once per day I believe. The worst part is that it infects all posts and pages.</p>
<p>The last time this happened, my developer (who wrote about it <a href="http://andrewroycarter.com/security/wordpress-hacked-on-media-temple-gs/" target="_blank">here</a>) and I were taken aback until we came across a solution on <a rel="nofollow" href="http://wiki.mediatemple.net/w/WordPress_Redirect_Exploit#SSH_Scan_and_Remove" target="_blank">a Media Temple Wiki</a>. We both use <a rel="nofollow" href="http://www.mediatemple.net/go/order/?refdom=painteddigital.com" target="_blank">Media Temple</a> and although I hope not, I wonder if that&#8217;s how it&#8217;s spreading. Regardless of how it got there, it is a frustrating thing to remove. Thankfully someone has written an amazing script for Media Temple that works very quickly and makes removal very easy. This time around, however, the links had changed and that beautiful script took a bit of finessing in order to work. Building on this unknown ninja&#8217;s coding skills, I&#8217;ll show you how I updated the script.</p>
<p>The original script handles these 4 script addresses:</p>
<ul>
<li>ae.awaue.com/7</li>
<li>ie.eracou.com/3</li>
<li>ao.euuaw.com/9</li>
<li>ue.oeaou.com/31</li>
</ul>
<p>If you have one of those at the end of your post, then you don&#8217;t need to do anything except follow the wiki, ssh in, and copy/paste the script. For me, however, I had the script</p>
<ul>
<li>http://uoauer.com/si</li>
</ul>
<h2>Reformatting the Code</h2>
<p>So there&#8217;s 3 places in the script that you need to make changes.</p>
<h3 style="color: black;">Change 1</h3>
<p>Find the line that looks like this:</p>
<p>[sourcecode language="plain" wraplines="0"](ae\.awaue\.com/7|ie\.eracou\.com/3|ao\.euuaw\.com/9|ue\.oeaou\.com/31)[/sourcecode]</p>
<p>And somewhere in between those pipes (this &#8220;|&#8221; character) you need to add your address. You&#8217;ll notice a &#8220;\&#8221; before each &#8220;.&#8221; and no &#8220;http://&#8221; so you&#8217;ll need to format your address in the same fashion. Mine came out as</p>
<p>[sourcecode language="plain" wraplines="0"](ae\.awaue\.com/7|uoauer\.com/si|ie\.eracou\.com/3|ao\.euuaw\.com/9|ue\.oeaou\.com/31)[/sourcecode]</p>
<p>This line is the one that does all the hunting for you so it&#8217;s very important that your offending link is correctly added.</p>
<h3 style="color: black;">Change 2</h3>
<p>Next, we&#8217;ll be adding a &#8220;replace&#8221; command for removing it from the database. Find the line with all the replaces.</p>
<p>[sourcecode language="plain"]replace(replace(replace(replace([/sourcecode]</p>
<p>and add one more</p>
<p>[sourcecode language="plain"]replace(replace(replace(replace(replace[/sourcecode]</p>
<h3 style="color: black;">Change 3</h3>
<p>And lastly, you&#8217;ll need to add the string it needs to replace. So copy one of the script examples</p>
<p>[sourcecode language="plain"]src=\&quot;http://ao.euuaw.com/9\&quot;&amp;gt;&#8217;, &#8221;),[/sourcecode]</p>
<p>and modify it with your address, making sure to add the \&#8221;</p>
<p>[sourcecode language="plain"]src=\&quot;http://uoauer.com/si\&quot;&amp;gt;&#8217;, &#8221;),[/sourcecode]</p>
<p><a title="Media Temple Virus Removal Script" href="http://painteddigital.com/wp-content/uploads/2010/08/mt-virus-removal.rtf">Here&#8217;s my final script</a> (note that when you run it, the cursor just blinks until it&#8217;s done). Let me know if any of this is confusing! And as Andrew said, &#8220;whoever wrote that original [script] deserves 1000 gold medals!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2010/using-ninja-skills-to-take-down-a-wordpress-virus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Embed Fonts for Posterous &amp; Tumblr</title>
		<link>http://painteddigital.com/2010/how-to-embed-fonts-for-posterous-tumblr/</link>
		<comments>http://painteddigital.com/2010/how-to-embed-fonts-for-posterous-tumblr/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 19:27:04 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[font-face]]></category>
		<category><![CDATA[Posterous]]></category>
		<category><![CDATA[Tumblr]]></category>

		<guid isPermaLink="false">http://painteddigital.com/?p=788</guid>
		<description><![CDATA[2010 certainly seems to be the year of font embedding. There are new services centering around fonts popping up like daisies. Though they are all certainly useful and have their place, there&#8217;s one I&#8217;ve been relying on more and more, called Font Squirrel. The reason why I like Font Squirrel so much is because they [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-large wp-image-803" title="Posterous theme with @font-face embed" src="http://painteddigital.com/wp-content/uploads/2010/08/Posterous-theme-with-@font-face-embed-578x219.png" alt="" width="578" height="219" /><br />
2010 certainly seems to be the year of font embedding. There are new services centering around fonts popping up like daisies. Though they are all certainly useful and have their place, there&#8217;s one I&#8217;ve been relying on more and more, called Font Squirrel. The reason why I like Font Squirrel so much is because they offer a huge helping hand when embedding fonts with the CSS technique known as @font-face.</p>
<p>When comparing with Javascript methods like Cufón and Typkit, I mainly prefer @font-face embeds for it&#8217;s consistency (not even going to bring up Flash-based embeddings&#8230; wait, oops). I&#8217;ve found that when testing out fonts in tight areas like navigation and headings, Javascript methods tend to jump around a bit after the page has loaded, making things tricky to guess when margins and paddings are crucial. Font-facing, on the other hand has much less lag (with the exception of what Paul Irish calls &#8220;<a title="Fighting the @font-face FOUT" href="http://paulirish.com/2009/fighting-the-font-face-fout/" target="_blank">FOUT</a>&#8220;) and also tends to render the same in all browsers.</p>
<p>So as I was building a theme for Posterous this past week, I used @font-face and everything looked fine locally. Font Squirrel even works some font magic to make IE cooperate with no effort at all. So I was happily moving along until I had posted everything online, linking to my assets and I realized that things looked great in every browser but Firefox. For reasons unknown to me at the time, Firefox would not show my embedded font. This was a bit of a surprise, so I spent a few minutes tweaking my links and making sure everything was right. This turned into a few HOURS of headache and frustration. I&#8217;ll spare you the horrors and just get to the juicy bits.</p>
<h2>The Fox Fix</h2>
<p>As it turns out, Firefox 3.5+ prevents cross-domain linking of font files as a security measure. What this means is that if you&#8217;re trying to link to a font from a different site, as you&#8217;re currently forced to do with services like Posterous and Tumblr (unless you use Typekit), it will work in every browser but Firefox. Thankfully, however, there&#8217;s a workaround. Font Squirrel can actually embed the font into the CSS using Base64 encoding.</p>
<p>What you&#8217;ll need to do is upload your font to Font Squirrel&#8217;s <a title="@FONT-FACE GENERATOR" rel="nofollow" href="http://www.fontsquirrel.com/fontface/generator" target="_blank">Font Face Generator</a> and choose the expert mode.</p>
<p>Here are the settings that I used.</p>
<div id="attachment_790" class="wp-caption aligncenter" style="width: 402px"><img class="size-large wp-image-790 " title="Screen shot 2010-08-09 at 2.37.09 PM" src="http://painteddigital.com/wp-content/uploads/2010/08/Screen-shot-2010-08-09-at-2.37.09-PM-392x340.png" alt="" width="392" height="340" /><p class="wp-caption-text">We don&#39;t need WOFF since Firefox is the only browser that uses it and we&#39;ll be embedding Firefox&#39;s font as a TrueType.</p></div>
<p>Font Squirrel makes an amazing little zip file for you with CSS and and example HTML file to get you going. With the Base64 encode you&#8217;ll have a super long file, but your fonts will work in all browsers. What I did was copy the CSS and paste it at the bottom of my main CSS file to help eliminate any possible errors and then changed the links to fit.</p>
<h2>Hosting the Files</h2>
<p>If you currently don&#8217;t have a server of your own to host the files, then the easiest solution is to use <a title="Dropbox" href="https://www.dropbox.com/referrals/NTQ5MDIxNDg5" target="_blank">DropBox</a>. You can put up to 2GB on Dropbox completely free and then link to the files in your theme. All you need to do is put the folders/files somewhere in your Public Dropbox folder, and get the link by selecting &#8220;get public link.&#8221; Then plug that into your theme/CSS file.</p>
<p>If you&#8217;re curious, the theme I made is still in the works for full Tumblr and WordPress compatibility, but you can check it out on my Posterous blog about Japan and missions at <a title="Reeds in Japan" href="http://reedsinjapan.com" target="_blank">http://reedsinjapan.com</a></p>
<h2>Posts and People that Helped Me</h2>
<p><a title="Adam Singer" href="http://singy.posterous.com/" target="_blank">Adam Singer</a> from Posterous gave me a big hand troubleshooting this.<br />
<a title="Cross domain workaround for @font-face and Firefox" href="http://geoff.evason.name/2010/05/03/cross-domain-workaround-for-font-face-and-firefox/" target="_blank">Cross domain workaround for @font-face and Firefox</a><br />
<a title="How to use CSS @font-face" href="http://nicewebtype.com/notes/2009/10/30/how-to-use-css-font-face/" target="_blank">The article that showed me the error in Firefox&#8217;s ways</a><br />
<a title="3 Reasons to Drop What You’re Doing and Grab Dropbox" href="http://painteddigital.com/2010/3-reasons-to-drop-what-youre-doing-and-grab-dropbox/" target="_self">Other reasons I like Drop box.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2010/how-to-embed-fonts-for-posterous-tumblr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Quick Tip: When Good Fonts Go Bad</title>
		<link>http://painteddigital.com/2010/css-quick-tip-when-good-fonts-go-bad/</link>
		<comments>http://painteddigital.com/2010/css-quick-tip-when-good-fonts-go-bad/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 17:17:35 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://painteddigital.com/?p=773</guid>
		<description><![CDATA[Above you can see a styled font from a recent project we did that has been ruined by CSS. We embeded this font using @font-face (which is much more consistent than a js/flash embed). The image above is using the default H3 tag which likes to bolden things and ruin your great looking fonts. The [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_777" class="wp-caption aligncenter" style="width: 432px"><img class="size-full wp-image-777  " title="custom-font-bold" src="http://painteddigital.com/wp-content/uploads/2010/07/custom-font-bold.png" alt="Custom Font Bold" width="422" height="220" /><p class="wp-caption-text">Font gone bad!</p></div>
<p>Above you can see a styled font from a recent project we did that has been ruined by CSS. We embeded this font using @font-face (which is much more consistent than a js/flash embed). The image above is using the default H3 tag which likes to bolden things and ruin your great looking fonts. The quick fix for this is just to add &#8220;font-weight: normal;&#8221; to your CSS and you will get results like what you were looking for.</p>
<div id="attachment_778" class="wp-caption aligncenter" style="width: 432px"><img class="size-full wp-image-778  " title="custom-font-normal" src="http://painteddigital.com/wp-content/uploads/2010/07/custom-font-normal.png" alt="Custom Font Normal" width="422" height="220" /><p class="wp-caption-text">How the font should display</p></div>
<p><strong>More Help:</strong><br />
You can find awesome font-kits for free from <a rel="nofollow" href="http://fontsquirrel.com" target="_blank">fontsquirrel.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2010/css-quick-tip-when-good-fonts-go-bad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kicking IE to the Curb for Some Round Corners</title>
		<link>http://painteddigital.com/2010/kicking-ie-to-the-curb-for-some-round-corners/</link>
		<comments>http://painteddigital.com/2010/kicking-ie-to-the-curb-for-some-round-corners/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 10:45:07 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://painteddigital.com/?p=321</guid>
		<description><![CDATA[Lately there&#8217;s been a lot of buzz about CSS3 and its new features.  Articles are popping up like daisies!  The Web Designer&#8217;s wall is showing examples of CSS3 and Design informer tells us we can &#8220;Use CSS3 Now&#8221; (fantastic agreement with this post, btw).  But I&#8217;m most concerned about one thing in CSS3 &#8211; rounded [...]]]></description>
			<content:encoded><![CDATA[<p>Lately there&#8217;s been a lot of <a title="my &quot;buzz&quot;" href="http://google.com/buzz/painteddigital" target="_blank">buzz</a> about CSS3 and its new features.  Articles are popping up like daisies!  The Web Designer&#8217;s wall is showing <a title="examples of CSS3" href="http://www.webdesignerwall.com/trends/css3-examples-and-best-practices/" target="_blank">examples of CSS3</a> and Design informer tells us we can &#8220;<a title="Use CSS3 Now" href="http://designinformer.com/use-css3-now/" target="_blank">Use CSS3 Now</a>&#8221; (fantastic agreement with this post, btw).  But I&#8217;m most concerned about one thing in CSS3 &#8211; rounded corners. Finally we have a simple, beautiful way to enhance our sites with little effort&#8230;except there&#8217;s one browser who doesn&#8217;t play nice.  Everyone&#8217;s favorite browser to hate &#8211; Internet Explorer. Yes, even IE8 has failed to implement some rudimentary support for rounded corners in CSS3 and that is a problem. Safari/Webkit, Chrome, and Firefox are currently leading the CSS3 front with Opera slowly catching up. With so many browsers (and their represented users) currently supporting some form of rounded corners, I felt I had no choice but to move forward without IE.</p>
<div id="attachment_438" class="wp-caption alignnone" style="width: 552px"><a rel="attachment wp-att-438" href="http://painteddigital.com/2010/02/17/kicking-ie-to-the-curb-for-some-round-corners/rounded-corners-firefox-ie-merig/"><img class="size-full wp-image-438 " title="rounded-corners-firefox-ie-merig" src="http://painteddigital.com/wp-content/uploads/2010/02/rounded-corners-firefox-ie-merig.png" alt="" width="542" height="306" /></a><p class="wp-caption-text">Rounded corners on Merig.com Firefox vs. IE</p></div>
<p>Currently, I am finishing up a design/development project for Meriwether Godsey, a catering company based here in Lynchburg VA and my current employer (<a title="Painted Digital Going Fulltime" href="http://painteddigital.com/2010/02/12/painted-digital-going-fulltime/" target="_self">until Feb 26</a>). The design features a series of rounded boxes to feature all of their sidebar content as opposed to a &#8220;stacked blocks&#8221; look it had before. I had an interesting revelation during the development of this site. I came to my boss with the proposition of giving modern browsers the CSS to have rounded corners, knowing that IE would be forced to render the content as squared &#8220;blocks.&#8221; After showing her the proposed solution in both sets of browsers, she replied &#8220;that&#8217;s fine!&#8221; I was a bit stunned, but excited at the same time. My goal was to save development time and to ensure cleaner code while providing a nicer look. In addition, I was able to save the user precious seconds that they would spend waiting on another image to download.</p>
<h2>Was It Worth It?</h2>
<p>With the bulk of the code now done, I can ask myself &#8220;Was it worth it?&#8221; The answer is a resounding &#8220;YES!&#8221; Using CSS3 now saved development time, it got the boss&#8217;s approval, it saves the user time, and eventually Microsoft will catch up with the rest of the world and users will see these great-looking corners. In the mean time, it&#8217;s not a big sacrifice. The design doesn&#8217;t look bad in Internet Explorer, so it&#8217;s not a big loss. If you&#8217;re on the fence about jumping into CSS3, my suggestion is go for it! You&#8217;ll be glad you did.</p>
<div class="further-reading">
<p>Further Reading:<br />
<a title="Code a Backwards Compatible, One Page Portfolio with HTML5 and CSS3" href="http://inspectelement.com/tutorials/code-a-backwards-compatible-one-page-portfolio-with-html5-and-css3/" target="_blank">Code a Backwards Compatible, One Page Portfolio with HTML5 and CSS3<br />
</a><a title="CSS3 Examples and Best Practices" href="http://www.webdesignerwall.com/trends/css3-examples-and-best-practices/" target="_blank">CSS3 Examples and Best Practices</a>
</div>
<h2>Blog Question</h2>
<p>I write these articles for you, the reader more than for me. I want everyone to benefit from what I&#8217;ve learned. So, my question is &#8220;Do you like a shorter format like this? Or would you rather see a more detailed article?&#8221; I&#8217;d really appreciate it if you let me know in the comments or on twitter. Thanks!!</p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2010/kicking-ie-to-the-curb-for-some-round-corners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping up with Google: How to Track External Links with the New Analytics Script</title>
		<link>http://painteddigital.com/2010/keepin-up-with-google-asynchronous-analytics/</link>
		<comments>http://painteddigital.com/2010/keepin-up-with-google-asynchronous-analytics/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 05:11:52 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mootools]]></category>

		<guid isPermaLink="false">http://painteddigital.com/?p=345</guid>
		<description><![CDATA[In this post, I will introduce you to the latest analytics code from Google, show you how you can update your inline external link tracking to work with it, and then demonstrate how to use a javascript framework to do all the heavy lifting for you.]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-365" href="http://painteddigital.com/2010/02/04/keepin-up-with-google-asynchronous-analytics/screen-shot-2010-02-03-at-10-51-05-pm/"><img class="alignnone size-large wp-image-365" title="Google Analytics" src="http://painteddigital.com/wp-content/uploads/2010/02/Screen-shot-2010-02-03-at-10.51.05-PM-690x141.png" alt="Google Analytics" width="580" height="118" /></a></p>
<p>In this post, I will introduce you to the latest analytics code from Google, show you how you can update your inline external link tracking to work with it, and then demonstrate how to use a javascript framework to do all the heavy lifting for you.</p>
<p>Back in December of 2009, Google released a fantastic update to it&#8217;s analytics (urchin?) app which they called <a rel="nofollow" href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html" target="_blank">asynchronous tracking</a>. Without getting technical, the big advantage of this update is that it loads the necessary files faster. In addition, you can now safely move you analytics code into the head of your HTML. This matters because you can get a better idea of who is coming to your site and &#8220;bouncing&#8221; away before the entire page loads. When the script is in the footer, a visitor can leave before the page fully loads and Google never tracks the visit.</p>
<h3><span style="color: #000000;">Here&#8217;s the new asynchronous script from Google:</span></h3>
<pre class="code"><code class="javascript">
var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
  })();
</code></pre>
<h2>How to update your external or outgoing link tracking</h2>
<p>I don&#8217;t claim to be much of a developer (you&#8217;ve been warned!) so my big dilemma was figuring out how to get outgoing link tracking working with the new google analytics code. You can find the <a title="Asynchronous Snippet's Official Usage Guide" onclick="javascript:_gaq.push(['_trackPageview', '/outgoing/code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html']);" rel="nofollow" href="http://code.google.com/apis/analytics/docs/tracking/asyncUsageGuide.html" target="_blank">official usage guide here</a>, but it wasn&#8217;t clear enough to me, so I went searching for a better explanation. I found a nice write-up well worth reading on using the async script and jquery to track click events <a title="Diving deep into user behavior with Google Analytics, Event Tracking, and jQuery" onclick="javascript:_gaq.push(['_trackPageview', '/outgoing/briancray.com/2009/12/29/understanding-user-behavior-google-analytics-event-tracking-jquery/']);" href="http://briancray.com/2009/12/29/understanding-user-behavior-google-analytics-event-tracking-jquery/" target="_blank">here</a>, which I&#8217;ll come back to, but what I initially wanted to know was how to track outgoing links inline with an &#8220;onclick&#8221; event.</p>
<p>The old method was to use the &#8220;_pagetracker&#8221; variable and looked like this (if you were linking to my site for example *wink* *wink*):</p>
<pre class="code"><code class="javascript">
&lt;a onclick="pageTracker._trackPageview('/outgoing/painteddigital.com');"  href="http://painteddigital.com" target="_blank"&gt;
</code></pre>
<p>But the new method uses the &#8220;_gaq&#8221; system to manage things and throws in some brackets to confuse you, but you can format it like this:</p>
<pre class="code"><code class="javascript">
&lt;a onclick="_gaq.push(['_trackPageview', '/outgoing/painteddigital.com']);" href="http://painteddigital.com" target="_blank"&gt;</code></pre>
<p>That&#8217;s all there is to it! &#8230;unless you want to make things easy for yourself and automate this so you don&#8217;t have to enter it into each link. With Jquery, this is is pretty simple. I have a client who needed to track on Joomla which is stuck on Mootools 1.11 so I&#8217;ll post that code here as well.</p>
<h2>How to automatically track outbound links with JQuery</h2>
<p>I recommend that you also use the new Google CDN Ajax library to load your JQuery for you, so I initialize with that (If you have any questions, just ask in the comments). You could also switch out target*=&#8221;_blank&#8221; for rel*=&#8221;external&#8221; if you use that tag.</p>
<pre class="code"><code class="javascript">
google.setOnLoadCallback(function() {
	$('a[target*="_blank"]').click(function () {
		_gaq.push(['_trackPageview','/outgoing/'+$(this).attr('href')]);
	});
});
</code></pre>
<h2>How to automatically track all external links with Mootools 1.11</h2>
<p>The try/catch isn&#8217;t necessary, but it&#8217;s a nice catchall</p>
<pre class="code"><code class="javascript">
window.addEvent('domready', function() {
	$$('a[target*="_blank"]').addEvent('click', function(){
		try {
			if(_gaq) {
				_gaq.push(['_trackPageview', '/outgoing/'+ this.getProperty('href');]);
			}
		}
		catch (err) {}
	});
});
</code></pre>
<p>If you find that something I&#8217;ve posted is not working out for you, let me know and I will try and help in the comments as best I can.</p>
<p>More reading from Google:</p>
<p><a rel="nofollow" href="http://analytics.blogspot.com/2009/12/google-analytics-launches-asynchronous.html" target="_blank">Google Analytics Blog: Google Analytics launches asynchronous tracking<br />
</a><a rel="nofollow" href="http://googlecode.blogspot.com/2009/12/google-analytics-launches-asynchronous.html" target="_blank">Google Code Blog: Google Analytics Launches Asynchronous Tracking</a></p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2010/keepin-up-with-google-asynchronous-analytics/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CSS3 Columns!</title>
		<link>http://painteddigital.com/2009/css3-columns/</link>
		<comments>http://painteddigital.com/2009/css3-columns/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 00:34:16 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[moz]]></category>
		<category><![CDATA[support]]></category>

		<guid isPermaLink="false">http://painteddigital.com/?p=236</guid>
		<description><![CDATA[I was so excited today to discover CSS3&#8242;s new support for columns. This is something that I really have wanted for a while, but felt it was too difficult and took too much time to otherwise try and implement. I came home today and immediately put columns to work on my About page. I was [...]]]></description>
			<content:encoded><![CDATA[<p>I was so excited today to discover CSS3&#8242;s new support for columns. This is something that I really have wanted for a while, but felt it was too difficult and took too much time to otherwise try and implement.<br />
<span id="more-236"></span><br />
I came home today and immediately put columns to work on my <a href="/about/" title="about">About</a> page. I was a little surprised to see that both Safari and Firefox did not support the simple</p>
<p><code>.some-class{<br />
	columns: 2;<br />
}<br />
</code><br />
but excited to see that it worked once I added<br />
<code>.some-class{<br />
	-moz-column-count:2;<br />
	-webkit-column-count:2;<br />
	columns: 2;<br />
}<br />
</code></p>
<p>I just wanted to share that with you. I&#8217;m still tinkering around with the new site and I hope to add more features, posts and work very soon. Also, I received an invite to basekit, which is a new CMS/coding platform that is supposed to cut up your psd for you. I&#8217;ll give it a try and review very soon.</p>
</p>
<p>One last note, I stumbled across a great article on Smashing Magazine today entitled <a href="http://www.smashingmagazine.com/2009/12/01/how-to-support-internet-explorer-and-still-be-cutting-edge/" target="_blank">How to Support Internet Explorer and Still Be Cutting Edge</a>. I enjoyed it so much, I actually <a href="http://twitter.com/painteddigital" target="_blank" rel="nofollow" title="Find Me on Twitter">retweeted</a> it twice! It&#8217;s actually what turned me on to this wonderful bit of CSS3 and I would encourage everyone to jump over and give it a read.</p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2009/css3-columns/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Get that Footer in the Footer!</title>
		<link>http://painteddigital.com/2009/get-that-footer-in-the-footer/</link>
		<comments>http://painteddigital.com/2009/get-that-footer-in-the-footer/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 03:41:07 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://painteddigital.com/?p=212</guid>
		<description><![CDATA[I was doing some finishing touches on the site today (and will be for a while) and I was having quite a difficult time keeping the footer at the bottom of some of my shorter pages. Thankfully, I found the solution, by Matthew Taylor (sounds like a good name to me) over on his blog [...]]]></description>
			<content:encoded><![CDATA[<p>I was doing some finishing touches on the site today (and will be for a while) and I was having quite a difficult time keeping the footer at the bottom of some of my shorter pages. Thankfully, I found the solution, by Matthew Taylor (sounds like a good name to me) over on his blog here: <a href="http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page" target="_blank">http://matthewjamestaylor.com/blog/keeping-footers-at-the-bottom-of-the-page</a> His solution is great because it only requires CSS, and according to him, it&#8217;s completely valid. I did notice a weird dotted line showing in IE8, but I&#8217;m not sure how to remove it yet.</p>
<p>As with any CSS changes, it took some pulling and arm twisting to get the CSS working, but I was able to get it going right here!  Thanks a lot Matthew.</p>
<p>If anyone has a suggestion for removing that dotted line in IE8, let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2009/get-that-footer-in-the-footer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling Flash AS3 functions from Javascript</title>
		<link>http://painteddigital.com/2008/calling-flash-as3-functions-from-javascript/</link>
		<comments>http://painteddigital.com/2008/calling-flash-as3-functions-from-javascript/#comments</comments>
		<pubDate>Tue, 20 May 2008 01:01:47 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://wordpress.mu/wp/painteddigital/?p=97</guid>
		<description><![CDATA[Well, I spent all day figuring this one out, so I thought I would share it for everyone to learn from my mistakes. Basically, for this I used Adobe&#8217;s ExternalInterface about which Adobe says in the documentation &#8220;Adobe recommends using ExternalInterface for all JavaScript-ActionScript communication.&#8221; So once I saw that, I knew it had to [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I spent all day figuring this one out, so I thought I would share it for everyone to learn from my mistakes. Basically, for this I used Adobe&#8217;s ExternalInterface about which Adobe says in the documentation &#8220;Adobe recommends using ExternalInterface for all JavaScript-ActionScript communication.&#8221; So once I saw that, I knew it had to be possible. Ok, enough with the intro, here&#8217;s my code. I will explain below.<span id="more-118"></span></p>
<p>Flash Actionscript:<br />
[as3]<br />
import flash.external.ExternalInterface;<br />
ExternalInterface.addCallback(&quot;sendTextToFlash&quot;, getTextFromJavaScript);<br />
function getTextFromJavaScript(str):void {<br />
	trace(str);<br />
}[/as3]<br />
That&#8217;s it! All you need to know is that &#8220;sendTextToFlash&#8221; is the name of the Javascript function Flash is listening for, and then it calls &#8220;getTextFromJavaScript&#8221; once it hears the call. &#8220;str&#8221; is the variable that is passed to Flash from the Javascript.</p>
<p>HTML/Javascript (don&#8217;t worry, it&#8217;s simple):<br />
[javascript]&lt;script type=&quot;text/javascript&quot;&gt;<br />
	var currentPage=&quot;Home&quot;;<br />
	function setCurrentPage(newPage) {<br />
		currentPage = newPage;<br />
		SendDataToFlashMovie(newPage);<br />
	}<br />
[/javascript]<br />
This bit is called when the user clicks on a link in the page, which looks like this:<br />
[javascript]&lt;a href=&quot;javascript:void(0);&quot; onClick=&quot;setCurrentPage(&#8216;Home&#8217;)&quot;&gt;Home&lt;/a&gt;<br />
[/javascript]<br />
And in turn, it calls &#8220;<span style="color: #660000;">SendDataToFlashMovie&#8221;</span> Now, back to the Javascript (For those of you unfamiliar with HTML and Javascript, please read a bit on the two before reading on. Otherwise I may confuse you).<br />
[javascript]<br />
function getFlashMovieObject(movieName){<br />
	if (window.document[movieName]){<br />
		return window.document[movieName];<br />
	}<br />
	if (navigator.appName.indexOf(&quot;Microsoft Internet&quot;)==-1){<br />
		if (document.embeds &amp;amp;&amp;amp; document.embeds[movieName])<br />
			return document.embeds[movieName];<br />
	}<br />
	else{<br />
		return document.getElementById(movieName);<br />
	}<br />
}<br />
[/javascript]<br />
The above function is for handling all the lovely browsers and their rendering engines. It should make this setup work on both Windows and Mac. You shouldn&#8217;t need to change much there.<br />
[as3]<br />
function SendDataToFlashMovie(newPage){<br />
	var flashMovie=getFlashMovieObject(&quot;main_flash&quot;);<br />
	flashMovie.sendTextToFlash(newPage);<br />
}<br />
&lt;/script&gt;[/as3]<br />
Here is where the magic happens. The flashMovie is set by the function above it. &#8220;main_flash&#8221; should be changed to the name of your flash embed id. I recommend using <a href="http://code.google.com/p/swfobject/" target="_blank">swfobject</a> to embed your swf.</p>
]]></content:encoded>
			<wfw:commentRss>http://painteddigital.com/2008/calling-flash-as3-functions-from-javascript/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
