<?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>Ben HusonBen Huson &raquo; </title>
	<atom:link href="http://www.benhuson.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benhuson.co.uk</link>
	<description>Web Designer and Developer</description>
	<lastBuildDate>Wed, 10 Mar 2010 20:22:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Category Paging Functions in WP e-Commerce 3.7.6</title>
		<link>http://www.benhuson.co.uk/2010/03/10/wpsc-paging/</link>
		<comments>http://www.benhuson.co.uk/2010/03/10/wpsc-paging/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 09:30:31 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Paging]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1461</guid>
		<description><![CDATA[WP e-Commerce 3.7.6 now includes better support for paging on category pages.
The latest release contains a suite of functions (my little contribution) to help you customise how pagination is displayed in your WPSC templates.
You can find an in-depth look at these functions and how to use them in the WP e-Commerce Documentation.
Below are some quick [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://getshopped.org/getshopped-news/wp-e-commerce-3-7-6-rc-1-is-out/">WP e-Commerce 3.7.6</a> now includes better support for paging on category pages.</strong></p>
<p>The latest release contains a suite of functions (my little contribution) to help you customise how pagination is displayed in your WPSC templates.</p>
<p>You can find an in-depth look at these functions and how to use them in the <a href="http://getshopped.org/resources/docs/design-and-layout/pagination/">WP e-Commerce Documentation</a>.</p>
<p>Below are some quick examples of what you can do&#8230;</p>
<p><span id="more-1461"></span></p>
<h3>Basic paging</h3>
<p><img class="border" title="wpsc-paging" src="http://www.benhuson.co.uk/wp-content/uploads/wpsc-paging.gif" alt="" width="400" height="50" /></p>
<p>Some fairly standard paging with linked page numbers, previous and next links, and arrow links to take to to the first and last pages. You can customise the text that is used for previous, next, first and last links.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_first_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'&amp;laquo;'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_previous_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'previous'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_pagination<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_next_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'next'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_last_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'&amp;raquo;'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Limit the amount of pages</h3>
<p><img class="alignnone size-full wp-image-1462 border" title="wpsc-paging-page-x-of-x" src="http://www.benhuson.co.uk/wp-content/uploads/wpsc-paging-page-x-of-x.gif" alt="" width="400" height="90" /></p>
<p>You can limit the amount of page links to show at one time. The above example shows what happens if there are 10 pages of products, but only showing 7 page links at a time. Notice also the text describing which page you&#8217;re on and that the previous and first links are greyed out when not applicable &#8211; you can also choose to hide them instead of showing inactive links.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Page <span style="color: #000000; font-weight: bold;">&lt;?php</span> wpsc_showing_products_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>:
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_first_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'&amp;laquo;'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_previous_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'previous'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_pagination<span style="color: #009900;">&#40;</span> <span style="color: #cc66cc;">7</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_next_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'next'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_last_products_link<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'&amp;raquo;'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Total number of products</h3>
<p><img class="border" title="wpsc-paging-showing-x-products" src="http://www.benhuson.co.uk/wp-content/uploads/wpsc-paging-showing-x-products.gif" alt="" width="400" height="50" /></p>
<p>There is a function to easily display the total number of products. You can detect if the category has multiple pages and if it doesn&#8217;t display something like this instead.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> wpsc_has_pages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;!-- Insert pagination for multiple pages --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">else</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   Showing <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_total_product_count<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> products
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>Number of products showing</h3>
<p><img class="alignnone size-full wp-image-1463 border" title="wpsc-paging-showing-x-of-x-products" src="http://www.benhuson.co.uk/wp-content/uploads/wpsc-paging-showing-x-of-x-products.gif" alt="" width="400" height="50" /></p>
<p>You can display an indication as to which products are showing depending on which page you&#8217;re viewing.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Showing <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_showing_products<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> of <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> wpsc_total_product_count<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> products:</pre></div></div>

<h3>What next?</h3>
<p>The new WP e-Commerce default themes contain examples of pagination so hop into your templates and <a href="http://getshopped.org/resources/docs/design-and-layout/pagination/">create some nice pagination&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/03/10/wpsc-paging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Permalinks on a Namesco Zeus Server</title>
		<link>http://www.benhuson.co.uk/2010/03/01/wordpress-permalinks-zeus-server/</link>
		<comments>http://www.benhuson.co.uk/2010/03/01/wordpress-permalinks-zeus-server/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 22:50:24 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Namesco]]></category>
		<category><![CDATA[Permalinks]]></category>
		<category><![CDATA[Zeus Server]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1444</guid>
		<description><![CDATA[I had a bit of a problem recently trying to convert a WordPress .htaccess file to a rewrite.script file for a Zeus server. My knowledge of the syntax for rewrite.script was non-existant so I tried the .htaccess converter provided in the Namesco admin.
This managed to get me part of the way there but the permalinks [...]]]></description>
			<content:encoded><![CDATA[<p>I had a bit of a problem recently trying to convert a WordPress .htaccess file to a rewrite.script file for a Zeus server. My knowledge of the syntax for rewrite.script was non-existant so I tried the .htaccess converter provided in the Namesco admin.</p>
<p>This managed to get me part of the way there but the permalinks included &#8220;index.php&#8221; before the custom permalink setting.</p>
<p><span id="more-1444"></span></p>
<p>Hunting around I found <a href="http://www.adamchristie.co.uk/wordpress/seo-friendly-wordpress-urls-on-namesco-zeus-servers/">this blog post by Adam Christie</a> in which he documents a rewrite.script for WordPress &#8211; and it works! I have provide the code below for your reference.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RULE_0_START<span style="color: #339933;">:</span>
<span style="color: #666666; font-style: italic;"># get the document root
</span>map path into SCRATCH<span style="color: #339933;">:</span>DOCROOT from <span style="color: #339933;">/</span>
<span style="color: #666666; font-style: italic;"># initialize our variables
</span>set SCRATCH<span style="color: #339933;">:</span>ORIG_URL <span style="color: #339933;">=</span> <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>URL<span style="color: #009900;">&#125;</span>
set SCRATCH<span style="color: #339933;">:</span>REQUEST_URI <span style="color: #339933;">=</span> <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>URL<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># see if theres any queries in our URL
</span>match URL into $ with ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>\?<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$
<span style="color: #b1b100;">if</span> matched then
set SCRATCH<span style="color: #339933;">:</span>REQUEST_URI <span style="color: #339933;">=</span> $<span style="color: #cc66cc;">1</span>
set SCRATCH<span style="color: #339933;">:</span>QUERY_STRING <span style="color: #339933;">=</span> $<span style="color: #cc66cc;">2</span>
<span style="color: #b1b100;">endif</span>
RULE_0_END<span style="color: #339933;">:</span>
&nbsp;
RULE_1_START<span style="color: #339933;">:</span>
<span style="color: #666666; font-style: italic;"># prepare to search for file, rewrite if its not found
</span>set SCRATCH<span style="color: #339933;">:</span>REQUEST_FILENAME <span style="color: #339933;">=</span> <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>SCRATCH<span style="color: #339933;">:</span>DOCROOT<span style="color: #009900;">&#125;</span>
set SCRATCH<span style="color: #339933;">:</span>REQUEST_FILENAME <span style="color: #339933;">.</span> <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>SCRATCH<span style="color: #339933;">:</span>REQUEST_URI<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># check to see if the file requested is an actual file or
</span><span style="color: #666666; font-style: italic;"># a directory with possibly an index.  don’t rewrite if so
</span>look <span style="color: #b1b100;">for</span> <span style="color: #990000;">file</span> at <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>SCRATCH<span style="color: #339933;">:</span>REQUEST_FILENAME<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> not exists then
look <span style="color: #b1b100;">for</span> <span style="color: #990000;">dir</span> at <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>SCRATCH<span style="color: #339933;">:</span>REQUEST_FILENAME<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> not exists then
set URL <span style="color: #339933;">=</span> <span style="color: #339933;">/</span>index<span style="color: #339933;">.</span>php?q<span style="color: #339933;">=%</span><span style="color: #009900;">&#123;</span>SCRATCH<span style="color: #339933;">:</span>REQUEST_URI<span style="color: #009900;">&#125;</span>
goto QSA_RULE_START
<span style="color: #b1b100;">endif</span>
<span style="color: #b1b100;">endif</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># if we made it here then its a file or dir and no rewrite
</span>goto <span style="color: #990000;">END</span>
RULE_1_END<span style="color: #339933;">:</span>
&nbsp;
QSA_RULE_START<span style="color: #339933;">:</span>
<span style="color: #666666; font-style: italic;"># append the query string if there was one originally
</span><span style="color: #666666; font-style: italic;"># the same as [QSA,L] for apache
</span>match SCRATCH<span style="color: #339933;">:</span>ORIG_URL into <span style="color: #339933;">%</span> with \?<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>$
<span style="color: #b1b100;">if</span> matched then
set URL <span style="color: #339933;">=</span> <span style="color: #339933;">%</span><span style="color: #009900;">&#123;</span>URL<span style="color: #009900;">&#125;</span><span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;%</span><span style="color: #009900;">&#123;</span>SCRATCH<span style="color: #339933;">:</span>QUERY_STRING<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">endif</span>
goto <span style="color: #990000;">END</span>
QSA_RULE_END<span style="color: #339933;">:</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/03/01/wordpress-permalinks-zeus-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customise the Terms and Conditions Checkbox and Link in WP e-Commerce</title>
		<link>http://www.benhuson.co.uk/2010/02/09/wpsc-terms-checkbox/</link>
		<comments>http://www.benhuson.co.uk/2010/02/09/wpsc-terms-checkbox/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 21:15:19 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1403</guid>
		<description><![CDATA[By default the terms and conditions link on the checkout page in WP e-Commerce activates an overlay popup containing the terms and conditions text you have specified in the admin.

But what if you want the link to redirect to a page instead of triggering this popup? You just need to make a small change to [...]]]></description>
			<content:encoded><![CDATA[<p>By default the terms and conditions link on the checkout page in WP e-Commerce activates an overlay popup containing the terms and conditions text you have specified in the admin.</p>
<p><img class="alignnone size-full wp-image-1434 border" title="WPSC Terms Popup" src="http://www.benhuson.co.uk/wp-content/uploads/wpsc-terms-popup.gif" alt="" width="400" height="240" /></p>
<p>But what if you want the link to redirect to a page instead of triggering this popup? You just need to make a small change to your checkout template. Here&#8217;s what you need to do&#8230;</p>
<p><span id="more-1403"></span></p>
<h3>In The Admin</h3>
<p>In the admin, instead of specifying terms and conditions text we are going to enter a URL. Make sure your URL is a full path including &#8216;http://&#8217; as this will make it easier to detect wether the content is a URL or plain text.</p>
<p><img class="alignnone size-full wp-image-1425 border" title="WPSC Settings Terms" src="http://www.benhuson.co.uk/wp-content/uploads/wpsc-settings-terms.gif" alt="" width="400" height="230" /></p>
<h3>Changes in your WP e-Commerce Theme</h3>
<p>Your WP e-Commerce theme files usually reside in the &#8216;wp-content/uploads/wpsc/themes/your-theme&#8217; directory. To change the terms and conditions link to link to another page rather that popup you will need to edit the &#8217;shopping_cart_page.php&#8217; file.</p>
<p>In this file look for the terms and condition code. It will be near the bottom and should look a bit like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>297
298
299
300
301
302
303
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'terms_and_conditions'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;tr&gt;
   &lt;td colspan='2'&gt;
      &lt;input type='checkbox' value='yes' name='agree' /&gt; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> TXT_WPSC_TERMS1<span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;a class='thickbox' target='_blank' href='<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;?termsandconds=true&amp;amp;width=360&amp;amp;height=400'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>' class='termsandconds'&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> TXT_WPSC_TERMS2<span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
   &lt;/td&gt;
&lt;/tr&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>What we will do is change this code so if the contents of your terms and condition is a link (beginning http://) it will write a link to that page rather than a popup. The new code with the if statement should look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>297
298
299
300
301
302
303
304
305
306
307
308
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'terms_and_conditions'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;tr class=&quot;terms&quot;&gt;
   &lt;td colspan='2'&gt;
      &lt;input type='checkbox' value='yes' name='agree' /&gt; <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> TXT_WPSC_TERMS1<span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'terms_and_conditions'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'http://'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
         &lt;a target='_blank' href='<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'terms_and_conditions'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>' class='termsandconds'&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> TXT_WPSC_TERMS2<span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
         &lt;a class='thickbox' target='_blank' href='<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'siteurl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;?termsandconds=true&amp;amp;width=360&amp;amp;height=400'&quot;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>' class='termsandconds'&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> TXT_WPSC_TERMS2<span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;
      <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;/td&gt;
&lt;/tr&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>And that&#8217;s all there is to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/02/09/wpsc-terms-checkbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List Pages at Depth 1.1</title>
		<link>http://www.benhuson.co.uk/2010/01/25/list-pages-at-depth-1-1/</link>
		<comments>http://www.benhuson.co.uk/2010/01/25/list-pages-at-depth-1-1/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 22:33:46 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1366</guid>
		<description><![CDATA[Just released an update to the List Pages at Depth plugin for WordPress.
This update fixed a pretty major bug which prevented the list showing the correct branch of subpages when the start depth was greater than 1 (secondary level pages).
Now this is fixed you&#8217;ll be able to display a list of only tertiary level pages [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Just released an update to the </strong><a href="http://www.benhuson.co.uk/wordpress-plugins/list-pages-at-depth/"><strong>List Pages at Depth</strong></a><strong> plugin for WordPress.</strong></p>
<p>This update fixed a pretty major bug which prevented the list showing the correct branch of subpages when the start depth was greater than 1 (secondary level pages).</p>
<p>Now this is fixed you&#8217;ll be able to display a list of only tertiary level pages &#8211; Useful if you have a site with a horizontal navigation with drop down menus for secondary level navigation, and want to show and subpages of the secondary level as a list in your sidebar.</p>
<p>What&#8217;s more the plugin now includes a widget so you can easily add a list of subpages into your sidebar.</p>
<p><span id="more-1366"></span></p>
<h3>Widget Examples</h3>
<p>The following configuration will display a list of secondary and tertiary level pages (depths 1 to 2) for the currently selected primary navigation item. The list of pages will show for all pages that are subpages (or sub-subpages) of that primary page.</p>
<p><a href="http://www.benhuson.co.uk/wp-content/uploads/list-pages-at-depth-sec.jpg"><img class="alignnone size-full wp-image-1376" title="List Pages at Depth - Secondary Nav" src="http://www.benhuson.co.uk/wp-content/uploads/list-pages-at-depth-sec.jpg" alt="" width="285" height="505" /></a></p>
<p>The widget below will only display the tertiary level (depth 2) of navigation for subpages of the currently selected secondary level page.</p>
<p><a href="http://www.benhuson.co.uk/wp-content/uploads/list-pages-at-depth-ter.jpg"><img class="alignnone size-full wp-image-1377" title="List Pages at Depth - Tertiary Nav" src="http://www.benhuson.co.uk/wp-content/uploads/list-pages-at-depth-ter.jpg" alt="" width="285" height="505" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/01/25/list-pages-at-depth-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help Improve Adobe CS4 Products</title>
		<link>http://www.benhuson.co.uk/2010/01/19/help-improve-adobe-cs4-products/</link>
		<comments>http://www.benhuson.co.uk/2010/01/19/help-improve-adobe-cs4-products/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 20:51:56 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Fireworks]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1336</guid>
		<description><![CDATA[Recently I upgraded my Adobe Suite to CS4 and upon launching one of the application this dialog box appears&#8230;

I have been using Adobe products for many years. From my early days in design I was using Photoshop and Illustrator, and also using Macromedia&#8217;s web design products like Flash, Dreamweaver and Fireworks which were then acquired by [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Recently I upgraded my Adobe Suite to CS4 and upon launching one of the application this dialog box appears&#8230;</strong></p>
<p><a href="http://www.benhuson.co.uk/wp-content/uploads/help-improve-adobe-cs4-products.jpg"><img class="alignnone size-medium wp-image-1338" title="Help Improve Adobe CS4 Products" src="http://www.benhuson.co.uk/wp-content/uploads/help-improve-adobe-cs4-products-400x310.jpg" alt="" width="400" height="310" /></a></p>
<p>I have been using <a href="http://www.adobe.com/">Adobe</a> products for many years. From my early days in design I was using <a href="http://www.amazon.co.uk/gp/search?ie=UTF8&amp;keywords=Adobe%20Photoshop%20CS4&amp;tag=benhuson-21&amp;index=software&amp;linkCode=ur2&amp;camp=1634&amp;creative=6738">Photoshop</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=benhuson-21&amp;l=ur2&amp;o=2" border="0" alt="" width="1" height="1" /> and <a href="http://www.amazon.co.uk/gp/search?ie=UTF8&amp;keywords=Adobe%20Illustrator%20CS4&amp;tag=benhuson-21&amp;index=software&amp;linkCode=ur2&amp;camp=1634&amp;creative=6738">Illustrator</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=benhuson-21&amp;l=ur2&amp;o=2" border="0" alt="" width="1" height="1" />, and also using Macromedia&#8217;s web design products like <a href="http://www.amazon.co.uk/gp/search?ie=UTF8&amp;keywords=Adobe%20Flash%20CS4&amp;tag=benhuson-21&amp;index=software&amp;linkCode=ur2&amp;camp=1634&amp;creative=6738">Flash</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=benhuson-21&amp;l=ur2&amp;o=2" border="0" alt="" width="1" height="1" />, <a href="http://www.amazon.co.uk/gp/search?ie=UTF8&amp;keywords=Adobe%20Dreamweaver%20CS4&amp;tag=benhuson-21&amp;index=software&amp;linkCode=ur2&amp;camp=1634&amp;creative=6738">Dreamweaver</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=benhuson-21&amp;l=ur2&amp;o=2" border="0" alt="" width="1" height="1" /> and <a href="http://www.amazon.co.uk/gp/search?ie=UTF8&amp;keywords=Adobe%20Fireworks%20CS4&amp;tag=benhuson-21&amp;index=software&amp;linkCode=ur2&amp;camp=1634&amp;creative=6738">Fireworks</a><img style="border: none !important; margin: 0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=benhuson-21&amp;l=ur2&amp;o=2" border="0" alt="" width="1" height="1" /> which were then acquired by Adobe in 2005.</p>
<p>In recent years I have found the the quality of the Adobe products, particularly their web development applications, Flash, Dreamweaver and Fireworks, has been slowly getting worse.</p>
<p><span id="more-1336"></span></p>
<p>I can&#8217;t put my finger on exactly when things started to go downhill but I have a feeling it was around them time they introduced a JavaScript API into their products. The benefit of the API is that it allows users to create <a href="http://www.adobe.com/cfusion/exchange/">add-ons for Adobe applications</a> that can automate common tasks or create new edit panels etc, enhancing the application&#8217;s functionality and streamlining workflow. A nice idea.</p>
<p>Now, the JavaScript API may not be to blame at all, but how many times do so see a little &#8216;x&#8217; in your web browser indicating that there is a JavaScript error on the page? And how many times has your browser hung or crashed due to a timeout error caused by a JavaScript? I can&#8217;t help thinking that the JavaScript API may be the reason the my Adobe applications seem to be less stable and crash more often than they used to. I might be wrong, this is just how it feels as a long-time user of the products.</p>
<h3>So, back to the dialog box&#8230;</h3>
<p>Does this mean that Adobe have now finally recognised that the stability and quality of their products needs to be addressed?</p>
<p>Is spying on our attempts to use their software (with permission, obviously) an indication how desperate they are to act on their users&#8217; feedback to improve the robustness of their faltering web suite? If this is what it takes to gather enough useful data for them to be able to get things back on track then count me in.</p>
<p>Of course it could be that they only want to study user behaviour so they can improve the UI of their products but I seriously hope that one of Adobe&#8217;s main objects is to use the data to gather more accurate details about crashes and errors so they can focus on making their applications rock solid and stable.</p>
<p>In the meantime, I know there are now many other high quality affordable or open source web development applications available that I could turn to, but I don&#8217;t want to. I like using Dreamweaver. I like using Flash. I like using Fireworks.</p>
<p>I really hope that any data Adobe manages to collect through <a href="http://www.adobe.com/products/creativesuite/special/improvement.html">this program</a> helps them resolve the issues with their products. If they are able to figure out why Fireworks crashes on me incessantly throughout the day I will be much happier (and much more productive).</p>
<h3>Further Reading</h3>
<ul>
<li><a href="http://www.adobe.com/products/creativesuite/special/improvement.html">Adobe Product Improvement Program</a></li>
<li><a href="http://nathanpitman.com/567/an-open-letter-to-software-developers-re-adobe-fireworks/permalink">An open letter to software developers RE Adobe Fireworks</a></li>
<li><a href="http://nathanpitman.com/567/an-open-letter-to-software-developers-re-adobe-fireworks/permalink"></a><a href="http://help.adobe.com/en_US/Fireworks/10.0_Extending/index.html">Extending Fireworks</a> (using the JavaScript API)</li>
<li><a href="http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/index.html">Extending Dreamweaver</a> (using the JavaScript API)</li>
<li><a href="http://help.adobe.com/en_US/Flash/10.0_ExtendingFlash/index.html">Extending Flash</a> (using the JavaScript API)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/01/19/help-improve-adobe-cs4-products/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript moveTo(0, 0) in FireFox OS X not working</title>
		<link>http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/</link>
		<comments>http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 20:37:30 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1313</guid>
		<description><![CDATA[Here&#8217;s a weird JavaScript FireFox bug&#8230;
In OS X, for some reason the following javascript was not positioning the FireFox browser window to the top left of the screen.

window.moveTo&#40;0, 0&#41;;

Solution
Not sure what causes the problem but it seems to work find if you position the window 1 pixel lower.

window.moveTo&#40;0, 1&#41;;

]]></description>
			<content:encoded><![CDATA[<p><strong>Here&#8217;s a weird JavaScript FireFox bug&#8230;</strong></p>
<p>In OS X, for some reason the following javascript was not positioning the FireFox browser window to the top left of the screen.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">moveTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Solution</h3>
<p>Not sure what causes the problem but it seems to work find if you position the window 1 pixel lower.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">moveTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2010/01/15/javascript-moveto0-0-in-firefox-os-x-not-working/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to ensure WordPress template tags work properly when using multiple WordPress Loops</title>
		<link>http://www.benhuson.co.uk/2009/12/08/template-tags-when-using-multiple-wordpress-loops/</link>
		<comments>http://www.benhuson.co.uk/2009/12/08/template-tags-when-using-multiple-wordpress-loops/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 22:50:08 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[have_posts()]]></category>
		<category><![CDATA[the_post()]]></category>
		<category><![CDATA[WordPress Loop]]></category>
		<category><![CDATA[WP_Query]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1276</guid>
		<description><![CDATA[There are many occasions when you may want to create multiple WordPress Loops &#8211; instructions on how to do this can be found on the WordPress Codex.
If you need to keep the original query, it is suggested you create you second loop by creating a new query object.

&#60;?php $my_query = new WP_Query&#40;'category_name=special_cat&#38;posts_per_page=10'&#41;; ?&#62;
&#60;?php while &#40;$my_query-&#62;have_posts&#40;&#41;&#41; : [...]]]></description>
			<content:encoded><![CDATA[<p><strong>There are many occasions when you may want to create multiple WordPress Loops &#8211; instructions on how to do this can be found on the </strong><a href="http://codex.wordpress.org/The_Loop#Multiple_Loops_Example_1"><strong>WordPress Codex</strong></a><strong>.</strong></p>
<p>If you need to keep the original query, it is suggested you create you second loop by creating a new query object.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$my_query</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WP_Query<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category_name=special_cat&amp;posts_per_page=10'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$my_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">have_posts</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$my_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">the_post</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   &lt;!-- Do special_cat stuff... --&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>This works fine, but if you use more template tags after this loop, they display the content from the last post in the $my_query loop. So, if you want to reference the original loop how should you go about it?</p>
<p><span id="more-1276"></span></p>
<h2>What&#8217;s going on?</h2>
<p>In the above example the $my_query variable is an instance of the WP_Query object containing the results of the custom query.</p>
<p>The &#8216;while&#8217; loop iterates through all the results of our query. Each time $my_query-&gt;have_posts() is called it checks wether the next post in the loop exists and if it does the loop continues to run.</p>
<p>For each post in the loop the $my_query-&gt;the_post() function is called. This populates the global $post variable with the post data which can then be accessed directly through the $post variable or using WordPress template tags like the_title() and the_content();</p>
<p>After the $my_query loop has finished <strong>the global $post variable remains populated</strong> with the last post from the $my_query loop so any template tags used will use this post&#8217;s data, not the data from the post before we started our custom loop.</p>
<h2>So what should we do?</h2>
<p>Because we created a new query $my_query, the previous query still exists in the main $wp_query variable, so all we have to do is repopulate the $post variable using $wp_query.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000088;">$post</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wp_query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">post</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h2>Could this be made more easy?</h2>
<p>Not really, but maybe a WordPress template tag to do this should be added to WordPress core &#8211; maybe somthing like refresh_post(). This can then be documented in the Codex to provide an &#8216;official&#8217; way of handling multiple loops.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/12/08/template-tags-when-using-multiple-wordpress-loops/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP e-Commerce XML Sitemap WordPress Plugin</title>
		<link>http://www.benhuson.co.uk/2009/11/28/wp-e-commerce-xml-sitemap-wordpress-plugin/</link>
		<comments>http://www.benhuson.co.uk/2009/11/28/wp-e-commerce-xml-sitemap-wordpress-plugin/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 22:40:30 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[WP e-Commerce]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1267</guid>
		<description><![CDATA[I was just about to update an old plugin I created to create an XML site map for products in WP e-Commerce&#8230;
&#8230;then I stumbled across the WP e-Commerce XML Sitemap plugin by Lee Willis.
The plugin worked well with WP e-Commerce 3.7.5 (the latest version) apart from a few minor issues. I got in touch with [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I was just about to update an old plugin I created to create an XML site map for products in <a href="http://www.instinct.co.nz/e-commerce/">WP e-Commerce&#8230;</a></strong></p>
<p>&#8230;then I stumbled across the <a href="http://wordpress.org/extend/plugins/wp-e-commerce-xml-sitemap/">WP e-Commerce XML Sitemap</a> plugin by <a href="http://www.leewillis.co.uk">Lee Willis</a>.</p>
<p>The plugin worked well with WP e-Commerce 3.7.5 (the latest version) apart from a few minor issues. I got in touch with Lee and suggested a few tweaks/fixes &#8211; he has just released an updated version:</p>
<ul>
<li>Unpublished products are now not added to sitemap.</li>
<li>Is now compatible with WordPress installations with custom table prefix.</li>
</ul>
<p>You can <a href="http://wordpress.org/extend/plugins/wp-e-commerce-xml-sitemap">download the latest version here&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/11/28/wp-e-commerce-xml-sitemap-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New style hooks for WordPress Theme Developers in WP e-Commerce 3.7.5</title>
		<link>http://www.benhuson.co.uk/2009/11/12/new-style-hooks-for-wordpress-theme-developers-in-wp-e-commerce-3-7-5/</link>
		<comments>http://www.benhuson.co.uk/2009/11/12/new-style-hooks-for-wordpress-theme-developers-in-wp-e-commerce-3-7-5/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 17:16:17 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[E-Commerce]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1170</guid>
		<description><![CDATA[The latest version of Instinct&#8217;s WordPress e-commerce plugin uses the WordPress body_class filter to add classes to the HTML body tag.
WP e-Commerce 3.7.5 adds the following styles to the body tag:

wpsc
wpsc-home
wpsc-single-product
wpsc-single-product-id
wpsc-category
wpsc-category-id
wpsc-group-id
wpsc-shopping-cart
wpsc-transaction-details
wpsc-user-account

These extra classes will give you more flexibility when designing themes for WP e-Commerce.

Where are these classes included?
wpsc
Included in every WP e-Commerce page.
wpsc-home
Included on the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The latest version of Instinct&#8217;s WordPress e-commerce plugin uses the WordPress body_class filter to add classes to the HTML body tag.</strong></p>
<p><a href="http://www.instinct.co.nz/blog/2009/11/wp-e-commerce-plugin-3-7-5-ready-for-prime-time/trackback/">WP e-Commerce 3.7.5</a> adds the following styles to the body tag:</p>
<ul>
<li>wpsc</li>
<li>wpsc-home</li>
<li>wpsc-single-product</li>
<li>wpsc-single-product-id</li>
<li>wpsc-category</li>
<li>wpsc-category-id</li>
<li>wpsc-group-id</li>
<li>wpsc-shopping-cart</li>
<li>wpsc-transaction-details</li>
<li>wpsc-user-account</li>
</ul>
<p>These extra classes will give you more flexibility when designing themes for WP e-Commerce.</p>
<p><span id="more-1170"></span></p>
<h3>Where are these classes included?</h3>
<p><strong>wpsc</strong><br />
Included in every WP e-Commerce page.</p>
<p><strong>wpsc-home</strong><br />
Included on the main WP e-Commerce shop page.</p>
<p><strong>wpsc-single-product &amp; wpsc-single-product-id</strong><br />
Included on single product pages. The wpsc-single-product-id class allows you to set css rules for a single product based on the product id.</p>
<p><strong>wpsc-category &amp; wpsc-category-id</strong><br />
Included on category and individual product pages. The wpsc-category-id class allows you to set css rules for different categories. As these classes are also applied to single product pages, if a product appears in more than one category you could style a product page differently depending on which category you click through from.</p>
<p><strong>wpsc-group-id</strong><br />
Included on category and single product pages. The group id is set based on the group in which the current category resides.</p>
<p><strong>wpsc-shopping-cart</strong><br />
Including on the shop cart checkout page.</p>
<p><strong>wpsc-transaction-details</strong><br />
Including on the transaction details page displayed after a successful purchase.</p>
<p><strong>wpsc-user-account</strong><br />
Including on the WP e-Commerce user account pages.</p>
<h3>Ideas how to use these classes in your WP e-Commerce theme&#8230;</h3>
<ol>
<li>Style a special product differently using wpsc-single-product-id.</li>
<li>Style products in a sale category to display differently using wpsc-category-id.</li>
<li>Create a group for brands with brands as sub-categories and differentiate this view from your standard product categories using wpsc-group-id.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/11/12/new-style-hooks-for-wordpress-theme-developers-in-wp-e-commerce-3-7-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS X SOAP Client &#8211; Fixed for Leopard</title>
		<link>http://www.benhuson.co.uk/2009/10/28/mac-os-x-soap-client-fixed-for-leopard/</link>
		<comments>http://www.benhuson.co.uk/2009/10/28/mac-os-x-soap-client-fixed-for-leopard/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 23:28:36 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[XML & RSS]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[WSDL]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1157</guid>
		<description><![CDATA[Upgraded to OS X Snow Leopard, Yeah&#8230;
Mac OS X SOAP Client not working, boo&#8230;

Mac OS X SOAP Client is a great little app which can be used to access and query XML Web Services. I was very disappointed that after upgrading to Snow Leopard the XML result preview tab kept crashing the application.
Fortunately the application [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Upgraded to OS X Snow Leopard, Yeah&#8230;<br />
Mac OS X SOAP Client not working, boo&#8230;</strong><br />
<img class="size-full wp-image-1159 alignright" title="Mac SOAP Client" src="http://www.benhuson.co.uk/wp-content/uploads/mac-soap-client-logo.gif" alt="Mac SOAP Client" width="150" height="150" /><br />
Mac OS X <a href="http://ditchnet.org/soapclient">SOAP Client</a> is a great little app which can be used to access and query XML Web Services. I was very disappointed that after upgrading to Snow Leopard the XML result preview tab kept crashing the application.</p>
<p>Fortunately the application is now an open source project available on <a href="http://code.google.com/p/mac-soapclient/">Google Code</a> and it was only a short matter of time before <a href="http://code.google.com/p/mac-soapclient/issues/detail?id=15">someone came up with a fix</a> &#8211; thank you Howard.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/10/28/mac-os-x-soap-client-fixed-for-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why is my Safari icon pixelated?</title>
		<link>http://www.benhuson.co.uk/2009/10/20/why-is-my-safari-icon-pixelated/</link>
		<comments>http://www.benhuson.co.uk/2009/10/20/why-is-my-safari-icon-pixelated/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 20:24:16 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Icons]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1173</guid>
		<description><![CDATA[
No idea why or how this happened.
Seemed to happen not long after upgrading to Snow Leopard. Had a search around and found other people had been experiencing blurry/pixelated icons too. Also, this thread on the Apple Support web site.
Anyway, I just dragged the Safari application into the dock again and that fixed it for me [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-1176 border" title="Why is my Safari icon pixelated?" src="http://www.benhuson.co.uk/wp-content/uploads/pixelate-safari-icon.jpg" alt="Why is my Safari icon pixelated?" width="400" height="190" /></p>
<p><strong>No idea why or how this happened.</strong></p>
<p>Seemed to happen not long after upgrading to <a href="http://www.amazon.co.uk/gp/product/B001AMHWP8?ie=UTF8&amp;tag=benhuson-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B001AMHWP8">Snow Leopard</a>. Had a search around and found other people had been experiencing <a href="http://forums.cocoaforge.com/viewtopic.php?f=6&amp;t=16411">blurry/pixelated icons</a> too. Also, this thread on the <a href="http://discussions.apple.com/message.jspa?messageID=10177535">Apple Support</a> web site.</p>
<p>Anyway, I just dragged the Safari application into the dock again and that fixed it for me &#8211; weird&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/10/20/why-is-my-safari-icon-pixelated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nikki Loy &#8211; Now or Never Debut EP</title>
		<link>http://www.benhuson.co.uk/2009/08/20/nikki-loy-now-or-never-debut-ep/</link>
		<comments>http://www.benhuson.co.uk/2009/08/20/nikki-loy-now-or-never-debut-ep/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 20:02:52 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Listening to...]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Nikki Loy]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=1061</guid>
		<description><![CDATA[
Nikki&#8217;s Debut EP &#8220;Now or Never&#8221; is available to download&#8230;
Nikki gigs regularly in Oxford, London and the surrounding areas&#8230; She is currently working on her second EP which will be released later in 2009 (fingers crossed). The first one, &#8216;Now or Never&#8217; is available NOW on iTunes and Amazon:

Buy from iTunes
Buy from Amazon.co.uk

For updates and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.co.uk/gp/product/B002I4XVKM?ie=UTF8&amp;tag=benhuson-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B002I4XVKM"><img class="alignnone size-full wp-image-1062 border" title="Nikki Loy - Now or Never EP" src="http://www.benhuson.co.uk/wp-content/uploads/nikki-loy-now-or-never.jpg" alt="Nikki Loy - Now or Never EP" width="400" height="400" /></a></p>
<p><strong>Nikki&#8217;s Debut EP &#8220;Now or Never&#8221; is available to download&#8230;</strong></p>
<p>Nikki gigs regularly in Oxford, London and the surrounding areas&#8230; She is currently working on her second EP which will be released later in 2009 (fingers crossed). The first one, &#8216;Now or Never&#8217; is available NOW on iTunes and Amazon:</p>
<ul>
<li><a href="http://clkuk.tradedoubler.com/click?p=23708&amp;a=1052974&amp;url=http%3A%2F%2Fitunes.apple.com%2FWebObjects%2FMZStore.woa%2Fwa%2FviewAlbum%3Fi%3D324151332%26id%3D324151226%26s%3D143444%26uo%3D6%26partnerId%3D2003">Buy from iTunes</a></li>
<li><a href="http://www.amazon.co.uk/gp/product/B002I4XVKM?ie=UTF8&amp;tag=benhuson-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=B002I4XVKM">Buy from Amazon.co.uk</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.co.uk/e/ir?t=benhuson-21&amp;l=as2&amp;o=2&amp;a=B002I4XVKM" border="0" alt="" width="1" height="1" /></li>
</ul>
<p>For updates and forthcoming gigs, you can follow Nikki at <a href="http://www.nikkiloy.com">nikkiloy.com</a>, <a href="http://www.facebook.com/group.php?gid=71293498299">Facebook</a> and <a href="http://twitter.com/nikkiloymusic">Twitter</a>.</p>
<p><small>PS: She&#8217;s also available for booking for your event and I can assure you she&#8217;s great! (I&#8217;m she she won&#8217;t mind me saying)</small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/08/20/nikki-loy-now-or-never-debut-ep/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Categories and Tags in WP e-Commerce</title>
		<link>http://www.benhuson.co.uk/2009/07/23/categories-and-tags-in-wp-e-commerce/</link>
		<comments>http://www.benhuson.co.uk/2009/07/23/categories-and-tags-in-wp-e-commerce/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 22:26:33 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Categories]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Poll]]></category>
		<category><![CDATA[Tags]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=730</guid>
		<description><![CDATA[I&#8217;ve been using the WP e-Commerce plugin for WordPress a lot recently and delving behind the scenes to make it do want I want it to. In the process I have submitted a couple of style changes to the core to style it to be more like WordPress out-of-the-box.
One thing I think should be changed [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using the <a href="http://www.instinct.co.nz/wp-e-commerce-plugin-3-7-rc2/trackback/">WP e-Commerce plugin</a> for WordPress a lot recently and delving behind the scenes to make it do want I want it to. In the process I have submitted a couple of style changes to the core to style it to be more like WordPress out-of-the-box.</p>
<p>One thing I think should be changed to bring the product edit screen in-line with the WordPress post/page editing layouts is the <a href="http://www.instinct.co.nz/wp-e-commerce-37-questions/comment-page-1/#comment-3444" target="_blank">separation of the Categories and Tags boxes</a>.</p>
<p><span id="more-730"></span></p>
<h3>How things are&#8230;</h3>
<p>The WordPress post/page edit screen looks like this:</p>
<p><img class="border" title="WordPress Category and Tags Boxes" src="http://www.benhuson.co.uk/wp-content/uploads/cattag-wordpress.jpg" alt="WordPress Category and Tags Boxes" width="319" height="431" /></p>
<p>Currently, editing Categories and Tags in WP e-Commerce looks like this:</p>
<p><img class="border" title="WP e-Commerce Category and Tags Boxes" src="http://www.benhuson.co.uk/wp-content/uploads/cattag-wpecommerce.jpg" alt="WP e-Commerce Category and Tags Boxes" width="396" height="226" /></p>
<h3>How I think things should be&#8230;</h3>
<p>A few times I have run into problems with the current WP e-Commerce categories and tag box in that if I have long category names, they wrap very badly on smaller screens where there isn&#8217;t much space &#8211; the tags filed squashes everything over to the left.</p>
<p>I propose that the categories and tags box be separated into a similar layout to the way WordPress does things. This would add UI consistency throughout the admin and the boxes would be expandable allowing you to easily minimise the tags box if you only use it infrequently.</p>
<p>So you would end up with something like this:</p>
<p><img class="border" title="Suggested Category and Tags Boxes" src="http://www.benhuson.co.uk/wp-content/uploads/cattag-suggested.jpg" alt="Suggested Category and Tags Boxes" width="319" height="389" /></p>
<p>It is essentially a mirror version of the panels in the main WordPress admin but with some of the extra functionality removed.</p>
<p>In WP e-Commerce it is possible to have multiple types of category grouping such as Categories and Brands. In this scenario I would suggest that the scrolling categories area in the Categories box (illustrated above) is duplicated so that there are two scrolling areas &#8211; one for categories and one for brands.</p>
<h3>So, what do you think?</h3>
<p>That&#8217;s just my opinion so please vote and leave your comments below and who knows, if enough of you like my idea then it might find it&#8217;s way into a future release of WP e-Commerce.</p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/07/23/categories-and-tags-in-wp-e-commerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Trash</title>
		<link>http://www.benhuson.co.uk/2009/07/21/wordpress-trash/</link>
		<comments>http://www.benhuson.co.uk/2009/07/21/wordpress-trash/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 20:09:58 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Comments]]></category>
		<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=924</guid>
		<description><![CDATA[A great feature being worked on for a future version of WordPress (hopefully 2.9) was added to the the development version today.
The &#8216;Trash&#8217; functionality will work in the same way as your Mac or the Recycle bin on Windows &#8211; when you delete an item, it will be moved to the Trash from where it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A great feature being worked on for a future version of WordPress (hopefully 2.9) was </strong><a href="http://core.trac.wordpress.org/changeset/11731"><strong>added to the the development version</strong></a><strong> today.</strong></p>
<p>The &#8216;Trash&#8217; functionality will work in the same way as your Mac or the Recycle bin on Windows &#8211; when you delete an item, it will be moved to the Trash from where it can be recovered or permanently deleted.</p>
<p>The functionality is currently being tested out with comments and hopefully if it works well will be roled out to other WordPress assets like post, pages and links.</p>
<p><em>So no more impulse deleting of something, then wishing you hadn&#8217;t&#8230; Phew!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/07/21/wordpress-trash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating Google XML Sitemaps with Your WordPress Plugin</title>
		<link>http://www.benhuson.co.uk/2009/07/12/integrate-google-xml-sitemaps/</link>
		<comments>http://www.benhuson.co.uk/2009/07/12/integrate-google-xml-sitemaps/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 19:22:50 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XML & RSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[WP e-Commerce]]></category>
		<category><![CDATA[XML Sitemaps]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=822</guid>
		<description><![CDATA[Note: Please read my more recent post about Integrating Google XML Sitemaps with the latest version of WP e-Commerce using a plugin by Lee Willis.
One plugin I recommend that everyone should add to their WordPress installation is the Google XML Sitemaps plugin. 
This plugin will automatically generate an XML sitemap of your posts and pages [...]]]></description>
			<content:encoded><![CDATA[<p><div class="note"><div class="noteclassic"><strong>Note:</strong> Please read my more recent post about <a href="http://www.benhuson.co.uk/2009/11/28/wp-e-commerce-xml-sitemap-wordpress-plugin/">Integrating Google XML Sitemaps</a> with the latest version of WP e-Commerce using a <a href="http://www.leewillis.co.uk/wordpress-plugins/">plugin by Lee Willis</a>.</div></div></p>
<p><strong>One plugin I recommend that everyone should add to their WordPress installation is the </strong><a href="http://wordpress.org/extend/plugins/google-sitemap-generator/"><strong>Google XML Sitemaps plugin</strong></a><strong>. </strong></p>
<p>This plugin will automatically generate an <a href="http://www.sitemaps.org/">XML sitemap</a> of your posts and pages and ping supporting search engines to notify them that the sitemap has been updated.</p>
<p>But the best thing about this plugin for other plugin developers is it provides hooks so you can &#8216;borrow&#8217; it&#8217;s functionality so that your plugin can add additional pages into the XML sitemap that is generated.</p>
<p>So if you&#8217;re a WordPress plugin developer, read on&#8230;</p>
<p><span id="more-822"></span></p>
<h3>How to add pages to the XML sitemap</h3>
<p>To illustrate how to implement the XML Sitemaps hook, I will base the example on the <a href="http://www.instinct.co.nz/3-7-1-feature-prioritization/trackback/">WP e-Commerce plugin</a> (please note, I originally implemeted this with version 3.6.12 of the WP e-Commerce plugin so it may not work with more recent versions). We will create a function that will add all of this plugin&#8217;s product pages into the XML sitemap produced by Google XML Sitemaps.</p>
<p>The Google XML Sitemaps plugin provides the hook &#8220;sm_buildmap&#8221; which gets triggered whenever the plugin re-builds the sitemap file. We are going to create a function &#8220;wp_ecommerce_sm&#8221; which will get called by this hook.</p>
<p>So, here&#8217;s the function code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> wp_ecommerce_sm<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'GoogleSitemapGenerator'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$generatorObject</span> <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span>GoogleSitemapGenerator<span style="color: #339933;">::</span><span style="color: #004000;">GetInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT DISTINCT * FROM `&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prefix</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;product_list` WHERE `active` IN('1') ORDER BY `id` DESC&quot;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$product_list</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span> ARRAY_A<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$product_list</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$product</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
         <span style="color: #000088;">$purchase_link</span> <span style="color: #339933;">=</span> wpsc_product_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$product</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #000088;">$purchase_link</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'&amp;amp;'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'&amp;'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$purchase_link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
         <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$generatorObject</span> <span style="color: #339933;">!=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$generatorObject</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">AddUrl</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$purchase_link</span><span style="color: #339933;">,</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;daily&quot;</span><span style="color: #339933;">,</span> <span style="color:#800080;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sm_buildmap&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;wp_ecommerce_sm&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>The main points to note in this function are&#8230;</h3>
<p>Check that the Google XML Sitemaps exists (is installed):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'GoogleSitemapGenerator'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></td></tr></table></div>

<p>Get an instance of the Google XML Sitemap plugin:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$generatorObject</span> <span style="color: #339933;">=</span> <span style="color: #339933;">&amp;</span>GoogleSitemapGenerator<span style="color: #339933;">::</span><span style="color: #004000;">GetInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Loop through all our additional pages that we want to add to the sitemap, in this case the WP e-Commerce product pages:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$sql</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;SELECT DISTINCT * FROM `&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prefix</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;product_list` WHERE `active` IN('1') ORDER BY `id` DESC&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$product_list</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_results</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #339933;">,</span> ARRAY_A<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$product_list</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$product</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #666666; font-style: italic;">// Add pages to sitemap here</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>And within our loop, add our pages like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$generatorObject</span> <span style="color: #339933;">!=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$generatorObject</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">AddUrl</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$purchase_link</span><span style="color: #339933;">,</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;daily&quot;</span><span style="color: #339933;">,</span> <span style="color:#800080;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>And lastly we need to add the hook to call this function whenever the XML sitemap is rebuilt:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;sm_buildmap&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;wp_ecommerce_sm&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>Is that all there is to it?</h3>
<p>Well, not really. Your still have to trigger the sitemap to re-build to include your new pages. You can do this manually by going to your XML Sitemaps setting page and clicking the link to rebuild to force the sitemap to re-build. Ideally however you would try to get your plugin to do this automatically whenever you add/edit/delete one of your pages. I couldn&#8217;t find an obvious hook to easily do this so that is something I would like to see adding in a future version of the <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/trackback/">Google XML Sitemaps</a> plugin.</p>
<h3>Download</h3>
<p>Download the above code packaged as a WordPress plugin using the link below:</p>
<a href="http://www.benhuson.co.uk/downloads/wp-e-commerce-smphp.zip" title="WP e-Commerce XML Sitemap Plugin (16)" >Click here to download...</a>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/07/12/integrate-google-xml-sitemaps/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Is PageRank Sculpting using rel=&#8221;nofollow&#8221; an SEO Myth?</title>
		<link>http://www.benhuson.co.uk/2009/06/30/pagerank-sculpting-nofollow/</link>
		<comments>http://www.benhuson.co.uk/2009/06/30/pagerank-sculpting-nofollow/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 22:03:39 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Matt Cutts]]></category>
		<category><![CDATA[nofollow]]></category>
		<category><![CDATA[PageRank]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=841</guid>
		<description><![CDATA[I recently stumbled across this post by Matt Cutts of Google which gives an in-depth view of how Google PageRank is affected by rel=&#8221;nofollow&#8221; links.
I have seen a lot of advice from SEO consultants recommending the use of &#8220;nofollow&#8221; on links to prevent Google leaking your PageRank out to other web sites and therefore concentrating [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I recently stumbled across </strong><a href="http://www.mattcutts.com/blog/pagerank-sculpting/"><strong>this post by Matt Cutts</strong></a><strong> of Google which gives an in-depth view of how Google <a href="http://en.wikipedia.org/wiki/PageRank">PageRank</a> is affected by rel=&#8221;nofollow&#8221; links.</strong></p>
<p>I have seen a lot of advice from SEO consultants recommending the use of &#8220;nofollow&#8221; on links to prevent Google leaking your PageRank out to other web sites and therefore concentrating the passing of PageRank to other pages on your site.</p>
<p>For example, if your page had 10 PageRank points and 10 links to other pages, 5 of which were set to &#8220;nofollow&#8221;, the other 5 pages would each carry a PageRank of 2 points (ie share the full 10 points between the 5 links).</p>
<p>It would seem from what Matt says that this isn&#8217;t exactly how Google works. Sculpting the links on your page to concentrate link traffic to other pages does not equate to a concentrated amount of PageRank being passed to those pages.</p>
<p>In the example above, adding &#8220;nofollow&#8221; does prevent PageRank being passed through those links but the other 5 links will still only receive 1 PageRank point per link.</p>
<p>In general, Matt suggests whenever you’re linking around within your own site don’t use &#8220;nofollow&#8221;. Only use &#8220;nofollow&#8221; on links when you do not want a page to be indexed by Google, or for external links of which you may not have been able to verify the content (for example, a link added by a commenter on your blog).</p>
<p>If that makes no sense, <a href="http://www.mattcutts.com/blog/pagerank-sculpting/">Matt explains it much more clearly&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/06/30/pagerank-sculpting-nofollow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.8 Widget API</title>
		<link>http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/</link>
		<comments>http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 09:39:48 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Widgets]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=801</guid>
		<description><![CDATA[I love the new widgets API in WordPress 2.8
I followed the excellent tutorial at WPengineer.com which gives a great overview about how to create a widget using the new API. Initially, the widget I created by following the guide seemed to &#8216;crash&#8217; WordPress when I installed it. After a little investigation I tracked this down [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I love the new widgets API in <a href="http://wordpress.org/development/2009/06/wordpress-28/trackback/">WordPress 2.8</a></strong></p>
<p>I followed the excellent tutorial at <a href="http://wpengineer.com/wordpress-built-a-widget/trackback/">WPengineer.com</a> which gives a great overview about how to create a widget using the new API. Initially, the widget I created by following the guide seemed to &#8216;crash&#8217; WordPress when I installed it. After a little investigation I tracked this down to the following&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> widget_myuniquewidget_register<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   register_sidebar_widget<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My Unique Widget'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'widget_myuniquewidget'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;</span>strong<span style="color: #339933;">&gt;</span>add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'init'</span><span style="color: #339933;">,</span> widget_myuniquewidget_register<span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>strong<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>You <strong>must</strong> initialise the register_sidebar_widget function by hooking into the &#8216;init&#8217; action. Failure to do so means the function is called too early which will cause problems. For more information read <a href="http://codex.wordpress.org/WordPress_Widgets_Api">WordPress Widgets API</a> on the WordPress Codex.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/06/14/wordpress-28-widget-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BBC Travel Alerts on Twitter</title>
		<link>http://www.benhuson.co.uk/2009/06/11/bbc-travel-alerts-on-twitter/</link>
		<comments>http://www.benhuson.co.uk/2009/06/11/bbc-travel-alerts-on-twitter/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 20:37:41 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[London]]></category>
		<category><![CDATA[Stephen Fry]]></category>
		<category><![CDATA[TFL]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Tube]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=766</guid>
		<description><![CDATA[
So, this is how Twitter could be useful!
I have to say, I haven&#8217;t really got into Twitter yet. My one and only &#8216;Tweet&#8217; is now over 1 month old which shows my embarrassing failure to get to grips with what Twitter is all about. Yes, I&#8217;m one of the 552,828 followers of Stephen Fry (at [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.benhuson.co.uk/wp-content/uploads/bbc-travel-twitter.jpg"><img class="size-full wp-image-768 border alignright" style="margin-left: 20px; margin-bottom: 20px;" title="BBCTravelAlerts" src="http://www.benhuson.co.uk/wp-content/uploads/bbc-travel-twitter.jpg" alt="BBCTravelAlerts" width="73" height="73" /></a></p>
<p><strong>So, this is how Twitter could be useful!</strong></p>
<p>I have to say, I haven&#8217;t really got into Twitter yet. My <a href="http://twitter.com/benhuson">one and only &#8216;Tweet&#8217;</a> is now over 1 month old which shows my embarrassing failure to get to grips with what Twitter is all about. Yes, I&#8217;m one of the 552,828 followers of <a href="https://twitter.com/stephenfry">Stephen Fry</a> (at the time of writing), but up until now I&#8217;ve failed so see the usefulness of Twitter in a real-world environment &#8211; not just to know when Stephen in going to be &#8220;Back in time for tea&#8221;.</p>
<p>So, hit London with <a href="http://news.bbc.co.uk/1/hi/england/london/8094105.stm">48 hours of tube strikes</a> and suddenly it all becomes clear. Follow <a href="http://twitter.com/BBCTravelalert">BBCTravelalert</a> on Twitter and get instant up-to-date feedback on the latest travel situation from London&#8217;s commuters &#8211; much more useful that <a href="http://www.tfl.gov.uk/tfl/livetravelnews/realtime/tube/default.html">the TFL service updates</a> which are rarely accurate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/06/11/bbc-travel-alerts-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stylish Categories for WP e-Commerce</title>
		<link>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/</link>
		<comments>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:51:45 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Categories]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[WP e-Commerce]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=724</guid>
		<description><![CDATA[I&#8217;ve made my first contribution to the WP e-Commerce plugin &#8211; my first contribution to an open source project&#8230;
It&#8217;s a great e-commerce plugin for WordPress but there were a few visual things niggling me that I thought should be sorted out &#8211; mainly the way that the widget for showing categories was not styled the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I&#8217;ve made my first contribution to the <a href="http://www.instinct.co.nz/e-commerce/">WP e-Commerce</a> plugin &#8211; my first contribution to an open source project&#8230;</strong></p>
<p>It&#8217;s a great e-commerce plugin for WordPress but there were a few visual things niggling me that I thought should be sorted out &#8211; mainly the way that the widget for showing categories was not styled the same way as the WordPress default widgets.</p>
<p>Fixing the issue was just a case of making a couple of tweaks to the HTML; changing some square brackets to normal brackets and removing some bold styling.</p>
<p>Nothing revolutionary there, but it should now look a whole lot better with your default WordPress theme without making any modifications&#8230;</p>
<p>The current version in development <a href="http://www.instinct.co.nz/wp-e-commerce-37-questions/trackback/">WP e-Commerce 3.7</a> is looking great, with an overhaul of the user interface to bring it into line with WordPress 2.7, a complete reorganisation of the code making it easier for us developers, and a new template engine which works along the same lines at the WordPress Loop so that theme authors can now get in on the act without having to delve too far into the plugin&#8217;s code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/04/22/stylish-categories-for-wp-e-commerce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting lost in WordPress&#8230;</title>
		<link>http://www.benhuson.co.uk/2009/04/18/getting-lost-in-wordpress/</link>
		<comments>http://www.benhuson.co.uk/2009/04/18/getting-lost-in-wordpress/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 22:58:32 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CMS]]></category>

		<guid isPermaLink="false">http://www.benhuson.co.uk/?p=693</guid>
		<description><![CDATA[So I&#8217;ve not posted anything for over 6 months&#8230;
&#8230;why on earth not?
Well, mainly because I have been really busy, but also because I&#8217;ve been spending much of my time getting lost in WordPress.
By getting lost I don&#8217;t mean disorientated and confused &#8211; in fact WordPress is a great little blogging/CMS system for the non-technical user [...]]]></description>
			<content:encoded><![CDATA[<p><strong>So I&#8217;ve not posted anything for over 6 months&#8230;<br />
&#8230;why on earth not?</strong></p>
<p>Well, mainly because I have been really busy, but also because I&#8217;ve been spending much of my time getting lost in WordPress.</p>
<p>By getting lost I don&#8217;t mean disorientated and confused &#8211; in fact <a href="http://wordpress.org/">WordPress</a> is a great little blogging/CMS system for the non-technical user with it&#8217;s intuitive user interface and now in version 2.7 the ability to cusomise the admin, hiding panels and options that you don&#8217;t use on a regular basis.</p>
<p>I&#8217;ve been absorbing myself in the code, examining plugins and themes, and getting to grips with hooks and filters. Under the bonnet, WordPress provides an extensive interface into which developers can create complex plugins and created rich, visual, interactive themes. And one thing is clear&#8230;</p>
<p><strong>&#8230;a WordPress site does not necessarily have to look or behave like a blog.</strong></p>
<p>Check out some of these themes and sites &#8211; they all run WordPress, honest (or at least they did the last time I looked):</p>
<ul>
<li><a href="http://reformrevolution.com/">Reform &amp; Revolution</a></li>
<li><a href="http://www.seekanddestroyclothing.com/">Seek &amp; Destroy Clothing</a></li>
<li><a href="http://graphpaperpress.com/demo/modularity/?wptheme=Modularity">Modularity Theme</a></li>
<li><a href="http://www.press75.com/demos/ondemand/">On Demand Theme</a></li>
<li><a href="http://testbp.org/">BuddyPress</a></li>
<li><a href="http://new.typographica.org/">Typographica</a></li>
<li><a href="http://johnsaddington.com/">John Saddington</a></li>
<li><a href="http://demo.wordspop.com/fotofolio/">Fotofolio Theme</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.benhuson.co.uk/2009/04/18/getting-lost-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 3.632 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-11 15:14:41 -->
