<?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>My Quick Fix &#187; Computers</title>
	<atom:link href="http://myquickfix.co.uk/category/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://myquickfix.co.uk</link>
	<description>Quick fixes for little problems...</description>
	<lastBuildDate>Sat, 04 Feb 2012 16:11:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Remove Links menu item in WordPress</title>
		<link>http://myquickfix.co.uk/2012/01/remove-links-menu-item-in-wordpress/</link>
		<comments>http://myquickfix.co.uk/2012/01/remove-links-menu-item-in-wordpress/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 11:45:43 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=220</guid>
		<description><![CDATA[Problem: I&#8217;m customising a WP install for a client, adding some Custom Post Types and wotnot, and they aren&#8217;t going to have any need for the Links thing. Fix: Adding this to your theme&#8217;s (or child-theme&#8217;s) functions.php removes the page and the menu link: function nuke_menu_items&#40;&#41;&#123; remove_menu_page&#40; 'link-manager.php'&#41;; //remove_menu_page( 'upload.php'); //remove other items etc etc [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I&#8217;m customising a WP install for a client, adding some Custom Post Types and wotnot, and they aren&#8217;t going to have any need for the Links thing.</p>
<p><strong>Fix:</strong> Adding this to your theme&#8217;s (or child-theme&#8217;s) functions.php removes the page and the menu link:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> nuke_menu_items<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
remove_menu_page<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'link-manager.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//remove_menu_page( 'upload.php'); //remove other items etc etc</span>
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_menu'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'nuke_menu_items'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">999</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/remove-links-menu-item-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Searching between dates in GMail</title>
		<link>http://myquickfix.co.uk/2012/01/searching-between-dates-in-gmail/</link>
		<comments>http://myquickfix.co.uk/2012/01/searching-between-dates-in-gmail/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 10:36:01 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Google Apps]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=213</guid>
		<description><![CDATA[Problem: I&#8217;m doing my tax return And need to frequently look for emails sent and received in the 2010/11 tax year. Fix: Gmail is really powerful when the text search box is used. There are various advanced search operators but the ones that help here are &#8216;before:&#8217; and &#8216;after:&#8217;. When twinned with &#8216;from:&#8217; or &#8216;to:&#8217; it returns [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I&#8217;m doing my tax return <img src='http://myquickfix.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  And need to frequently look for emails sent and received in the 2010/11 tax year.</p>
<p><strong>Fix:</strong> Gmail is really powerful when the text search box is used. There are various advanced search operators but the ones that help here are &#8216;before:&#8217; and &#8216;after:&#8217;. When twinned with &#8216;from:&#8217; or &#8216;to:&#8217; it returns exactly what you want.</p>
<p><strong>Examples:</strong><br />
A certain date range:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">after:2010/03/31 before:2011/04/01</pre></div></div>

<p>The phrase &#8220;invoice&#8221; in a certain date range:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">after:2010/03/31 before:2011/04/01 invoice</pre></div></div>

<p>From an individual in a range:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">after:2010/03/31 before:2011/04/01 from:wave@thesea.com</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/searching-between-dates-in-gmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding category depth tag to Shopp 1.1.*</title>
		<link>http://myquickfix.co.uk/2012/01/adding-category-depth-tag-to-shopp-1-1/</link>
		<comments>http://myquickfix.co.uk/2012/01/adding-category-depth-tag-to-shopp-1-1/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 17:14:08 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=206</guid>
		<description><![CDATA[Problem: I needed to display sub categories of a category in category.php but only one level deep. Using: &#60;?php if&#40;shopp&#40;'category','hascategories'&#41;&#41;: ?&#62; &#60;?php while&#40;shopp&#40;'category','subcategories'&#41;&#41;: ?&#62; //display stuff &#60;?php endwhile; ?&#62; &#60;?php endif; ?&#62; &#8230;displays all subcast AND their subcats. Fix: I decided to add a new tag, called shopp(&#8216;subcategory&#8217;, &#8216;depth&#8217;) that would return the category depth. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I needed to display sub categories of a category in category.php but only one level deep. Using:</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>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'hascategories'</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>
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</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>
    //display stuff
  <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>
<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>

<p>&#8230;displays all subcast AND their subcats.</p>
<p><strong>Fix:</strong> I decided to add a new tag, called shopp(&#8216;subcategory&#8217;, &#8216;depth&#8217;) that would return the category depth. That way in the loop above this would show only immediate children:</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>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'hascategories'</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>
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
    <span style="color: #000088;">$depth</span> <span style="color: #339933;">=</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'depth'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'return=true'</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;">$depth</span><span style="color: #339933;">!=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span>
      <span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
   //else display stuff
<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>
<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>

<p><strong>Adding the new tag:</strong> Open the theme&#8217;s functions.php file and add this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'shopp_tag_category_depth'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'return_cat_depth'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'shopp_tag_subcategory_depth'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'return_cat_depth'</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">10</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> return_cat_depth<span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span> <span style="color: #000088;">$options</span><span style="color: #339933;">,</span> <span style="color: #000088;">$Category</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #b1b100;">return</span> <span style="color: #000088;">$Category</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">depth</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span></pre></div></div>

<p>&#8230;once that&#8217;s added, shopp(&#8216;subcategory&#8217;, &#8216;depth&#8217;) can be used anywhere in the Shopp templates.</p>
<p><strong>Note:</strong> In Shopp 1.2 the hook is created differently. Thanks to Jon Davies for pointing out that the hook would now be shopp_themeapi_{object name}_{property} and defined in defined in shopp/api/theme.php.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/adding-category-depth-tag-to-shopp-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting subcategory totals [shopp(&#039;subcategory&#039;,&#039;total&#039;)] to work in Shopp Plugin 1.1.*</title>
		<link>http://myquickfix.co.uk/2012/01/getting-subcategory-totals-working-in-shopp/</link>
		<comments>http://myquickfix.co.uk/2012/01/getting-subcategory-totals-working-in-shopp/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 17:01:53 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=201</guid>
		<description><![CDATA[Problem: Pulling the total number of products from a subcat in Shopp doesn&#8217;t seem to work out the box. For example, this code WON&#8217;T return the total even though the correct tag shopp(&#8216;subcategory&#8217;,'total&#8217;) is used: &#60;?php while&#40;shopp&#40;'category','subcategories'&#41;&#41;: ?&#62; &#60;?php shopp&#40;'subcategory','name'&#41;; ?&#62; (&#60;?php shopp&#40;'subcategory','total'&#41;; ?&#62;) &#60;?php endwhile; ?&#62; Fix: For the products to be countable, the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> Pulling the total number of products from a subcat in Shopp doesn&#8217;t seem to work out the box. For example, this code WON&#8217;T return the total even though the correct tag <a href="http://docs.shopplugin.net/Category_Tags#total">shopp(&#8216;subcategory&#8217;,'total&#8217;)</a> is used:</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;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</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>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'name'</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> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'total'</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;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Fix:</strong> For the products to be countable, the &#8216;<a href="http://docs.shopplugin.net/Category_Tags#has-products">hasproducts</a>&#8216; tag has to be called with the &#8216;load&#8217; option like so:</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;">while</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'category'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'subcategories'</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>
    <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'hasproducts'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'load=prices,images'</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>
        <span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'name'</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> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'subcategory'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'total'</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;">endif</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;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><strong>Note:</strong> The docs refer to &#8216;category&#8217; tags. Each category tag has an ideantical subcategory tag. For example <?php shopp('category','name'); ?> and <?php shopp('subcategory','name'); ?> both work when used in the correct context.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2012/01/getting-subcategory-totals-working-in-shopp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove prices from Variation drop-downs in Shopp WordPress plugin</title>
		<link>http://myquickfix.co.uk/2011/12/remove-prices-from-variation-drop-downs-in-shopp-wordpress-plugin/</link>
		<comments>http://myquickfix.co.uk/2011/12/remove-prices-from-variation-drop-downs-in-shopp-wordpress-plugin/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 18:56:03 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=194</guid>
		<description><![CDATA[Problem: In Shopp (1.1.9) the default variations drop-down list shows prices. This isn&#8217;t always desired. This is the default usage: &#60;ul class=&#34;variations&#34;&#62; &#60;?php shopp&#40;'product', 'variations', 'mode=multiple&#38;label=true&#38;defaults=Select an option&#38;before_menu=&#60;li&#62;&#38;after_menu=&#60;/li&#62;'&#41;; ?&#62; &#60;/ul&#62; And this outputs a list that shows options as &#8220;Option Label (price)&#8221;. Fix: The code above can be replaced with this code to manually create [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> In Shopp (1.1.9) the default variations drop-down list shows prices. This isn&#8217;t always desired. This is the default usage:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul class=&quot;variations&quot;&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'variations'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'mode=multiple&amp;label=true&amp;defaults=Select an option&amp;before_menu=&lt;li&gt;&amp;after_menu=&lt;/li&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;</pre></div></div>

<p>And this outputs a list that shows options as &#8220;Option Label (price)&#8221;.</p>
<p><strong>Fix:</strong> The code above can be replaced with this code to manually create the same thing, giving complete control over output:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;ul class=&quot;variations&quot;&gt;
    &lt;li&gt;
    &lt;label for=&quot;options-1&quot;&gt;Quantity&lt;/label&gt;
    &lt;select name=&quot;products[<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>][options][]&quot; class=&quot;category-catalog product<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> options&quot; id=&quot;options-1&quot;&gt;
    &lt;option value=&quot;&quot;&gt;Select an option&lt;/option&gt;
    <span style="color: #000000; font-weight: bold;">&lt;?php</span>
        <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span>shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'variations'</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;option value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$i</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'product'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'variation'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'label'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/option&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>
    &lt;/select&gt;
    &lt;/li&gt;
&lt;/ul&gt;</pre></div></div>

<p>The $i;$i++ was a bit of a work-around as I couldn&#8217;t get it to work with variation ID, so if you know a better way, please tell us below!</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/12/remove-prices-from-variation-drop-downs-in-shopp-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Capture last viewed category in product view in Shopp Plugin for WordPress</title>
		<link>http://myquickfix.co.uk/2011/11/capture-last-viewed-category-in-product-view-in-shopp-plugin-for-wordpress/</link>
		<comments>http://myquickfix.co.uk/2011/11/capture-last-viewed-category-in-product-view-in-shopp-plugin-for-wordpress/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 20:38:51 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Shopp Plugin]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=190</guid>
		<description><![CDATA[Problem: I&#8217;m using the Shopp 1.1.9 ecommerce plugin for WordPress, and my client wanted to display specific background images while showing certain products. Shopp is very complete, but one thing that is missing in the current version &#8216;out of the box&#8217; is the ability to pull the &#8216;last viewed&#8217; category name when viewing a product. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I&#8217;m using the <a href="https://shopplugin.net/" title="Shopp Plugin homepage" target="_blank">Shopp 1.1.9</a> ecommerce plugin for WordPress, and my client wanted to display specific background images while showing certain products. Shopp is very complete, but one thing that is missing in the current version &#8216;out of the box&#8217; is the ability to pull the &#8216;last viewed&#8217; category name when viewing a product. Obviously a product can belong to more than one cat, so it can&#8217;t know which one to display&#8230;</p>
<p><strong>Fix:</strong> There is however a breadcrumb template tag that stores the category name that a user us currently viewing, so that if they then click on a product, the hierarchical parent category can be displayed in the breadcrumb.</p>
<p>This functionality can be used in a new custom tag. Jon Davis the lead developer of Shopp helped me a lot today as I was barking up the wrong tree going about it the wrong way.</p>
<p>Add this to your theme&#8217;s functions.php:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">add_filter<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'shopp_tag_catalog_lastcat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'get_last_cat'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">function</span> get_last_cat <span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">,</span><span style="color: #000088;">$options</span><span style="color: #339933;">,</span><span style="color: #000088;">$Object</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$Storefront</span> <span style="color: #339933;">=</span> ShoppStorefront<span style="color: #009900;">&#40;</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: #009900; font-weight: bold;">false</span> <span style="color: #339933;">===</span> <span style="color: #000088;">$Storefront</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$category</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$Storefront</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">breadcrumb</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$category</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then anywhere in your Shopp templates you can do this to return the category part of the current breadcrumb e.g &#8220;Smalls&#8221; in Home > Smalls > Purple Pants :</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: #666666; font-style: italic;">//echo it out straight away..</span>
shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'lastcat'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// return it for use..</span>
<span style="color: #000088;">$lastcat</span> <span style="color: #339933;">=</span> shopp<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'catalog'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'lastcat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'return=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>

<p>Hope that helps someone, props go to JD for getting it working!</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/11/capture-last-viewed-category-in-product-view-in-shopp-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Notice: unserialize() [function.unserialize]: Error at offset then?</title>
		<link>http://myquickfix.co.uk/2011/11/what-is-notice-unserialize-function-unserialize-error-at-offset-then/</link>
		<comments>http://myquickfix.co.uk/2011/11/what-is-notice-unserialize-function-unserialize-error-at-offset-then/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 19:59:22 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=188</guid>
		<description><![CDATA[Problem: While doing some Shopp Plugin support work earlier, one customer was getting this error&#8230; Notice: unserialize() [function.unserialize]: Error at offset 111 of 118 bytes in /home/maxwell4/public_html/main/wp-content/plugins/shopp/core/model/Settings.php on line 228 &#8230;she had done a &#8216;find and replace&#8217; in a SQL DB dump to change her domain name, boogered it up accidentally, and needed an explanation. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> While doing some <a href="http://shopplugin.net" title="Shopp WordPress Plugin homepage " target="_blank">Shopp Plugin</a> support work earlier, one customer was getting this error&#8230;</p>
<p><em>Notice: unserialize() [function.unserialize]: Error at offset 111 of 118 bytes in /home/maxwell4/public_html/main/wp-content/plugins/shopp/core/model/Settings.php on line 228</em></p>
<p>&#8230;she had done a &#8216;find and replace&#8217; in a SQL DB dump to change her domain name, boogered it up accidentally, and needed an explanation. The answer I gave applies any time that error occurs in PHP, so i thought it was worth posting here!</p>
<p><strong>Reason:</strong> Arrays are often <a href="http://php.net/manual/en/function.serialize.php" title="PHP Serialize function docs" target="_blank">serialized</a> so that they can be stored in a database text field. If you change the data within a serialized array, without changing the character count, you will get the error above.</p>
<p>For example, try this:</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;">&lt;?php</span>
<span style="color: #000088;">$thing</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'one'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'two'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thing</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>This will echo out the following: <em>a:2:{i:0;s:3:&#8221;one&#8221;;i:1;s:3:&#8221;two&#8221;;}</em><br />
Now&#8230; if you stored that in a database, you could then retrieve it later and <a href="http://www.php.net/manual/en/function.unserialize.php" title="PHP Unserialize function reference " target="_blank">unserialize()</a> it to get your array back. wohoo!</p>
<p>In that serialized data, s:3:&#8221;one&#8221; means that the first element in the array is a string, and that it&#8217;s 3 characters long. Now.. if you manually changed &#8220;one&#8221; to &#8220;otherone&#8221; like this a:2:{i:0;s:3:&#8221;otherone&#8221;;i:1;s:3:&#8221;two&#8221;;} then when you ran it through unserialize() to retrieve your array, you would get the error were talking about.</p>
<p><strong>Fix:</strong> To correct this you would need to update the string length also like so: a:2:{i:0;s:8:&#8221;otherone&#8221;;i:1;s:3:&#8221;two&#8221;;} because &#8220;otherone&#8221; is actually 8 characters long. See? Good!</p>
<p>Any questions, please leave a message below.</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/11/what-is-notice-unserialize-function-unserialize-error-at-offset-then/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.htaccess hidden on Rackspace Cloud Sites (in FTP, with Filezilla)</title>
		<link>http://myquickfix.co.uk/2011/11/htaccess-hidden-on-rackspace-cloud-sites-in-ftp-with-filezilla/</link>
		<comments>http://myquickfix.co.uk/2011/11/htaccess-hidden-on-rackspace-cloud-sites-in-ftp-with-filezilla/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 15:07:42 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Rackspace Cloud]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=184</guid>
		<description><![CDATA[Problem: When connecting to a Rackspace Cloud site via FTP, hidden files are.. uh.. hidden. Usually Filezilla shows everything. Fix: There is a setting in Filezilla called &#8216;Force showing hidden files&#8217; that does exactly that. To activate that, go to the &#8216;Server&#8217; menu item and select it. Like this: When you click that, you should [...]]]></description>
			<content:encoded><![CDATA[<p>Problem: When connecting to a Rackspace Cloud site via FTP, hidden files are.. uh.. hidden. Usually <a href="http://filezilla-project.org/" target="_blank">Filezilla</a> shows everything.</p>
<p>Fix: There is a setting in Filezilla called &#8216;Force showing hidden files&#8217; that does exactly that. To activate that, go to the &#8216;Server&#8217; menu item and select it. Like this:</p>
<div id="attachment_185" class="wp-caption alignnone" style="width: 292px"><img class="size-full wp-image-185 " title="Force show hidden files in Filezilla" src="http://myquickfix.co.uk/wp-content/uploads/2011/11/filezilla-hidden.png" alt="" width="282" height="181" /><p class="wp-caption-text">Force show hidden files in Filezilla</p></div>
<p>When you click that, you should be shown a warning/dialogue box about why it needs to be done. Interesting what they say about &#8216;broken&#8217; servers!</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/11/htaccess-hidden-on-rackspace-cloud-sites-in-ftp-with-filezilla/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Experts Exchange on the way&#8230;</title>
		<link>http://myquickfix.co.uk/2011/11/new-experts-exchange-on-the-way/</link>
		<comments>http://myquickfix.co.uk/2011/11/new-experts-exchange-on-the-way/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 20:43:20 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=172</guid>
		<description><![CDATA[So.. there&#8217;s a new version of EE available, and I want a free geek-shirt! Have a looky at this linky&#8230;]]></description>
			<content:encoded><![CDATA[<p>So.. there&#8217;s a new version of EE available, and I want a free geek-shirt!</p>
<p><a style="border: 0; display: block; width: 200px; height: 215px; padding: 0; margin: 0;" title="Check out the New Experts Exchange" href="http://beta.experts-exchange.com"><br />
<img style="border: 0;" src="http://c746246.r46.cf2.rackcdn.com/eebeta-badge-large.png" alt="Large Experts Exchange VIP Badge" width="200" height="215" /></a></p>
<p>Have a looky at this linky&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/11/new-experts-exchange-on-the-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set date.timezone in PHP without using php.ini</title>
		<link>http://myquickfix.co.uk/2011/10/set-date-timezone-without-using-php-in/</link>
		<comments>http://myquickfix.co.uk/2011/10/set-date-timezone-without-using-php-in/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 09:44:27 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[htaccess]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://myquickfix.co.uk/?p=161</guid>
		<description><![CDATA[Problem: I needed to set default timezone for a site to get Zen Cart installed. The usual way would be to call date_default_timezone_set from a globally included script, or to use the date.timezone option in a php.ini file. The problem is that I don&#8217;t have access to the php.ini file and there is no script that [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong> I needed to set default timezone for a site to get Zen Cart installed. The usual way would be to call <a title="date default timezone set php function" href="http://php.net/manual/en/function.date-default-timezone-set.php" target="_blank">date_default_timezone_set</a> from a globally included script, or to use the <a title="date.timezone option manual" href="http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone" target="_blank">date.timezone</a> option in a php.ini file. The problem is that I don&#8217;t have access to the php.ini file and there is no script that will be called across the board.</p>
<p><strong>Fix:</strong> Turns out PHP flags can be called from .htaccess file. So assuming you are using Unix type hosting (or another server that can interpret distributed configuration files), you can add this to your .htaccess file to set the timezone:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">php_value date.timezone Europe<span style="color: #000000; font-weight: bold;">/</span>London</pre></div></div>

<p>Save that, upload it, and if you then look at the output of <a title="Info on the phpinfo PHP function" href="http://php.net/manual/en/function.phpinfo.php" target="_blank">phpinfo()</a> (create a php file with this in and upload it), you should see:</p>
<div id="attachment_162" class="wp-caption alignnone" style="width: 618px"><a href="http://myquickfix.co.uk/wp-content/uploads/2011/10/php.timezone.gif"><img class="size-full wp-image-162" title="php.timezone" src="http://myquickfix.co.uk/wp-content/uploads/2011/10/php.timezone.gif" alt="" width="608" height="137" /></a><p class="wp-caption-text">The Local Value should show what you set in the .htaccess file</p></div>
]]></content:encoded>
			<wfw:commentRss>http://myquickfix.co.uk/2011/10/set-date-timezone-without-using-php-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

