<?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>Richard Shepherd &#187; Flickr</title>
	<atom:link href="http://www.richardshepherd.com/tag/flickr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardshepherd.com</link>
	<description>Making the web. Better looking.</description>
	<lastBuildDate>Fri, 04 Jun 2010 18:03:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>WordPress Custom Fields For Beginners</title>
		<link>http://www.richardshepherd.com/wordpress-custom-fields-for-beginners/</link>
		<comments>http://www.richardshepherd.com/wordpress-custom-fields-for-beginners/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 19:10:32 +0000</pubDate>
		<dc:creator>richardshepherd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[custom fields]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[get_post_meta]]></category>

		<guid isPermaLink="false">http://www.richardshepherd.com/?p=721</guid>
		<description><![CDATA[This is a tutorial for beginners, and we were all beginners once. To a beginner I remember custom fields looking quite pointless. I couldn&#8217;t quite grasp what they were for. Then, after building a few WordPress sites, I watched an excellent tutorial from Chris Coyier over at CSS Tricks and it really opened my eyes. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-726" title="fieldsofgold" src="http://s85883.gridserver.com/wpblog/wp-content/uploads/2009/11/fieldsofgold.jpg" alt="fieldsofgold" width="520" height="250" /></p>
<p>This is a tutorial for beginners, and we were all beginners once.</p>
<p>To a beginner I remember custom fields looking quite pointless. I couldn&#8217;t quite grasp what they were for.</p>
<p>Then, after building a few WordPress sites, I watched an excellent tutorial from Chris Coyier over at CSS Tricks and it really opened my eyes. There&#8217;s a link at the bottom of this post to Chris&#8217;s excellent video series. And that link was generated using a custom field.<br />
<span id="more-721"></span><br />
To whet your appetite, here&#8217;s an example of a search function I <a href="http://www.thet.org" target="_blank">built for THET</a> using custom fields. You can select from three options and then WordPress will search through all the posts custom fields until it finds a match.</p>
<p style="text-align: center;"><a href="http://www.thet.org" target="_blank"><img class="size-full wp-image-733 aligncenter" title="thet-search" src="http://s85883.gridserver.com/wpblog/wp-content/uploads/2009/11/thet-search.jpg" alt="thet-search" width="216" height="220" /></a></p>
<p style="text-align: left;">That&#8217;s a really powerful way to harness WordPress custom fields, but we&#8217;re going to start with something a little easier.</p>
<h3 style="text-align: left;">The project</h3>
<p style="text-align: left;">In this tutorial, we&#8217;re going to stick with something simple. All you&#8217;ll need is some basic PHP, together with feeling comfortable working with some WordPress files; specifically single.php which you&#8217;ll find in http://your-wordpress-url.com/wp-content/themes/your-theme/single.php.</p>
<p style="text-align: left;">To keep things both easy <em>and</em> hopefully useful, we&#8217;re going to create a couple of custom fields which display a credit and a link to a flickr image. I&#8217;m using it in this post! The image at the top of the field (custom <em>fields</em>, gettit?!) came thanks to a flickr user called innoxiuss. And if you scroll to the bottom of this page you&#8217;ll see a credit that looks like this:</p>
<p><img class="alignnone size-full wp-image-732" title="attribute" src="http://s85883.gridserver.com/wpblog/wp-content/uploads/2009/11/atrribute.jpg" alt="atrribute" width="218" height="27" /></p>
<p>Well that credit is generated thanks to two custom fields and a little bit of php code.</p>
<h3>What is a WordPress Custom Field?</h3>
<p>Okay. So think of a custom field as a bit of data. It can be anything at all, as long as it&#8217;s an alpha numeric string that can be stored in the WordPress database. So a custom field is not an image, it&#8217;s the URL <em>of</em> the image.</p>
<p>A custom field has two properties, a <strong>name</strong> and a <strong>value</strong>.</p>
<p>For example, the name could be <strong>image </strong>and the value could be <strong>www.yoursite.com/image.jpg</strong>.</p>
<p>But here&#8217;s the thing: <em>it doesn&#8217;t have to make that much sense</em>. The name could be <strong>fruit</strong> and the value could be <strong>apple</strong>. And as pointless as that looks, there are instances where that information could come in useful.</p>
<p>Let&#8217;s take the real world example of the flickr credit on the bottom of this page. There are actually two custom fields in there. The first is the flickr user and the second is the URL of the photo.</p>
<p>Name: <strong>flickr_attribute_url</strong><br />
Value: <strong>http://www.flickr.com/photos/innoxiuss/2665404220/</strong></p>
<p>Name: <strong>flickr_attribute_name</strong><br />
Value: <strong>innoxiuss</strong></p>
<h3>How to add a Custom Field</h3>
<p>Custom fields are added on the Edit Post page, and it looks like this&#8230;</p>
<p><img title="custom-fields-empty" src="http://s85883.gridserver.com/wpblog/wp-content/uploads/2009/11/custom-fields-empty.jpg" alt="custom-fields-empty" width="787" height="236" /></p>
<p>If you can&#8217;t see it, then scroll to the top and under &#8216;Screen Options&#8217; make sure that &#8216;Custom Fields&#8217; is ticked.</p>
<p>All you have to do is click on the &#8216;Enter new&#8217; link (in blue) and enter a name for your data under &#8216;Name&#8217;.</p>
<p>Next enter your data&#8217;s value under &#8216;Value&#8217;.</p>
<p>Finally, click on the &#8216;Add Custom Field&#8217; button and you&#8217;re done. This is what it might look like&#8230;</p>
<p><img class="alignnone size-full wp-image-723" title="adding-custom-field" src="http://s85883.gridserver.com/wpblog/wp-content/uploads/2009/11/adding-custom-field.jpg" alt="adding-custom-field" width="765" height="166" /></p>
<p>You can add as many custom fields as you like, and on some posts I have over 20. Here you can see I&#8217;ve added two, making sure that the names are <strong>unique</strong>.</p>
<p><img title="custom-fields-full" src="http://s85883.gridserver.com/wpblog/wp-content/uploads/2009/11/custom-fields-full.jpg" alt="custom-fields-full" width="766" height="186" /></p>
<p>And that&#8217;s it. You now have two custom fields each containing a snippet of data.</p>
<p>But without rolling up our selves and getting our hands dirty with some PHP, this isn&#8217;t going to do a thing.</p>
<h3>Adding the PHP</h3>
<p>Here&#8217;s the code we&#8217;ll be using. Have a read through and see if it makes sense&#8230;</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
&nbsp; <span style="color: #666666; font-style: italic;">// Check to see if this data (custom field) exists</span><br />
&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flickr_attribute_name'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// It does, so let's start building our HTML!</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;flickr_attribute&quot;&gt;'</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Grab the name of the flickr user from the custom field</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// called 'flickr_attribute_name'</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000088;">$flickr_attribute_name</span> <span style="color: #339933;">=</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flickr_attribute_name'</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><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Grab the url of the flickr user from the custom field</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// called 'flickr_attribute_url'</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #000088;">$flickr_attribute_url</span> <span style="color: #339933;">=</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flickr_attribute_url'</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><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Continue with our HTML, using our new variables</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'photo courtesy of &lt;a href=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$flickr_attribute_url</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&quot; target=&quot;_blank&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$flickr_attribute_name</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/a&gt; over at flickr'</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Close of the DIV and we're done</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;&lt;!-- /.flickr attribute --&gt;'</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// End of the get_post_meta if statement</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Okay, let&#8217;s take a moment to go through the code.</p>
<p>First of all, make sure you have created the custom fields in your WordPress post, and that you have the names of the fields exactly right. After all, if there&#8217;s no custom field data there&#8217;s nothing to do!</p>
<p>We check for the data in the first line:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flickr_attribute_name'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></div></td></tr></tbody></table></div>
<p>We use the WordPress function <a href="http://codex.wordpress.org/Function_Reference/get_post_meta">get_post_meta</a> to grab the value for &#8216;flickr_attribute_name&#8217;. If there&#8217;s no data there then this statement will be null and the if won&#8217;t run. If there is something in that custom field then the code will carry on executing.</p>
<p>But hold on a minute, what&#8217;s all that other stuff? Well, the get_post_meta function has the following parameters:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$single</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>We set our <strong>$post_id</strong> as the current post using $post->ID. Our <strong>$key</strong> is the name of the custom field which is &#8216;flickr_attribute_name&#8217;. And finally we set <strong>$single</strong> to true.</p>
<p>What is single? If it&#8217;s set to <strong>true</strong> it returns a single result as a string. If it&#8217;s set to <strong>false</strong> it returns multiple results as an array. We&#8217;ll get on to arrays in later tutorials, but for now we&#8217;re going to keep it simple. We only have one value for our flickr credit so we leave it as <strong>true</strong>.</p>
<p>So now we know we have some data, let&#8217;s carry on with the code. We put our content in a DIV so we can style it to our liking</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// It does, so let's start building our HTML!</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;flickr_attribute&quot;&gt;'</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>And we also create two variables with our custom field data in. The <strong>get_post_meta</strong> function works exactly as we described it above.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Grab the name of the flickr user from the custom field</span><br />
<span style="color: #666666; font-style: italic;">// called 'flickr_attribute_name'</span><br />
<span style="color: #000088;">$flickr_attribute_name</span> <span style="color: #339933;">=</span><br />
<br />
&nbsp; get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flickr_attribute_name'</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><br />
<br />
<span style="color: #666666; font-style: italic;">// Grab the url of the flickr user from the custom field</span><br />
<span style="color: #666666; font-style: italic;">// called 'flickr_attribute_url'</span><br />
<span style="color: #000088;">$flickr_attribute_url</span> <span style="color: #339933;">=</span><br />
&nbsp; get_post_meta<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'flickr_attribute_url'</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></div></td></tr></tbody></table></div>
<p>Again, note that we set the <strong>$single</strong> parameter to <strong>true</strong>, because we know there is only one bit of data. How do we know this? Well, in this instance it&#8217;s because we&#8217;ve set the custom field up ourselves in the WordPress backend.</p>
<p>Finally, we throw together the rest of the HTML, and close off the <strong>if</strong> statement.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Continue with our HTML, using our new variables</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'photo courtesy of &lt;a href=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$flickr_attribute_url</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&quot; target=&quot;_blank&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$flickr_attribute_name</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/a&gt; over at flickr'</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;">// Close of the DIV and we're done</span><br />
&nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;&lt;!-- /.flickr attribute --&gt;'</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// End of the get_post_meta if statement</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<h3>Bringing it together</h3>
<p>So we have our custom fields in WordPress and we&#8217;ve entered some data into them. We&#8217;ve also created the snippet of easy PHP which&#8217;ll read this data and display it on the page.</p>
<p>But where does it go?</p>
<p>Well, for this snippet I&#8217;ve chosen to put it on the bottom of the <strong>single.php</strong> page in the wp-content folder, as this is the page that displays single posts.</p>
<p>On my page it comes just before the <tags> section, which itself is just before the <strong>comments</strong> bit. But you could put it anywhere you want.</p>
<p>Just boot up your favourite PHP editor (I like Expresso on the Mac and, predictably, Dreamweaver on the PC) and type in the code.</p>
<p>Save your page, upload, and you should have a lovely flickr photo credit.</p>
<h3>What next?</h3>
<p>Don&#8217;t have flickr photos on your page? Well then this could be a bit pointless. But remember, this tutorial should just give you a basic idea of how custom fields work. Sure, you could have put this flickr information in the post itself but as we&#8217;ll see, we can do all kinds of funky things once we have the ability to search custom fields and display data based on their contents.</p>
<p>In the mean time there is some further reading below. Oh, and the further reading is displayed from data in custom fields!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardshepherd.com/wordpress-custom-fields-for-beginners/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to use jQuery with a JSON Flickr feed to display photos</title>
		<link>http://www.richardshepherd.com/how-to-use-jquery-with-a-json-flickr-feed-to-display-photos/</link>
		<comments>http://www.richardshepherd.com/how-to-use-jquery-with-a-json-flickr-feed-to-display-photos/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 22:43:29 +0000</pubDate>
		<dc:creator>richardshepherd</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.growlingranger.com/?p=427</guid>
		<description><![CDATA[So today I needed to display photos from our Flickr Group without using php or asp.net. I have a WordPress widget that does this job nicely, but no PHP was allowed. Thank goodness for jQuery! jQuery has a handy little function which allows us to load JSON data using an HTTP GET request, and then [...]]]></description>
			<content:encoded><![CDATA[<p>So today I needed to display photos from our Flickr Group without using php or asp.net. I have a WordPress widget that does this job nicely, but no PHP was allowed.</p>
<p>Thank goodness for jQuery! jQuery has a handy little function which allows us to load JSON data using an HTTP GET request, and then process the contents as an array. And with some natty CSS to square things up as a grid, I have nine random (ish) photos from our Flickr group displaying in a nice 3&#215;3 grid.</p>
<p><a href="http://www.richardshepherd.com/flickr.html" target="_blank">See it in action</a>.</p>
<p>The full commented code is at the bottom of this post, but let&#8217;s go through it bit by bit.<span id="more-427"></span></p>
<h2>What is JSON?</h2>
<p>Since we&#8217;re talking about Flickr, let&#8217;s use they&#8217;re definition:</p>
<p><em>&#8220;JSON, or JavaScript Object Notation, is a simple machine-readable data-interchange format, which makes constructing API applications in JavaScript easy (though it can be used from other languages too!). &#8220;</em></p>
<p>Which means what exactly? Well, it&#8217;s a lot like any other feed or data &#8211; like an RSS feed, for example. A typical Flick JSON response might look like this:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Talk On Travel Pool&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">&quot;link&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://www.flickr.com/groups/talkontravel/pool/&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">&quot;description&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Travel and vacation photos from around the world, featured on the Talk On Travel blog. Join us in sharing your favourite destinations, your top hot spots, and the places to avoid. &quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">&quot;modified&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;2009-02-02T11:10:27Z&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">&quot;generator&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://www.flickr.com/&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; <span style="color: #3366CC;">&quot;items&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;View from the hotel&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;link&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://www.flickr.com/photos/33112458@N08/3081564649/in/pool-998875@N22&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;media&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;m&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;http://farm4.static.flickr.com/3037/3081564649_4a6569750c_m.jpg&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;date_taken&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;2008-12-04T04:43:03-08:00&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;description&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;&lt;p&gt;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://www.flickr.com/people/33112458@N08/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt; Talk On Travel&lt;<span style="color: #000099; font-weight: bold;">\/</span>a&gt; has added a photo to the pool:&lt;<span style="color: #000099; font-weight: bold;">\/</span>p&gt; &lt;p&gt;&lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>http:// www.flickr.com/photos/33112458@N08/3081564649/<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span>View from the hotel<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt; &lt;img src=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://farm4.static.flickr.com/3037/3081564649_4a6569750c_m.jpg<span style="color: #000099; font-weight: bold;">\&quot;</span> width=<span style="color: #000099; font-weight: bold;">\&quot;</span>240<span style="color: #000099; font-weight: bold;">\&quot;</span> height=<span style="color: #000099; font-weight: bold;">\&quot;</span>180<span style="color: #000099; font-weight: bold;">\&quot;</span> alt=<span style="color: #000099; font-weight: bold;">\&quot;</span>View from the hotel<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;&lt;<span style="color: #000099; font-weight: bold;">\/</span>a&gt;&lt;<span style="color: #000099; font-weight: bold;">\/</span>p&gt; &quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;published&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;2008-12-04T12:43:03Z&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;author&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;nobody@flickr.com (Talk On Travel)&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;author_id&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;33112458@N08&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">&quot;tags&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;spain dolphins tenerife canaries lagomera aqualand playadelasamericas junglepark losgigantos loscristines talkontravel&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#93;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span></div></td></tr></tbody></table></div>
<p>Which is not altogether too hard to digest. <a href="http://api.flickr.com/services/feeds/groups_pool.gne?id=998875@N22&amp;lang=en-us&amp;format=json&amp;jsoncallback=?" target="_blank">To see the whole feed from Talk On Travel have a look here</a>.</p>
<p>All we need to do is get that feed in a way our javascript can use, and then use it. Enter, stage left, jQuery&#8230;</p>
<h2>Create our object and fill it with data</h2>
<p>So how can jQuery help us out? With the handy <strong>$.getJSON(url,  [data], [callback])</strong> command.</p>
<p>It&#8217;s simpliest method would be something like:</p>
<div class="codecolorer-container javascript default" style="border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://www.example.com/yourjsonfeed.json&quot;</span><span style="color: #339933;">,</span> functionName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Which would grab the info from a json feed at <em>www.example.com/yourjsonfeed.json</em> and then execute a function called <em>functionName</em>.</p>
<p>Then, you&#8217;d have to create a function like so:</p>
<div class="codecolorer-container javascript default" style="border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> functionName<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>In which <em>data</em> is automatically populated with the json feed. Nice, eh?</p>
<p>So now we have our <em>data</em> object, we need to know how to grab stuff out of it. Again, this is pretty easy stuff. We use some dot syntax like:</p>
<div class="codecolorer-container javascript default" style="border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">data.<span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">media</span>.<span style="color: #660066;">m</span></div></td></tr></tbody></table></div>
<p>Which says&#8230; in <em>data,</em> go to (the first) <em>item</em>, then go to the <em>media</em> bit and grab the <em>m</em> bit.</p>
<p>Scroll back to the top of this page, and in our example you&#8217;ll see that this would be &#8216;http://farm4.static.flickr.com/3037/3081564649_4a6569750c_m.jpg&#8217;.</p>
<p>You can probably work out then what <em>item.title</em> and <em>item.link</em> would give us. Armed with that, you can get any information you need from this feed. All we have to do now is display it!</p>
<h2>Getting this feed onto the screen</h2>
<p>Does that make sense so far? Hope so. If you get lost, check out the excellent jQuery documentation &#8211; the links for which are at the bottom of this post.</p>
<p>Let&#8217;s sew it all together in a really simple function that just cycles through all the images in the feed. By default, Flickr returns 20 images.</p>
<p>As I&#8217;ve commented the code, you should be able to work it out from here&#8230;</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #006600; font-style: italic;">// Our very special jQuery JSON fucntion call to Flickr, gets details</span><br />
<span style="color: #006600; font-style: italic;">// of the most recent 20 images</span><br />
<br />
$.<span style="color: #660066;">getJSON</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://api.flickr.com/services/feeds/groups_pool.gne?id=<br />
998875@N22〈=en-us&amp;amp;format=json&amp;amp;jsoncallback=?&quot;</span><span style="color: #339933;">,</span> displayImages<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #003366; font-weight: bold;">function</span> displayImages<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Start putting together the HTML string</span><br />
&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> htmlString <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Now start cycling through our array of Flickr photo details</span><br />
&nbsp; &nbsp; $.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span>data.<span style="color: #660066;">items</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">,</span><span style="color: #000066; font-weight: bold;">item</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// I only want the ickle square thumbnails</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> sourceSquare <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">media</span>.<span style="color: #660066;">m</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;_m.jpg&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;_s.jpg&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Here's where we piece together the HTML</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; htmlString <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;li&gt;&lt;a href=&quot;'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">link</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; target=&quot;_blank&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; htmlString <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;img title=&quot;'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">title</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; src=&quot;'</span> <span style="color: #339933;">+</span> sourceSquare<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; htmlString <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&quot; alt=&quot;'</span><span style="color: #339933;">;</span> htmlString <span style="color: #339933;">+=</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">title</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot; /&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; htmlString <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; '</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Pop our HTML in the #images DIV</span><br />
&nbsp; &nbsp; $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#images'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>htmlString<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Close down the JSON function call</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<h2>But those aren&#8217;t my photos!?</h2>
<p>I know, I know. Have a look at that feed address once more&#8230;</p>
<p><em>http://api.flickr.com/services/feeds/groups_pool.gne?id=998875@N22&amp;lang=en-us&amp;format=json&amp;jsoncallback=?</em></p>
<p>Spot the <em>998875@N22 </em>bit? Well that&#8217;s the Flickr user ID for Talk On Travel, another blog that I look after. You need to put your own ID in that string.</p>
<p>I recommend using  http://idgettr.com/ to find out easily!</p>
<h2>Over to you</h2>
<p>That&#8217;s a simple introduction to JSON and Flickr, and I hope it puts you on the right path.</p>
<p>For more details on JSON and jQuery, and with another example of how to get photos from a Flickr JSON feed, check out <a href="http://docs.jquery.com/Ajax/jQuery.getJSON" target="_blank">http://docs.jquery.com/Ajax/jQuery.getJSON</a>.</p>
<p>To read up on the Flickr JSON object, head over to <a href="http://www.flickr.com/services/api/response.json.html" target="_blank">http://www.flickr.com/services/api/response.json.html</a>.</p>
<p>You can see my code in action at <a href="http://www.richardshepherd.com/flickr.html" target="_blank">http://www.richardshepherd.com/flickr.html</a>. Check out the source code to see what it&#8217;s doing.</p>
<p>Obviously, you can do a lot more with this, but it&#8217;s just a basic implementation to get you started.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardshepherd.com/how-to-use-jquery-with-a-json-flickr-feed-to-display-photos/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>FlickrBox Goes Live! Almost.</title>
		<link>http://www.richardshepherd.com/flickrbox-goes-live-almost/</link>
		<comments>http://www.richardshepherd.com/flickrbox-goes-live-almost/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 21:31:38 +0000</pubDate>
		<dc:creator>richardshepherd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[FlickrBox]]></category>
		<category><![CDATA[phpFlickr]]></category>
		<category><![CDATA[Slimbox]]></category>
		<category><![CDATA[Wordpress Plugin]]></category>

		<guid isPermaLink="false">http://www.richardshepherd.com/?p=199</guid>
		<description><![CDATA[A new tab has appeared at the top of this page, which links through to FlickrBox (formerly the phpFlickr Widget). It will be launched to no fanfare whatsoever next week, when I upload the widget to WordPress. Pending their most gracious approval, of course. In the mean time you can head over and have a [...]]]></description>
			<content:encoded><![CDATA[<p>A new tab has appeared at the top of this page, which links through to FlickrBox (formerly the phpFlickr Widget).</p>
<p>It will be launched to no fanfare whatsoever next week, when I upload the widget to WordPress. Pending their most gracious approval, of course.</p>
<p>In the mean time you can head over and have a look at what it&#8217;s all about. In future posts I&#8217;ll even breakdown the code that has put the whole thing together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardshepherd.com/flickrbox-goes-live-almost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpFlickr Widget</title>
		<link>http://www.richardshepherd.com/phpflickr-widget/</link>
		<comments>http://www.richardshepherd.com/phpflickr-widget/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 10:29:10 +0000</pubDate>
		<dc:creator>richardshepherd</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[phpFlickr]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.richardshepherd.com/?p=175</guid>
		<description><![CDATA[You may have noticed a new widget in the sidebar called the phpFlickr Widget. It&#8217;s a widget I have developed for WordPress which allows you to include your Flickr photos in your blog, and display them with the rather funky Slimbox tool. Click on one of the photos and see what I mean. Slimbox, as [...]]]></description>
			<content:encoded><![CDATA[<p>You may have noticed a new widget in the sidebar called the phpFlickr Widget.</p>
<p>It&#8217;s a widget I have developed for WordPress which allows you to include your Flickr photos in your blog, and display them with the rather funky Slimbox tool. Click on one of the photos and see what I mean. Slimbox, as well as looking great, allows you to navigate back and forth if you hover your mouse over the top left and top right of the picture.</p>
<p>The widget itself has a number of configurable options which are easy to set up and change. At the moment they include:</p>
<ul>
<li>API Key</li>
<li>API Secret</li>
<li>Set ID</li>
<li>Number of photos</li>
<li>Photos per row</li>
</ul>
<p>Before I release the widget I&#8217;ll be adding some more options, including the Flickr username and an ability to style how the thumbnails are displayed. At the moment they are just 50px squares.</p>
<p>Stayed tuned for more phpFlickr fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.richardshepherd.com/phpflickr-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
