<?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>Aliso the GeekAliso the Geek | A coder in love with WordPress</title>
	<atom:link href="http://alisothegeek.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://alisothegeek.com</link>
	<description>A coder in love with WordPress</description>
	<lastBuildDate>Tue, 15 Nov 2011 16:46:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Themejack is now open for business!</title>
		<link>http://alisothegeek.com/2011/09/themejack-launch/</link>
		<comments>http://alisothegeek.com/2011/09/themejack-launch/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 23:21:30 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[charity]]></category>
		<category><![CDATA[coupon]]></category>
		<category><![CDATA[discount]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[Themejack]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1299</guid>
		<description><![CDATA[For all y&#8217;all that have been following the Themejack news, you already know this. For those who don&#8217;t, here it is: Themejack has launched! It&#8217;s been in the works for a very long time. Ever since I started working on my own theme framework over a year ago, my husband Jim and I have been [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://themejack.net"><img class="aligncenter size-full wp-image-1300" title="Themejack - Crazy Awesome WordPress Themes" src="http://alisothegeek.com/wp-content/uploads/2011/09/themejack-logo.png" alt="Themejack logo" width="300" height="39" /></a>For all y&#8217;all that have been following the Themejack news, you already know this. For those who don&#8217;t, here it is:</p>
<p><span style="font-size: 3em;">Themejack has l</span><span style="font-size: 3em;">aunched!</span></p>
<p>It&#8217;s been in the works for a very long time. Ever since I started working on my own theme framework over a year ago, my husband Jim and I have been planning to open a premium theme shop. We love theme design and development, and I hope it shows through in the quality of our products.</p>
<p>I&#8217;ve been handing out coupon codes like crazy (much to the surprise of my business partner) so here&#8217;s a special Aliso the Geek offer to get you the grand opening discount: Enter the coupon code <strong>TJALISO15</strong> and get $15 off of your purchase. All the launch coupons are good through September 18, 2011.</p>
<p>Also, Cody is on sale while I build another sweet feature for it, which should be done in a little over a week. It&#8217;s $20 off right now, which puts the sale price at $39. (Combine that with the coupon, and it&#8217;s over 50% off!)</p>
<h2 id="the-best-part-themejack-gives-back">The best part: <a title="Themejack Gives Back" href="http://themejack.net/gives-back/">Themejack Gives Back</a></h2>
<p>I saved the best for last. When Themejack sells 1,000 themes, we&#8217;re donating <strong>$10,000</strong> to three different charities: Child&#8217;s Play, The Humane Society, and The WordPress Foundation. Every theme purchase earns one vote for the charity that matters most to you. When we hit the 1,000 theme mark, the votes will be tallied up and the donation will be divided among the charities. $6,000 to the charity with the most votes, $3,000 for second place, and $1,000 for the third. Every charity gets something, no matter what.</p>
<p>For any of that to happen, though, we need to sell 1,000 themes. So help us out, buy a theme, and vote for a charity! (I mean, come on! Cody is only $24 with the coupon!)</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/09/themejack-launch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Where the hell have I been?</title>
		<link>http://alisothegeek.com/2011/09/where-the-hell-have-i-been/</link>
		<comments>http://alisothegeek.com/2011/09/where-the-hell-have-i-been/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 02:38:39 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1290</guid>
		<description><![CDATA[Hi all; Aliso here. As some of you have surely noticed, I&#8217;ve been somewhat absent from my own blog lately. I&#8217;ve also been incommunicado to some extent—my sincere apologies to anyone who has sent me a message and been waiting for a response. Let me explain. In the past month, a lot has been going on. I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1291" title="Nerdery Interactive Labs" src="http://alisothegeek.com/wp-content/uploads/2011/09/Logo_nerdery.png" alt="" width="184" height="155" />Hi all; Aliso here. As some of you have surely noticed, I&#8217;ve been somewhat absent from my own blog lately. I&#8217;ve also been incommunicado to some extent—my sincere apologies to anyone who has sent me a message and been waiting for a response.</p>
<p>Let me explain.</p>
<p>In the past month, a lot has been going on. I was fired from my job at Brave New Media, and I got a job as a software engineer at The Nerdery in Bloomington, MN. I just finished my first week as a Nerdery Nerd, and it&#8217;s even more amazing than I ever thought it would be. I won&#8217;t go into detail on the Brave New Media situation—people close to me know what happened, and anyone who is curious should feel free to ask. It wasn&#8217;t exactly amicable and I don&#8217;t want to go spouting things on my blog until I can be completely objective about it. (Even then, I might not &#8220;spout&#8221; anything about the matter. We&#8217;ll see.)</p>
<p>Anyway, the new job is so fantastic, awesome and wonderful that it warrants a whole other post that I&#8217;m sure I&#8217;ll write this weekend. I just wanted to give a quick hello and explain my recent lack of blog-posty goodness.</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/09/where-the-hell-have-i-been/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>An Upstanding Solution</title>
		<link>http://alisothegeek.com/2011/08/an-upstanding-solution/</link>
		<comments>http://alisothegeek.com/2011/08/an-upstanding-solution/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 02:54:12 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[Coder Lifestyle]]></category>
		<category><![CDATA[ergonomics]]></category>
		<category><![CDATA[fitness]]></category>
		<category><![CDATA[standing desk]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1282</guid>
		<description><![CDATA[I&#8217;ve read a lot lately about how sitting for prolonged periods of time every day can shorten your life. While I&#8217;m skeptical, it seems like common sense that sitting down all the time just isn&#8217;t good for you. As programmers, we know what it feels like to only get out of our chairs once every [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1283" class="wp-caption alignleft" style="width: 310px"><a href="http://alisothegeek.com/wp-content/uploads/2011/08/photo.jpg"><img class="size-medium wp-image-1283" title="Standing Desk 1.0 Beta" src="http://alisothegeek.com/wp-content/uploads/2011/08/photo-300x225.jpg" alt="Photo of my temporary standing desk arrangement" width="300" height="225" /></a><p class="wp-caption-text">Standing Desk 1.0 Beta</p></div>
<p>I&#8217;ve read a lot lately about how sitting for prolonged periods of time every day <a title="The Most Dangerous Thing You'll Do All Day" href="http://health.yahoo.net/experts/menshealth/most-dangerous-thing-youll-do-all-day" target="_blank">can shorten your life</a>. While I&#8217;m skeptical, it seems like common sense that sitting down all the time just isn&#8217;t good for you. As programmers, we know what it feels like to only get out of our chairs once every few hours (on a good day).</p>
<p>An idea that seems to be <a title="Standing Desk Jockey: Eric Ragle" href="http://boingboing.net/2011/06/07/standing-desk-jockey-2.html" target="_blank">making</a> the <a title="Why and How I Switched to a Standing Desk" href="http://smarterware.org/7102/how-and-why-i-switched-to-a-standing-desk" target="_blank">rounds</a> right now is using a standing desk on a regular basis instead of a normal one. It&#8217;s intriguing, and I&#8217;ve thought about it for a while now&#8230; I figure it&#8217;s time to give it a shot, at least for a few days.</p>
<p>Since this is something I&#8217;m not entirely sure about, I&#8217;m using the &#8220;cheap-as-free&#8221; standing desk conversion kit. It consists of a plastic bin I store cables in, a black box to provide a mousing surface (it&#8217;s the box that Final Cut Studio used to come in) and a book to put under the keyboard since the lid of the bin has raised edges. My iMac does a great job of tilting up to a comfortable angle without having to set the computer on top of something.</p>
<p>This may not last, or it may be completely awesome and cause me to look for a more permanent (and probably non-free) solution. We&#8217;ll see what happens!</p>
<div class="bolts-callout note">
<p>For those that have read the articles on sitting making you 54% more likely to have a heart attack, please remember that&#8217;s 54% more than whatever risk you already have. So if you have a 1% risk normally, sitting all day puts you at 1.54%. Don&#8217;t freak out. Fear sells news.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/08/an-upstanding-solution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Customize admin menu colors in WordPress 3.2 (the easy way)</title>
		<link>http://alisothegeek.com/2011/07/customize-admin-menu-colors-wordpress-3-2/</link>
		<comments>http://alisothegeek.com/2011/07/customize-admin-menu-colors-wordpress-3-2/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 12:48:53 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin customization]]></category>
		<category><![CDATA[downloads]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1114</guid>
		<description><![CDATA[The updates to the admin UI in WordPress 3.2 are pretty great. I love the new interface. The only thing I didn&#8217;t love was the loss of the blocky header and footer of the admin section—that was the easiest and fastest way to customize the look of the admin area for client&#8217;s sites (or for [...]]]></description>
			<content:encoded><![CDATA[<p>The updates to the admin UI in WordPress 3.2 are pretty great. I love the new interface. The only thing I didn&#8217;t love was the loss of the blocky header and footer of the admin section—that was the easiest and fastest way to customize the look of the admin area for client&#8217;s sites (or for fun). With the admin menu being separated from the rest of the page in version 3.2, though, I can customize the colors of that instead, and it still looks pretty darn slick.</p>
<p style="text-align: center;"><a href="http://alisothegeek.com/wp-content/uploads/2011/06/Picture-2.png"><img class="aligncenter size-large wp-image-1115" title="Customized admin menu screenshot" src="http://alisothegeek.com/wp-content/uploads/2011/06/Picture-2-520x396.png" alt="Customized admin menu screenshot" width="520" height="396" /></a></p>
<p>It looks simple enough, but when you take a closer look at the CSS (or just at the menu itself) you realize there are lots of different elements colors need to be applied to:</p>
<ul>
<li>Menu background</li>
<li>Menu header borders</li>
<li>Menu header link text</li>
<li>Separators</li>
<li>Selected background</li>
<li>Selected header borders</li>
<li>Selected header link text</li>
<li>Selected header text shadow</li>
</ul>
<p>And to account for minimized menus with pop-out submenus:</p>
<ul>
<li>Pop-out menu headers</li>
<li>Pop-out menu borders</li>
<li>Pop-out menu header link text</li>
<li>Selected pop-out menu header</li>
<li>Selected pop-out menu link text</li>
</ul>
<p>I went through and customized all of these things with simplistic colors (#069, etc.) and ended up with a pretty sweet menu. Then I wanted to change the color scheme, and I realized there were a zillion (24 actually) places I needed to change colors to make that happen.</p>
<p>This is by no means impossible, but it&#8217;s kind of a pain in the ass. So I did some Googling and found <a title="The CSS_Color class from BarelyFitz" href="http://www.barelyfitz.com/projects/csscolor/" target="_blank">a great PHP script to generate CSS color variations</a> from one base color. I had to modify the script a little (I don&#8217;t have PEAR installed on my dev server) but I ultimately got it to work.</p>
<p>Here&#8217;s the beginning of the stylesheet, so you can see how it works:</p>
<pre>&lt;?php
header( 'Content-type: text/css' );
require_once( '_inc/csscolor.php' );

$base = new CSS_Color( '3B4C7A' );
$selected = new CSS_Color( 'BB7101' );
?&gt;
/* @group Admin Menu Coloring
----------------------------------------------- */

/* Background color of entire menu */
#adminmenuback, #adminmenuwrap, #adminmenu .wp-submenu .wp-submenu-head {
	background: #&lt;?php echo $base-&gt;bg['0']; ?&gt;;
}</pre>
<p>First I&#8217;m tricking the browser into thinking this PHP file is really a CSS file. I&#8217;m sneaky like that. Then I&#8217;m including the modified color script.</p>
<p>Next I define two colors: &#8220;base&#8221; for the overall menu look and &#8220;selected&#8221; for the current menu header.</p>
<p>From here on out, I can use those two variables to print variations of the original color. The script returns a &#8220;bg&#8221; component (the background color) and a &#8220;fg&#8221; component (the foreground color &#8211; white or black, depending on the shade of the background). You can go from -5 to +5 in range (<a title="The CSS_Color class from BarelyFitz" href="http://www.barelyfitz.com/projects/csscolor/" target="_blank">see the original script&#8217;s website for a great visual example</a>). This worked GREAT.</p>
<p>If you want to download the whole package (CSS/PHP file + CSS_Color class file), here you go:</p>
<p><a class="bolts-download-link" href="http://alisothegeek.com/wp-content/uploads/2011/07/wp3.2-admin-menu.zip">WordPress 3.2 Admin Menu Custom Colors</a></p>
<p>To use it in your theme, put both of the files (<code>admin-menu.css.php</code> and <code>csscolor.php</code>) in your theme folder, and add this code to your <code>functions.php</code> file:</p>
<pre>add_action( 'admin_print_styles', 'atg_slick_menu_style' );
function atg_slick_menu_style() {
	wp_register_style( 'slick-admin-menu', get_bloginfo( 'stylesheet_directory' ) . '/admin-menu.css.php' );
	wp_enqueue_style( 'slick-admin-menu' );
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/07/customize-admin-menu-colors-wordpress-3-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Picking apart XML feeds and namespaces with PHP and SimpleXML</title>
		<link>http://alisothegeek.com/2011/07/picking-apart-xml-feeds-and-namespaces-with-php-and-simplexml/</link>
		<comments>http://alisothegeek.com/2011/07/picking-apart-xml-feeds-and-namespaces-with-php-and-simplexml/#comments</comments>
		<pubDate>Mon, 04 Jul 2011 16:15:22 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[foreach loop]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SimpleXML]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1126</guid>
		<description><![CDATA[I love parsing XML feeds in PHP. It makes virtually anything that has an RSS or Atom feed completely accessible to my programming. YouTube video feeds, blog feeds, even Facebook Walls. I&#8217;ve used SimplePie a lot to make combined social media feeds at work, and SimplePie provides a pretty simple way to access data from [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-1148" href="http://alisothegeek.com/2011/07/picking-apart-xml-feeds-and-namespaces-with-php-and-simplexml/feed-icon-128x128/"><img class="alignleft size-full wp-image-1148" title="XML feeds to PHP" src="http://alisothegeek.com/wp-content/uploads/2011/06/feed-icon-128x128.png" alt="XML feeds to PHP" width="150" height="150" /></a>I love parsing XML feeds in PHP. It makes virtually anything that has an RSS or Atom feed completely accessible to my programming. YouTube video feeds, blog feeds, even Facebook Walls. I&#8217;ve used SimplePie a lot to make combined social media feeds at work, and SimplePie provides a pretty simple way to access data from custom namespaces. Recently, though, I had to work with namespaces without SimplePie, and I&#8217;d never done it before. It&#8217;s not a secret or anything, but there&#8217;s a really great way to do it with just two lines of code.<span id="more-1126"></span></p>
<p>To do this, you&#8217;ll need a server running PHP5. It comes with SimpleXML installed by default. I&#8217;ll be using an Atom feed as an example, but it works the same way for any XML feed.</p>
<p>Let&#8217;s start with the basics. What does the data look like?</p>
<pre>&lt;?xml version='1.0' encoding='UTF-8'?&gt;

&lt;feed xmlns='http://www.w3.org/2005/Atom'&gt;
	&lt;id&gt;http://youtube.com/url-to-youtube-feed/&lt;/id&gt;
	&lt;updated&gt;2011-06-29T15:57:42.686Z&lt;/updated&gt;
	&lt;title type='text'&gt;Sweet YouTube User Feed&lt;/title&gt;
	&lt;author&gt;
		&lt;name&gt;alisothegeek&lt;/name&gt;
		&lt;uri&gt;http://gdata.youtube.com/feeds/api/users/alisothegeek&lt;/uri&gt;
	&lt;/author&gt;
	&lt;entry&gt;
		&lt;id&gt;http://gdata.youtube.com/feeds/api/videos/XXXXXXXXX&lt;/id&gt;
		&lt;published&gt;2011-06-13T21:08:33.000Z&lt;/published&gt;
		&lt;title type='text'&gt;Awesome Video Title&lt;/title&gt;
		&lt;author&gt;
			&lt;name&gt;alisothegeek&lt;/name&gt;
			&lt;uri&gt;http://gdata.youtube.com/feeds/api/users/alisothegeek&lt;/uri&gt;
		&lt;/author&gt;
		&lt;media:group&gt;
			&lt;media:thumbnail url='http://i.ytimg.com/vi/XXXXXXXXX/0.jpg' height='240' width='320' time='00:01:36'/&gt;
			&lt;media:title type='plain'&gt;Awesome Video Title&lt;/media:title&gt;
			&lt;yt:duration seconds='192'/&gt;
		&lt;/media:group&gt;
	&lt;/entry&gt;
&lt;/feed&gt;</pre>
<p>That&#8217;s a super-pared-down version of a YouTube user uploads feed.</p>
<p>Looping through and getting separate entries (or &#8220;items&#8221; in RSS) is really easy with SimpleXML.</p>
<pre>$youtube_feed = simplexml_load_file('http://gdata.youtube.com/feeds/api/users/alisothegeek/uploads');
foreach ( $youtube_feed-&gt;entry as $entry ) :
	echo $entry-&gt;title;
endforeach;</pre>
<p>That would print the title of each entry in the feed. The $entry object is the important part. You can use that to access any of the tags inside the entry, like <code>title</code>, <code>published</code>, <code>content</code>, etc. Well, almost any tag.</p>
<p>Remember the media:group part of the example feed? Let&#8217;s say you want to grab that media:thumbnail. It&#8217;s not as easy as <code>$entry-&gt;media-&gt;thumbnail</code> or <code>$entry-&gt;media['thumbnail']</code> or, really, anything with our current loop. Right now it&#8217;s inaccessable. Why? It&#8217;s in a different namespace.</p>
<h2 id="dealing-with-namespaces">Dealing With Namespaces</h2>
<pre>&lt;media:thumbnail url='http://i.ytimg.com/vi/XXXXXXXXX/0.jpg' height='240' width='320' time='00:01:36'/&gt;</pre>
<p>The <code>media:</code> part of that tag is what the namespace is. Look at the very top of an XML feed and you will probably see something like this:</p>
<pre>&lt;feed xmlns='http://www.w3.org/2005/Atom' xmlns:media='http://search.yahoo.com/mrss/'
  xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gd='http://schemas.google.com/g/2005'
  xmlns:gml='http://www.opengis.net/gml' xmlns:yt='http://gdata.youtube.com/schemas/2007'
  xmlns:georss='http://www.georss.org/georss'&gt;</pre>
<p>All the <code>xmlns:</code> attributes are defining different namespaces and where they are located. To use them and access the <code>media</code> namespace, we would need this code:</p>
<pre>$media = $entry-&gt;children( 'http://search.yahoo.com/mrss/' );</pre>
<p>After that line, you could use <code>$media-&gt;thumbnail</code> to access that tag. Yay! But there are a lot of other namespaces, and setting them each one by one is a pain in the ass. Luckily, SimpleXML has a function to help us out. With this we won&#8217;t need the URL because it stores all the namespace URLs in an array.</p>
<pre>$namespaces = $entry-&gt;getNameSpaces( true );
$media = $entry-&gt;children( $namespaces['media'] );</pre>
<p>That&#8217;s a lot nicer and more convenient, but it&#8217;s still going to require one line of code for each namespace. What to do???</p>
<p>Foreach loop to the rescue!</p>
<pre>foreach ( $entry-&gt;getNameSpaces( true ) as $key =&gt; $children )
	$$key = $entry-&gt;children( $children );</pre>
<p>With those two lines of code, you&#8217;ll now have access to all namespaces in the feed, with an appropriately-named variable for each. <code>media:thumbnail</code> is <code>$media-&gt;thumbnail</code>.</p>
<p>Now go build something awesome with it!</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/07/picking-apart-xml-feeds-and-namespaces-with-php-and-simplexml/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Show a user&#8217;s order history on &#8220;My Account&#8221; in Cart66</title>
		<link>http://alisothegeek.com/2011/06/show-a-users-order-history-on-my-account-in-cart66/</link>
		<comments>http://alisothegeek.com/2011/06/show-a-users-order-history-on-my-account-in-cart66/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 00:44:44 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Cart66]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1137</guid>
		<description><![CDATA[This isn&#8217;t a full tutorial, just some code for people to use. I&#8217;m working on a site that&#8217;s using Cart66 for their online store. Unfortunately, Cart66 doesn&#8217;t come with a function or shortcode for displaying a logged-in user&#8217;s purchase history. I made a somewhat comprehensive &#8220;My Account&#8221; page that does just that. Here&#8217;s the code [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1139" title="Cart66 Purchase History" src="http://alisothegeek.com/wp-content/uploads/2011/07/purchase-history-150x150.png" alt="" width="150" height="150" />This isn&#8217;t a full tutorial, just some code for people to use.</p>
<p>I&#8217;m working on a site that&#8217;s using Cart66 for their online store. Unfortunately, Cart66 doesn&#8217;t come with a function or shortcode for displaying a logged-in user&#8217;s purchase history. I made a somewhat comprehensive &#8220;My Account&#8221; page that does just that.<span id="more-1137"></span></p>
<p>Here&#8217;s the code for the guts of the page:</p>
<pre>&lt;p&gt;&lt;?php echo do_shortcode( '[account_login]' ); ?&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;?php echo do_shortcode( '[account_info]' ); ?&gt;

&lt;hr /&gt;

&lt;h3&gt;Your Orders&lt;/h3&gt;
&lt;table id="viewCartTable"&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th&gt;Order Number&lt;/th&gt;
			&lt;th&gt;Date&lt;/th&gt;
			&lt;th&gt;Total&lt;/th&gt;
			&lt;th&gt;Order Status&lt;/th&gt;
			&lt;th&gt;Receipt&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
	&lt;?php
	global $wpdb;

	$results = $wpdb-&gt;get_results( "SELECT ouid, ordered_on, trans_id, total, status FROM " . $wpdb-&gt;prefix . "cart66_orders WHERE account_id = " . Cart66Session::get( 'Cart66AccountId' ) . ' ORDER BY ordered_on DESC' );

	foreach ( $results as $order ) {
		echo '&lt;tr&gt;
			&lt;td&gt;' . $order-&gt;trans_id . '&lt;/a&gt;&lt;/td&gt;
			&lt;td&gt;' . date( 'F j, Y', strtotime( $order-&gt;ordered_on ) ) . '&lt;/td&gt;
			&lt;td&gt;' . $order-&gt;total . '&lt;/td&gt;
			&lt;td&gt;' . ucwords( $order-&gt;status ) . '&lt;/td&gt;
			&lt;td&gt;&lt;a href="' . get_bloginfo( 'url' ) . '/store/receipt/?ouid=' . $order-&gt;ouid . '" title="Click to view receipt" target="_blank"&gt;View Receipt&lt;/a&gt;&lt;/td&gt;
		&lt;/tr&gt;';
	}

	?&gt;
	&lt;/tbody&gt;
&lt;/table&gt;</pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/06/show-a-users-order-history-on-my-account-in-cart66/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>I&#8217;m going to WordCamp Chicago!</title>
		<link>http://alisothegeek.com/2011/06/im-going-to-wordcamp-chicago/</link>
		<comments>http://alisothegeek.com/2011/06/im-going-to-wordcamp-chicago/#comments</comments>
		<pubDate>Sun, 26 Jun 2011 20:04:49 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WC Chicago]]></category>
		<category><![CDATA[WordCamp]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1123</guid>
		<description><![CDATA[A couple of days ago, my plane tickets were purchased and my hotel reservation was made. I&#8217;m headed to WordCamp Chicago! Brave New Media, the company I work for, is sending me along with our other (awesome) developer, Jerry Kramer. I&#8217;ll definitely be tweeting throughout the event, and you can expect a post or two [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://2011.chicago.wordcamp.org/"><img class="alignleft size-full wp-image-1124" title="WordCamp Chicago attendee badge" src="http://alisothegeek.com/wp-content/uploads/2011/06/wc-chicago-att.jpg" alt="WordCamp Chicago attendee badge" width="200" height="250" /></a>A couple of days ago, my plane tickets were purchased and my hotel reservation was made. I&#8217;m headed to WordCamp Chicago!</p>
<p>Brave New Media, the company I work for, is sending me along with our other (awesome) developer, Jerry Kramer.</p>
<p>I&#8217;ll definitely be tweeting throughout the event, and you can expect a post or two on my blog. I&#8217;ll also be writing on the <a title="Brave New Media's blog" href="http://blog.bravenewmedia.net/">Brave New Media blog</a>—that stuff will be less technical, and my blog will be more developer-oriented. Follow me <a title="Aliso the Geek on Twitter" href="http://twitter.com/alisothegeek">@alisothegeek</a> if you want to hear all the juicy details as events unfold!</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/06/im-going-to-wordcamp-chicago/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPMU Dev Copyright Infringement: Looking at the Code</title>
		<link>http://alisothegeek.com/2011/06/wpmu-dev-copyright-infringement-looking-at-the-code/</link>
		<comments>http://alisothegeek.com/2011/06/wpmu-dev-copyright-infringement-looking-at-the-code/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 02:55:44 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[Opinion]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[GPL]]></category>
		<category><![CDATA[WPMU Dev]]></category>
		<category><![CDATA[Yoast]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1090</guid>
		<description><![CDATA[I&#8217;ve followed all the hubbub online about WPMU Dev&#8216;s copyright infringement on Yoast&#8217;s WordPress SEO plugin. There are some people taking sides, and I haven&#8217;t vocally been one of them until now. I&#8217;ve used WPMU Dev&#8217;s plugins before, and once WP_DEBUG is turned on, lots of errors usually pop up. Between that and their sleazy [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-1091" title="WordPress SEO code comparison" src="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-9.00.39-PM-e1307758210295-150x150.png" alt="WordPress SEO code comparison" width="150" height="150" />I&#8217;ve followed <a href="http://yoast.com/wpmu-dev-response/" target="_blank">all the hubbub online</a> about <a href="http://premium.wpmudev.org/" target="_blank">WPMU Dev</a>&#8216;s copyright infringement on Yoast&#8217;s <a href="http://yoast.com/wordpress/seo/" target="_blank">WordPress SEO</a> plugin. There are some people taking sides, and I haven&#8217;t vocally been one of them until now.<span id="more-1090"></span></p>
<p>I&#8217;ve used WPMU Dev&#8217;s plugins before, and once <code>WP_DEBUG</code> is turned on, lots of errors usually pop up. Between that and their sleazy autoblog plugins, I wasn&#8217;t too surprised when I heard that they may have violated copyright law and copied someone else&#8217;s code. After all, WordPress SEO is by far the best SEO plugin I&#8217;ve ever used for WordPress, and I consider it a standard part of any of my WordPress sites these days. If I was going to be a dick and copy someone&#8217;s code for my own SEO plugin, I&#8217;d probably start there.</p>
<p>I made a fresh install of WordPress on my dev server (with <code>WP_DEBUG</code> on) and installed <a href="http://premium.wpmudev.org/project/wpmu-dev-seo" target="_blank">WPMU DEV SEO</a>. As soon as I activated it, I saw this:</p>
<p><a href="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.40.21-PM.png"><img class="aligncenter size-large wp-image-1092" title="WPMU DEV SEO activation" src="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.40.21-PM-520x133.png" alt="WPMU DEV SEO activation" width="520" height="133" /></a></p>
<p>316 characters of unexpected output. Wonder what those were. Oh, and what&#8217;s that on the top? An error notice for an undefined array index (from <code>wp_upload_dir()</code>: <code>$dir['basedir']</code>).</p>
<p>Also, I get a glaring warning that I need to install their Update Notifications plugin. So I downloaded and activated that, and lo and behold:</p>
<p><a href="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.46.13-PM.png"><img class="aligncenter size-large wp-image-1093" title="WPMU Dev Update Notifications activation" src="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.46.13-PM-520x417.png" alt="WPMU Dev Update Notifications activation" width="520" height="417" /></a></p>
<p><abbr title="What the frak?">WTF?</abbr> I just wanted to get notified about updates, not plastered with a giant video advertising your paid memberships. Can&#8217;t you see I have a members-only plugin installed next to this one?</p>
<p>The best part of that alert was that it was on <strong>every admin page. </strong>At least it had a tiny &#8220;Dismiss&#8221; link in the bottom corner.</p>
<p>In case you didn&#8217;t see it, there were also two more notices generated by that plugin.</p>
<hr class="bolts-divider" />
<p>So there were a few notices generated for sloppy code, and a giant ad covering my entire admin screen. That&#8217;s not horrible, it&#8217;s just annoying. So I finally opened up the two SEO plugins side by side and started comparing code. The only section I&#8217;ll post about here is the part that replaces the placeholder tags (i.e. replacing <code>%%sitename%%</code> with the name of the blog).</p>
<p>Let&#8217;s start with the function name:</p>
<p><a href="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.56.28-PM.png"><img class="aligncenter size-large wp-image-1094" title="SEO plugin function names" src="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.56.28-PM-520x10.png" alt="SEO plugin function names" width="520" height="10" /></a></p>
<p><code>wpseo_replace_vars()</code> versus <code>wds_replace_vars()</code>. Similar, but forgivable&#8230; until you look at the rest of the function.</p>
<p><a href="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.58.57-PM.png"><img class="aligncenter size-large wp-image-1095" title="$defaults comparison" src="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.58.57-PM-520x132.png" alt="$defaults comparison" width="520" height="132" /></a></p>
<p>In the <code>$defaults</code> array, they removed two lines. Indentation, quote type, item order, and the variable names are all the same.</p>
<p><a href="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.59.26-PM.png"><img class="aligncenter size-large wp-image-1096" title="$pagenum comparison" src="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-8.59.26-PM-520x59.png" alt="$pagenum comparison" width="520" height="59" /></a></p>
<p>Here, they took the if-else statement and converted it to the shorthand version.</p>
<p><a href="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-9.00.39-PM1.png"><img class="aligncenter size-large wp-image-1097" title="SEO replacements array comparison" src="http://alisothegeek.com/wp-content/uploads/2011/06/Screen-shot-2011-06-10-at-9.00.39-PM1-520x121.png" alt="SEO replacements array comparison" width="520" height="121" /></a></p>
<p>This was my favorite part. The <code>$r</code> variable, which holds the function arguments, was an object in Yoast&#8217;s plugin. WPMU Dev turned it into an array instead, so <code>$r-&gt;post_title</code> becomes <code>$r['post_title']</code>. Other than some slight differences, the <code>$replacements</code> arrays in both plugins are way too similar. Again, indentation and item order are the same. Some items got removed.</p>
<p>Yoast took care of six replacements before this array, but WPMU Dev lumped them all into one array. I removed those six from WPMU Dev&#8217;s code to show the comparison—I did not change the order, syntax, or appearance (or anything else) of the code in the screenshot.</p>
<p>This was just a tiny part of the code that makes up  the plugins. Browsing through the rest of it, there are equally obvious similarities. Bad form, WPMU Dev.</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/06/wpmu-dev-copyright-infringement-looking-at-the-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email obfuscation in WordPress</title>
		<link>http://alisothegeek.com/2011/06/email-obfuscation-in-wordpress/</link>
		<comments>http://alisothegeek.com/2011/06/email-obfuscation-in-wordpress/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 02:06:39 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[WordPress functions]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1088</guid>
		<description><![CDATA[For those who don&#8217;t know about the antispambot() function in WordPress, it automatically obfuscates email addresses so it&#8217;s safe to use mailto: links. It turns email@example.com into &#38;#101;&#38;#109;a&#38;#105;&#38;#108;&#38;#64;e&#38;#120;&#38;#97;mp&#38;#108;e.c&#38;#111;m . Cool, huh?]]></description>
			<content:encoded><![CDATA[<p>For those who don&#8217;t know about the <code>antispambot()</code> function in WordPress, it automatically obfuscates email addresses so it&#8217;s safe to use <code>mailto:</code> links. It turns <code>email@example.com</code> into <code>&amp;#101;&amp;#109;a&amp;#105;&amp;#108;&amp;#64;e&amp;#120;&amp;#97;mp&amp;#108;e.c&amp;#111;m</code> . Cool, huh?</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/06/email-obfuscation-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing Bolts, a WordPress Parent Theme</title>
		<link>http://alisothegeek.com/2011/06/introducing-bolts-a-wordpress-parent-theme/</link>
		<comments>http://alisothegeek.com/2011/06/introducing-bolts-a-wordpress-parent-theme/#comments</comments>
		<pubDate>Sat, 04 Jun 2011 21:45:13 +0000</pubDate>
		<dc:creator>Alison Barrett</dc:creator>
				<category><![CDATA[Themes]]></category>
		<category><![CDATA[Bolts]]></category>
		<category><![CDATA[Themejack]]></category>

		<guid isPermaLink="false">http://alisothegeek.com/?p=1062</guid>
		<description><![CDATA[I could endlessly tinker with Bolts, adding one more feature or making one more change before release, but then it would never reach 1.0. So, without further adieu, here it is: Bolts 1.0 It&#8217;s not perfect, but nothing ever is. Please enjoy using it, and I welcome any and all feedback! The fact that Bolts is [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-1064 alignright" title="Bolts" src="http://alisothegeek.com/wp-content/uploads/2011/06/screenshot.png" alt="Bolts" width="300" height="225" />I could endlessly tinker with Bolts, adding one more feature or making one more change before release, but then it would never reach 1.0. So, without further adieu, here it is:</p>
<p><a class="bolts-download-link" href="http://alisothegeek.com/wp-content/uploads/2011/06/bolts.1.0.zip">Bolts 1.0</a></p>
<p>It&#8217;s not perfect, but nothing ever is. Please enjoy using it, and I welcome any and all feedback!</p>
<p>The fact that Bolts is launch-able means that Themejack is that much closer to being a reality. Keep an eye on <a title="Themejack" href="http://themejack.net/">themejack.net</a>, because Bolts will ultimately live there. Once Themejack is launched, I&#8217;ll probably submit this to the WordPress theme repository!</p>
]]></content:encoded>
			<wfw:commentRss>http://alisothegeek.com/2011/06/introducing-bolts-a-wordpress-parent-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

