<?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>Ian Oxley &#187; web</title>
	<atom:link href="http://ianoxley.com/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianoxley.com</link>
	<description>Web Developer</description>
	<lastBuildDate>Tue, 11 Oct 2011 08:33:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Slides from my Node.js Talk at Super Mondays</title>
		<link>http://ianoxley.com/2011/10/03/slides-from-my-node-js-talk-at-super-mondays/</link>
		<comments>http://ianoxley.com/2011/10/03/slides-from-my-node-js-talk-at-super-mondays/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 22:37:05 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2011/10/03/slides-from-my-node-js-talk-at-super-mondays/</guid>
		<description><![CDATA[Last Monday I gave a short talk on Node.js at Super Mondays. You can get hold of the slide deck over on SlideShare. Node.js]]></description>
			<content:encoded><![CDATA[<p>
	Last Monday I gave a short talk on Node.js at Super Mondays. You can get hold of the <a href="http://www.slideshare.net/ianoxley/nodejs-9449273" rel="external">slide deck over on SlideShare</a>.
</p>
<p><!-- Begin SlideShare embed code --></p>
<div style="width:425px" id="__ss_9449273"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ianoxley/nodejs-9449273" title="Node.js" target="_blank">Node.js</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9449273" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></div>
<p><!-- End SlideShare embed code --></p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2011/10/03/slides-from-my-node-js-talk-at-super-mondays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DIBI (Design It. Build It.) 2011</title>
		<link>http://ianoxley.com/2011/06/11/dibi-design-it-build-it-2011/</link>
		<comments>http://ianoxley.com/2011/06/11/dibi-design-it-build-it-2011/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 20:29:56 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[dibi]]></category>
		<category><![CDATA[gateshead]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2011/06/11/dibi-design-it-build-it-2011/</guid>
		<description><![CDATA[DIBI is a two track Web Conference that this year was held over the 7th and 8th June 2011 at The Sage, Gateshead. I&#39;d been looking forward to it for ages, having attended last year&#39;s inaugral event and, as good as DIBI was last year, this year it was even better. New to this year&#39;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dibiconference.com/" rel="external"><abbr title="Design It Build It">DIBI</abbr></a> is a two track Web Conference that this year was held over the 7th and 8th June 2011 at The Sage, Gateshead. I&#39;d been looking forward to it for ages, having attended last year&#39;s inaugral event and, as good as DIBI was last year, this year it was even better.</p>
<p>New to this year&#39;s event was the Afternoon with&hellip;Startups over at the Live Theatre, held the afternoon before the main conference. The venue was good, all the talks were really interesting and insightful &ndash; particularly those from <a href="http://twitter.com/kevinmann" rel="external">Kevin Mann</a>, <a href="http://twitter.com/roanlavery" rel="external">Roan Lavery</a> and <a href="http://twitter.com/bobby_paterson" rel="external">Bobby Paterson</a> &ndash; and I came away from it with plenty of new ideas and inspiration.</p>
<p>The next day was the main two track conference. The first talk of the day for me was <a href="http://twitter.com/jaffathecake" rel="external">Jake Archibald</a> with <strong>@font-face &#8211; Good vs Legal</strong>. This was easily one of the highlights of the day. It was a brilliant talk with a brilliant slide deck brilliantly delivered (I would highly recommend watch the video of the talk when they&#39;re published shortly). He even used a Wii remote to change move onto the next slide <img src='http://ianoxley.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I stayed on the Build It track for the rest of the morning. <a href="http://twitter.com/intranation" rel="external">Bradley Wright</a> gave an insightful look into <strong>Programming the Real-Time Web</strong>. He covered the various ways that real time info can be sent and displayed in the browser, from the forever iframe approach to newer methods such as those provided by WebSockets and Socket.IO, and also how you can keep your real time web app accessible by using <abbr title="Web Accessibility Initiative - Accessible Rich Internet Applications">WAI-ARIA</abbr> attributes.</p>
<p>Rounding out the morning session was <a href="http://twitter.com/frogandcode" rel="external">Rich Thornett</a> on <strong>Using NoSQL with Yo&#39;SQL</strong>. It was an interesting look at how Dribbble makes use of MongoDB, where they&#39;ve favoured it over relational databases and on how it can be used to eliminate <a href="http://stackoverflow.com/questions/97197/what-is-the-n1-selects-problem" rel="external">N + 1 queries</a> to help boost your site&#39;s performance.</p>
<p>First up after lunch was <a href="http://twitter.com/atmos" rel="external">Corey Donohoe</a>, with another one of the day&#39;s highlights for me. It was a fascinating talk on all the metrics they use at GitHub to help them deploy changes to their site really, really quickly. Front-end behaviour, back-end behaviour, performance and failure rates are all monitored using a variety of tools. Plus there was plenty on the awesomeness that is Hubot!</p>
<p>Next I hopped over to the Design It track for <a href="http://twitter.com/adactio" rel="external">Jeremy Keith</a> and his <strong>One Web</strong> talk. It was probably the most inspiring talks of the day. It focused on how the &quot;mobile web&quot; is a misnomer and shouldn&#39;t be treated as a separate entity, but instead by adopting a <em>content first</em> approach and focusing on <em>universal access</em> to the web from any device, you can end up with a much better, scalable and richer user experience.</p>
<p>After an exceptionally well timed Red Bull break, I headed back to Build It to catch <a href="http://twitter.com/blaine" rel="external">Blaine Cook</a> talk about <strong>Building the Social Kaleidoscope</strong>. It featured a really interesting look at <a href="http://webfinger.org/" rel="external">Webfinger</a>, what it is, how it works and how it can help to solve the problems identifying users on the Web when they&#39;re details are stored in multiple places and <a href="http://en.wikipedia.org/wiki/Walled_garden_(technology)" rel="external">walled gardens</a>.</p>
<p>The final talk of the day was the keynote from none other than <a href="http://twitter.com/zeldman" rel="external">Jeffrey Zeldman</a>. Entitled <strong>What Every Web Designer Should Know</strong>, it was a very entertaining talk on the importance of designing from the content out, defining the problem before you try and solve it and, in a similar vein to Jeremy Keith, on how designing for mobile devices first can help you focus on what the user wants to do.</p>
<p>Overall DIBI was a fantastic conference, all the speakers were great and I came away feeling like I learnt a lot. Huge plaudits must go to <a href="http://twitter.com/gavinelliott" rel="external">Gavin Elliot</a> and the team for all their hard work. Already I&#39;m really looking forward to DIBI 2012.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2011/06/11/dibi-design-it-build-it-2011/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Does Google Use the Keywords Meta Tag Site Updated</title>
		<link>http://ianoxley.com/2011/05/27/does-google-use-the-keywords-meta-tag-site-updated/</link>
		<comments>http://ianoxley.com/2011/05/27/does-google-use-the-keywords-meta-tag-site-updated/#comments</comments>
		<pubDate>Thu, 26 May 2011 23:07:11 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2011/05/27/doesgoogleusethekeywordsmetatag-com-updated/</guid>
		<description><![CDATA[Just a quick post to say that http://doesgoogleusethekeywordsmetatag.com/ has been updated with some HTML5 Boilerplate and HSL goodness]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to say that <a href="http://doesgoogleusethekeywordsmetatag.com/" rel="external">http://doesgoogleusethekeywordsmetatag.com/</a> has<br />
	been updated with some <a href="https://github.com/paulirish/html5-boilerplate" rel="external">HTML5 Boilerplate</a> and <a href="http://mothereffinghsl.com/" rel="external"><abbr title="Hue Saturation Lightness">HSL</abbr></a> goodness <img src='http://ianoxley.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2011/05/27/does-google-use-the-keywords-meta-tag-site-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slides for my HTML5 Form Validation Talk at Super Mondays</title>
		<link>http://ianoxley.com/2011/04/26/slides-for-my-html5-form-validation-talk-at-super-mondays/</link>
		<comments>http://ianoxley.com/2011/04/26/slides-for-my-html5-form-validation-talk-at-super-mondays/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 21:36:13 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2011/04/26/slides-for-my-html5-form-validation-talk-at-super-mondays/</guid>
		<description><![CDATA[Tonight saw the return of the Lightning Talks at Super Mondays, with me doing a talk on HTML5 Form Validation. You can get the slide deck over on SlideShare. HTML5 Form Validation]]></description>
			<content:encoded><![CDATA[<p>
	Tonight saw the return of the <a href="http://www.supermondays.org/2011/04/15/lightning-talks/" rel="external">Lightning Talks at Super Mondays</a>, with me doing a talk on HTML5 Form Validation. You can get the <a href="http://www.slideshare.net/ianoxley/html5-form-validation-7731661" rel="external">slide deck over on SlideShare</a>.
</p>
<div style="width:425px" id="__ss_7731661"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/ianoxley/html5-form-validation-7731661" title="HTML5 Form Validation">HTML5 Form Validation</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7731661" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> </div>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2011/04/26/slides-for-my-html5-form-validation-talk-at-super-mondays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Base58 Encoding in Python</title>
		<link>http://ianoxley.com/2011/03/11/base58-encoding-in-python/</link>
		<comments>http://ianoxley.com/2011/03/11/base58-encoding-in-python/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 23:57:32 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2011/03/11/base58-encoding-in-python/</guid>
		<description><![CDATA[I&#39;ve been having a play around with Python today trying to implement some base58 encoding / decoding. I&#39;m by no means a Python expert but this is what I came up with (based on this PHP flic.kr super quick note): Feel free to fork it or offer suggestions for improvements in the comments]]></description>
			<content:encoded><![CDATA[<p>I&#39;ve been having a play around with Python today trying to implement some base58 encoding / decoding. I&#39;m by no means a Python expert but this is what I came up with (based on <a href="http://www.flickr.com/groups/api/discuss/72157616713786392/" rel="external">this PHP flic.kr super quick note</a>):</p>
<p><script src="https://gist.github.com/865912.js?file=base58.py"></script></p>
<p>Feel free to fork it or offer suggestions for improvements in the comments <img src='http://ianoxley.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2011/03/11/base58-encoding-in-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GMail Toolbar Chrome Greasemonkey Script</title>
		<link>http://ianoxley.com/2010/12/10/gmail-toolbar-chrome-greasemonkey-script/</link>
		<comments>http://ianoxley.com/2010/12/10/gmail-toolbar-chrome-greasemonkey-script/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 21:07:38 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/12/10/gmail-toolbar-chrome-greasemonkey-script/</guid>
		<description><![CDATA[I quite like the toolbar at the top of GMail. You know, the one with links to Google Calendar, Google Reader, Google Docs, et al. But I&#8217;m not that keen on having to scroll right back to the top of the page each time I need access to it. So, I created a simple Greasemonkey [...]]]></description>
			<content:encoded><![CDATA[<p>I quite like the toolbar at the top of GMail. You know, the one with links to Google Calendar, Google Reader, Google Docs, et al. But I&#8217;m not that keen on having to scroll right back to the top of the page each time I need access to it. So, I created a simple Greasemonkey script for Google Chrome to apply fixed positioning to the toolbar. That way it always stays at the top of your screen <img src='http://ianoxley.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>(Firefox users: I did create a <a href="https://github.com/ianoxley/userContent">user stylesheet that achieves the same effect</a><br />
 recently. However, that relies on the <code>@-moz-document domain(mail.google.com)</code> to restrict the <abbr title="Cascading Style Sheet">CSS</abbr> to GMail and Google seems to send different HTML to Firefox than it sends to Chrome).</p>
<p>You can fork a copy of the script from GitHub: <a href="https://github.com/ianoxley/gmailtoolbar">https://github.com/ianoxley/gmailtoolbar</a></p>
<p>
	Or alternatively download it from here: <a href="/greasemonkey/gmailtoolbar.user.js">gmailtoolbar.user.js</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2010/12/10/gmail-toolbar-chrome-greasemonkey-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Export a List of Google Docs With GoogleCL and a Bash Script</title>
		<link>http://ianoxley.com/2010/10/20/how-to-export-a-list-of-google-docs-with-googlecl-and-a-bash-script/</link>
		<comments>http://ianoxley.com/2010/10/20/how-to-export-a-list-of-google-docs-with-googlecl-and-a-bash-script/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 22:40:43 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/10/20/how-to-export-a-list-of-google-docs-with-googlecl-and-a-bash-script/</guid>
		<description><![CDATA[I was playing around with GoogleCL recently and came up with this: http://github.com/ianoxley/googlecl-export It&#39;s a Bash script that lets you export a list of Google Docs to a specified format. For example, to export a particular folder to PDF you&#39;d type something like this: googlecl-export -f pdf -d yourfolderofdocs You need to have GoogleCL installed [...]]]></description>
			<content:encoded><![CDATA[<p>I was playing around with <a href="http://code.google.com/p/googlecl/">GoogleCL</a> recently and came up with this: <a href="http://github.com/ianoxley/googlecl-export">http://github.com/ianoxley/googlecl-export</a></p>
<p>
	It&#39;s a Bash script that lets you export a list of Google Docs to a specified format. For example, to export a particular folder to <abbr title="Portable Document Format">PDF</abbr> you&#39;d type something like this:</p>
<div class="snippet">
	<code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">googlecl-export <span style="color: #660033;">-f</span> pdf <span style="color: #660033;">-d</span> yourfolderofdocs</pre></div></div>

<p>	</code>
</div>
<p>You need to have GoogleCL installed for the Bash script to work (GoogleCL can be downloaded from <a href="http://code.google.com/p/googlecl/" rel="external">http://code.google.com/p/googlecl/</a>) but otherwise you should just need to make the script executable e.g. <code>chmod u+x googlecl-export</code> and possibly stick it somewhere on your <code>$PATH</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2010/10/20/how-to-export-a-list-of-google-docs-with-googlecl-and-a-bash-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Show Grid Bookmarklet for the Drupal ninesixty Theme</title>
		<link>http://ianoxley.com/2010/09/24/a-show-grid-bookmarklet-for-the-drupal-ninesixty-theme/</link>
		<comments>http://ianoxley.com/2010/09/24/a-show-grid-bookmarklet-for-the-drupal-ninesixty-theme/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 12:42:35 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[drupal css 960 javascript]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/09/24/a-show-grid-bookmarklet-for-the-drupal-ninesixty-theme/</guid>
		<description><![CDATA[I&#39;ve been using the Drupal ninesixty theme recently. One of the nice things about it is the ability to add a show-grid class to the &#60;body&#62; tag to display a grid as a background image grid for development / debugging. But, rather than manually adding and removing this class to the page.tpl.php, I created a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#39;ve been using the Drupal ninesixty theme recently. One of the nice things about it is the ability to add a <code>show-grid</code> class to the <code>&lt;body&gt;</code> tag to display a grid as a background image grid for development / debugging.</p>
<p>But, rather than manually adding and removing this class to the page.tpl.php, I created a bookmarklet to toggle the <code>show-grid</code> class on and off. The code looks like this:</p>
<div class="code-snippet">
<code></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">className</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> b <span style="color: #339933;">=</span> document.<span style="color: #660066;">body</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>b.<span style="color: #660066;">className</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">' show-grid'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      b.<span style="color: #660066;">className</span> <span style="color: #339933;">=</span> b.<span style="color: #660066;">className</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">' show-grid'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
      b.<span style="color: #660066;">className</span> <span style="color: #339933;">+=</span> <span style="color: #3366CC;">' show-grid'</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p></code>
</div>
<p>It <em>does</em> make the assumption that your <code>&lt;body&gt;</code> tag will always have a <code>class</code> attribute, although it should be fairly straight forwards to modify the code to allow for cases where the <code>&lt;body&gt;</code> tag does <em>not</em> have a <code>class</code> attribute.</p>
<p>To save it as a bookmarklet, drag this link to your bookmarks bar: <a href="javascript:(function()%20{if%20(document.body.className)%20{var%20b%20=%20document.body;if%20(b.className.indexOf(%27%20show-grid%27)%20!==%20-1)%20{b.className%20=%20b.className.replace(%27%20show-grid%27,%20%27%27);}%20else%20{b.className%20+=%20%27%20show-grid%27;}}})();">Show Grid</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2010/09/24/a-show-grid-bookmarklet-for-the-drupal-ninesixty-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Create a Drupal Views Items Per Page Filter</title>
		<link>http://ianoxley.com/2010/09/23/how-to-create-a-drupal-views-items-per-page-filter/</link>
		<comments>http://ianoxley.com/2010/09/23/how-to-create-a-drupal-views-items-per-page-filter/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 22:16:08 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/09/23/how-to-create-a-drupal-views-items-per-page-filter/</guid>
		<description><![CDATA[Sometimes, depending on the site you are working on, you need to allow (or the client wants you to allow ) visitors to be able to select how many items per page will be displayed e.g. on a product listings page. To do this in Drupal 6 turned out to be a lot easier than [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, depending on the site you are working on, you need to allow (or the client <em>wants</em> you to allow <img src='http://ianoxley.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) visitors to be able to select how many items per page will be displayed e.g. on a product listings page.</p>
<p>To do this in Drupal 6 turned out to be a lot easier than I thought. I used the code from <a href="http://foreverheavy.com/10-quick-and-dirty-drupal-tips/#itemsperpage">this blog post by Nicholas Coates</a> but, rather than add it to a views template, I added it to a <a href="http://drupalcontrib.org/api/function/hook_views_query_alter/6">hook_views_query_alter</a> function I was already using. This meant I could easily use the <code>$view</code> object passed as a parameter to this function:</p>
<div class="code-snippet">
	<code></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> hook_views_query_alter<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$view</span><span style="color: #339933;">,</span> <span style="color: #339933;">&amp;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #339933;">...</span>
  <span style="color: #000088;">$itemCount</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'itemcount'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// this is just as an example</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$itemCount</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_items_per_page</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$view</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_items_per_page</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$itemCount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
	<span style="color: #339933;">...</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>	</code></p>
</div>
<p>
	As Nicholas Coates says in his aforementioned blog post: <q cite="http://foreverheavy.com/10-quick-and-dirty-drupal-tips/#itemsperpage">this is a quick and painless way to implement an items per page filter</q>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2010/09/23/how-to-create-a-drupal-views-items-per-page-filter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Fix a Can&#8217;t Create/Write to File Error With SELECT INTO OUTFILE in MySQL</title>
		<link>http://ianoxley.com/2010/08/24/how-to-fix-a-cant-create-write-to-file-error-with-select-into-outfile-in-mysql/</link>
		<comments>http://ianoxley.com/2010/08/24/how-to-fix-a-cant-create-write-to-file-error-with-select-into-outfile-in-mysql/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 22:42:55 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/08/24/how-to-fix-a-file-permissions-error-with-mysqls-select-into-outfile/</guid>
		<description><![CDATA[Have you ever tried to use SELECT&#8230;INTO OUTFILE in MySQL and come across the following error? &#34;Can&#8217;t create/write to file &#8216;/path/to/folder/filename&#8217; (Errcode: 2)&#34; I was having this problem the other day and, after checking that file permissions weren&#8217;t the cause of the problem, I came across the following post on the MySQL forums: &#34;The problem [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to use <a href="http://dev.mysql.com/doc/refman/5.1/en/select.html"><code>SELECT&hellip;INTO OUTFILE</code></a> in MySQL and come across the following error?</p>
<blockquote>
<p>
		&quot;Can&#8217;t create/write to file &#8216;/path/to/folder/filename&#8217; (Errcode: 2)&quot;
	</p>
</blockquote>
<p>I was having this problem the other day and, after checking that file permissions weren&#8217;t the cause of the problem, I came across the following <a href="http://forums.mysql.com/read.php?20,369583,370808#msg-370808">post on the MySQL forums</a>:</p>
<blockquote cite="http://forums.mysql.com/read.php?20,369583,370808#msg-370808">
<p>
		&quot;The problem was not in MySQL but in AppArmor on Ubuntu. I had to add the directories I wanted to write into to my /etc/apparmor.d/usr.sbin.mysqld and restart apparmor.d.&quot;
	</p>
</blockquote>
<p>So, one <code>sudo vim /etc/apparmor.d/usr.sbin.mysqld</code> later and I&#8217;d added the <code>path/to/folder</code> I needed to be able to write to (not forgetting to add the trailing comma &#8216;,&#8217; to the end of the line, which is <em>always</em> required, even for the last line). </p>
<p>All that was left to do was to restart AppArmor with:</p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apparmor restart</pre></div></div>

<p></code></p>
<p>After that, <code>SELECT&hellip;INTO OUTFILE</code> worked like a charm <img src='http://ianoxley.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ianoxley.com/2010/08/24/how-to-fix-a-cant-create-write-to-file-error-with-select-into-outfile-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

