<?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>Stephen McIntyre &#187; The Web</title>
	<atom:link href="http://stephenmcintyre.net/category/blog/the-web/feed/" rel="self" type="application/rss+xml" />
	<link>http://stephenmcintyre.net</link>
	<description>Young Scottish Web Designer</description>
	<lastBuildDate>Thu, 10 Jun 2010 15:25:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Load WordPress Gravatars on the Fly</title>
		<link>http://stephenmcintyre.net/blog/load-gravatars-on-the-fly/</link>
		<comments>http://stephenmcintyre.net/blog/load-gravatars-on-the-fly/#comments</comments>
		<pubDate>Thu, 06 May 2010 23:22:36 +0000</pubDate>
		<dc:creator>Stephen McIntyre</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://stephenmcintyre.net/?p=475</guid>
		<description><![CDATA[Globally Recognised Avatar (or Gravatar) is a service from the WordPress team that allows you to improve your web presence across blogs and specialist websites. It&#8217;s one of those &#8220;why didn&#8217;t I think of that?&#8221; products that are so simple but yet have so much opportunity to be integrated into virtually everything. You can see [...]]]></description>
			<content:encoded><![CDATA[<p>Globally Recognised Avatar (or <a href="http://gravatar.com" target="_blank">Gravatar</a>) is a service from the WordPress team that allows you to improve your web presence across blogs and specialist websites. It&#8217;s one of those &#8220;why didn&#8217;t I think of that?&#8221; products that are so simple but yet have so much opportunity to be integrated into virtually everything. You can see examples of this from the comments below and in my sidebar.</p>
<p>The problem with Gravatars that I find a lot of people mentioning is that they don&#8217;t get to see their Gravatar before they post a comment &#8211; like the <a href="http://www.shamusyoung.com/twentysidedtale/?p=1462#comments">comments section</a> on Shamus Young&#8217;s Wavatar post.</p>
<p>You may not think that&#8217;s too big of a deal, or perhaps from a marketing point of view that&#8217;s your way of driving comments (nasty people), but allowing them to play about with their image in the form will improve their relationship with your site and increase traffic anyway. Saves people deleting and re-commenting just because their Gravatar didn&#8217;t show up right too.</p>
<p>So this week I&#8217;ve put together a little script that generates these little Gravatars as you type. It&#8217;s even got little <a href="http://www.shamusyoung.com/twentysidedtale/?p=1462" target="_blank">Wavatar</a> faces on them that change when you make a new address, so you&#8217;ll never get bored!<span id="more-475"></span></p>
<p>Here&#8217;s the <a href="/examples/gravatar/">demo</a>.</p>
<p>So for this, we need some kind of an MD5 encryption algorithm, as the Gravatar API needs this to secure its e-mail addresses.</p>
<p>I&#8217;ve used a script from <a href="http://www.webtoolkit.info/javascript-md5.html">webtoolkit</a> that does the job perfectly.</p>
<p>The script&#8217;s over 200 lines long and you can find it <a href="/examples/gravatar/webtoolkit-md5.js">here</a>. I&#8217;ve included it in the script as an external file for easiness.</p>
<h2>Setting Up</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;gravatar&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;80&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;80&quot;</span> <span style="color: #000066;">alt</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Gravatar&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;email&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;webtoolkit-md5.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></td></tr></table></div>

<p>Here we have our image, the input box, and the script tag that includes the MD5 script.</p>
<p>The Gravatar&#8217;s <code>src</code> will change when you start typing in the input field. It uses only a few lines of JavaScript.</p>
<h2>Working JavaScript&#8217;s Magic</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> gravatar <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'gravatar'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> email <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
email.<span style="color: #660066;">onkeyup</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> key <span style="color: #339933;">=</span> MD5<span style="color: #009900;">&#40;</span>email.<span style="color: #660066;">value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    gravatar.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://www.gravatar.com/avatar/'</span><span style="color: #339933;">+</span>key<span style="color: #339933;">+</span><span style="color: #3366CC;">'?s=80&amp;d=wavatar'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p><strong>Lines 3 and 5</strong> fetch references to our image and input box to control them with the rest of our JavaScript.</p>
<p><strong>Line 7</strong> sets an <code>onkeyup</code> handler on the email field that is fired when a key is released.</p>
<p><strong>Line 8</strong> uses the webtoolkit MD5 algorithm and generates a key. We then pass this key into the Gravatar&#8217;s source and it shows our image. If it&#8217;s all worked out, this is where you should be seeing your own lovely face <img src='http://stephenmcintyre.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The quicker the user can interact with your application the better. This script allows you to generate Gravatar&#8217;s on the fly as the user types it, giving them results straight away.</p>
<p>For practice, try adding things like event timers to decrease the number of image changes at a time, or set the event to <code>onblur</code> so that it only ever fires when the focus is taken away from the field (good for comment forms).</p>
<p>And also, with their recent addition of Gravatar profiles that contain even more information, maybe &#8211; with a little more JavaScript &#8211; the email address will be all you ever need to type.</p>
<p>Happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenmcintyre.net/blog/load-gravatars-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Create Social Bookmarks with the AddThis API</title>
		<link>http://stephenmcintyre.net/blog/addthis-api-social-bookmarks/</link>
		<comments>http://stephenmcintyre.net/blog/addthis-api-social-bookmarks/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 21:05:02 +0000</pubDate>
		<dc:creator>Stephen McIntyre</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[The Web]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://stephenmcintyre.net/?p=361</guid>
		<description><![CDATA[One service that I had used a while back was AddThis social bookmarks. I really liked its ease of use, support for a huge range of social networks and bookmarking sites, and most importantly it had great tools for analytics.
The social bar itself however left more to be desired. It was an eyesore, appearing after [...]]]></description>
			<content:encoded><![CDATA[<p>One service that I had used a while back was <a href="http://www.addthis.com">AddThis</a> social bookmarks. I really liked its ease of use, support for a huge range of <strong>social networks</strong> and <strong>bookmarking</strong> sites, and most importantly it had great tools for <strong>analytics</strong>.</p>
<p>The social bar itself however left more to be desired. It was an eyesore, appearing after every post on my site, and made me cringe at the fact that it <strong>relied on JavaScript</strong> to function. Luckily, I found an alternative in the form of their API docs.<span id="more-361"></span></p>
<p>You can see this for yourself in the <a href="#share">social bar</a> below this post. Check out the links as you hover over the images, they&#8217;re constructed exactly as I will show you here.</p>
<h3>Finding the Link</h3>
<p>The trick here is as simple as tweaking a URL.</p>
<p><code>http://api.addthis.com/oexchange/0.8/offer?url=<strong>URL</strong></code></p>
<p>This is the most basic option of the API. It sends us to a page in which we can <strong>choose</strong> where we want to share the link. It&#8217;s good if you have a simple &#8220;Share This&#8221; button, but not if we want different links to specific social networks. Plus, we won&#8217;t get that analytics data.</p>
<p>In the above example, just replace <code>URL</code> with your page&#8217;s location.</p>
<p><a href="http://api.addthis.com/oexchange/0.8/offer?url=http://stephenmcintyre.net">http://api.addthis.com/oexchange/0.8/offer?url=<strong>http://stephenmcintyre.net</strong></a></p>
<p>Now we&#8217;ll add a title and user name. For this we add another two URL parameters. Just replace URL, title and user name like before.</p>
<p><a href="http://api.addthis.com/oexchange/0.8/offer?url=http://stephenmcintyre.net&#038;title=Stephen+McIntyre&#038;username=StephenMcIntyre">http://api.addthis.com/oexchange/0.8/offer?url=<strong>http://stephenmcintyre.net</strong>&amp;title=<strong>Stephen+McIntyre</strong>&amp;username=<strong>StephenMcIntyre</strong></a></p>
<p>And lastly, where we want to specify where we are going to take the user we need to add <code>forward/SERVICE/</code> into our link.</p>
<p><a href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=http://stephenmcintyre.net&#038;title=Stephen+McIntyre&#038;username=StephenMcIntyre">http://api.addthis.com/oexchange/0.8/forward/<strong>facebook</strong>/offer?url=<strong>http://stephenmcintyre.net</strong>&amp;title=<strong>Stephen+McIntyre</strong>&amp;username=<strong>StephenMcIntyre</strong></a></p>
<p>The link above will take you straight to Facebook, formatting the data to easily post the page up onto your wall.</p>
<h3>A Simple Example</h3>
<p>So, for a full implementation of this API we can use a list of hyperlinks like in my social bar, and styled how you like them.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://api.addthis.com/oexchange/0.8/forward/twitter/offer?url=http%3A%2F%2Fstephenmcintyre.net&amp;amp;title=Stephen+McIntyre&amp;amp;username=StephenMcIntyre&quot;</span>&gt;</span>Twitter<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=http%3A%2F%2Fstephenmcintyre.net&amp;amp;title=Stephen+McIntyre&amp;amp;username=StephenMcIntyre&quot;</span>&gt;</span>Facebook<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://api.addthis.com/oexchange/0.8/forward/digg/offer?url=http%3A%2F%2Fstephenmcintyre.net&amp;amp;title=Stephen+McIntyre&amp;amp;username=StephenMcIntyre&quot;</span>&gt;</span>Digg<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://api.addthis.com/oexchange/0.8/forward/delicious/offer?url=http%3A%2F%2Fstephenmcintyre.net&amp;amp;title=Stephen+McIntyre&amp;amp;username=StephenMcIntyre&quot;</span>&gt;</span>Delicious<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></td></tr></table></div>

<p>For a full list of service tags to use in the <code>SERVICE</code> section of the URL, check out the <a href="http://www.addthis.com/services/list">service codes</a> page on the AddThis docs. You can copy the short codes from each row, there&#8217;s loads to choose from.</p>
<p>More information on the <a href="http://www.addthis.com/help/sharing-api">sharing endpoints</a> can also be found on there, which will help if you&#8217;re looking to dig further into the API.</p>
<h3>One Last Thing</h3>
<p>So as you can see, the links can get pretty long. If you&#8217;re inputting these manually, even a copy-paste job can be tedious, especially if you plan to go about dotting them all over your website.</p>
<p>The ideal situation then would be to generate these automatically, which can be done through PHP with some <a href="http://php.net/urlencode">urlencode</a> magic.</p>
<p>Also, if you&#8217;re using WordPress, then fetching the link and title is easy with <code>get_permalink()</code> and <code>$post-&gt;post_title</code> respectively.</p>
<p>I&#8217;ll be releasing a tool that utilises the AddThis API very soon, and adding some tutorials on here as to how it&#8217;s done, including some clever PHP.</p>
<p>Stay posted. <img src='http://stephenmcintyre.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stephenmcintyre.net/blog/addthis-api-social-bookmarks/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Parsing the Kongregate Badge Feed with PHP</title>
		<link>http://stephenmcintyre.net/blog/kongregate-badge-feed-php/</link>
		<comments>http://stephenmcintyre.net/blog/kongregate-badge-feed-php/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 22:38:29 +0000</pubDate>
		<dc:creator>Stephen McIntyre</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://stephenmcintyre.net/?p=350</guid>
		<description><![CDATA[Back in September of last year, Jim Greer of Kongregate.com posted an article in the forums about a new badge data service served in JSON. This was great news for developers, we could finally grab data from our user accounts without having to do a web scrape on our user page.
However, this forum post seems [...]]]></description>
			<content:encoded><![CDATA[<p>Back in September of last year, <a href="http://www.kongregate.com/accounts/jimgreer">Jim Greer of Kongregate.com</a> posted an article in the forums about a new badge data service served in JSON. This was great news for developers, we could finally grab data from our user accounts without having to do a <a href="http://wikipedia.org/wiki/Web_scraping">web scrape</a> on our user page.</p>
<p>However, this <a href="http://www.kongregate.com/forums/4-programming/topics/58167-new-json-feed-of-badge-info">forum post</a> seems to be the only official documentation on what is a very interesting data feed, so it is with this reason that I decided to create this beginner&#8217;s tutorial on how to use it.<span id="more-350"></span></p>
<p>Since Kongregate is a website that hosts Flash games, this data would primarily be used to collect data into such games &#8211; like showing user badges embedded into a Flash dashboard. In this tutorial, I will take a different approach and show you how to collect that data in PHP and build your own activity stream.</p>
<h3>All Badges Feed</h3>
<p>Located at <code>http://www.kongregate.com/badges.json</code></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
  <span style="color: #3366CC;">&quot;description&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Collect 100 squiggles and pwn 10 spiders&quot;</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;users_count&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">285194</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;name&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Running Start&quot;</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;games&quot;</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #3366CC;">&quot;url&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://www.kongregate.com/games/DrNeroCF/fancy-pants-adventure-world-2&quot;</span><span style="color: #339933;">,</span>
      <span style="color: #3366CC;">&quot;title&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Fancy Pants Adventure: World 2&quot;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;icon_url&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;http://cdn2.kongregate.com/badge_icons/0000/0367/world2easy.png?1242937128&quot;</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;created_at&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;2008/01/24 20:26:15 -0800&quot;</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;points&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">5</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;difficulty&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;easy&quot;</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;id&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">184</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This is an example of an item from the list of game badges in the feed. It contains more than enough information to help make your own application. Each element is labeled so that you can index and call each item when you need to. Further down I&#8217;ll show you how to sort out the data in PHP.</p>
<h3>User Badges Feed</h3>
<p>Can be found at <code>http://www.kongregate.com/accounts/USERNAME/badges.json</code>, replacing USERNAME with your account login name.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#123;</span>
  <span style="color: #3366CC;">&quot;badge_id&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">184</span><span style="color: #339933;">,</span>
  <span style="color: #3366CC;">&quot;created_at&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;2008/06/23 06:20:42 -0700&quot;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>A much simpler looking JSON string. A user&#8217;s badge feed only contains a list of badge IDs and the date and time that the user achieved them. All other data can be found on the global badge feed above, we just match up the IDs.</p>
<h3>Grabbing the Data</h3>
<p>Last week I showed you <a href="/blog/fetch-content-using-php/">how to fetch page content using PHP</a>. We can reuse the <code>get_page_content</code> method here to collect our information from Kongregate. Be sure to add this method above all other code in your PHP file, before adding the content from the box below.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$all_badges_content</span> <span style="color: #339933;">=</span> get_page_content<span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">&quot;http://www.kongregate.com/badges.json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$all_badges</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$all_badges_content</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>
&nbsp;
<span style="color: #000088;">$user_badges_content</span> <span style="color: #339933;">=</span> get_page_content<span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">&quot;http://www.kongregate.com/accounts/USERNAME/badges.json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$user_badges</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_badges_content</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></pre></td></tr></table></div>

<p>This sets up two arrays (<code>$all_badges</code> and <code>$user_badges</code>) that we can use to loop through and match IDs.</p>
<h3>Displaying the Content</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ol&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_badges</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$badge</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$all_badges</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$badge</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'badge_id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span>
        <span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'games'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span>
            <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_COMPAT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' Badge'</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;span&gt;'</span><span style="color: #339933;">.</span>
            <span style="color: #0000ff;">' : '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_COMPAT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$badge</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">break</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: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/ol&gt;'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>For each user badge in the <code>$user_badges</code> array we loop through our global badges to find a match and print an output of badge, link, and description to the page.</p>
<p>The break and unset in this code is useful for reducing memory usage on the script.</p>
<p>The break exits the current loop when the badges have been matched &#8211; since we won&#8217;t need to keep looking once we have found what we are looking for.</p>
<p>The unset removes the item from our list of all badges completely, since once it has been found once we won&#8217;t ever need to match it again since we can only have one of each badge.</p>
<h3>Finishing Up</h3>
<p>For a full copy-paste version of the code, feel free to skip to the end of this article, or view a <a href="/examples/kong-badges/">demo page</a> of this script.</p>
<p>Note: the demo page is a rendered example of the end result and does not update. For markup purposes only.</p>
<p>Also note that reading the JSON data directly from the server in this way is not recommended. For better use of this data, please store and manage the information within your own database setup.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</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: #000000; font-weight: bold;">function</span> get_page_content<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$resource</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resource</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resource</span><span style="color: #339933;">,</span> CURLOPT_HEADER<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resource</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<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>
&nbsp;
  <span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_exec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resource</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resource</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">return</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$all_badges_content</span> <span style="color: #339933;">=</span> get_page_content<span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">&quot;http://www.kongregate.com/badges.json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$all_badges</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$all_badges_content</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>
&nbsp;
<span style="color: #000088;">$user_badges_content</span> <span style="color: #339933;">=</span> get_page_content<span style="color: #009900;">&#40;</span>
  <span style="color: #0000ff;">&quot;http://www.kongregate.com/accounts/USERNAME/badges.json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$user_badges</span> <span style="color: #339933;">=</span> <span style="color: #990000;">json_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_badges_content</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>
&nbsp;
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;ol&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$user_badges</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$badge</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$all_badges</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$badge</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'badge_id'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">echo</span>
        <span style="color: #0000ff;">'&lt;li&gt;'</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;a href=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'games'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">.</span>
            <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_COMPAT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">' Badge'</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;/a&gt;'</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;span&gt;'</span><span style="color: #339933;">.</span>
            <span style="color: #0000ff;">' : '</span> <span style="color: #339933;">.</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$global</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'description'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_COMPAT</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>
          <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">.</span>
        <span style="color: #0000ff;">'&lt;/li&gt;'</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$badge</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">break</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: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/ol&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://stephenmcintyre.net/blog/kongregate-badge-feed-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Auto-Post Your Blog to Twitter and Facebook</title>
		<link>http://stephenmcintyre.net/blog/auto-post-your-blog-to-twitter-and-facebook/</link>
		<comments>http://stephenmcintyre.net/blog/auto-post-your-blog-to-twitter-and-facebook/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 09:00:34 +0000</pubDate>
		<dc:creator>Stephen McIntyre</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://stephenmcintyre.net/?p=270</guid>
		<description><![CDATA[Okay, so you&#8217;ve gone through those guides on setting up your new weblog, and followed all the advice on using social media to leverage your site into becoming über-successful overnight. The problem now is that those two elements are still detached. You&#8217;re posting all that relevant content on your website but nobody is around to [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so you&#8217;ve gone through those guides on setting up your new weblog, and followed all the advice on using social media to leverage your site into becoming über-successful overnight. The problem now is that those two elements are still <strong>detached</strong>. You&#8217;re posting all that relevant content on your website but nobody is around to click those links that direct to all that beautiful material.</p>
<p>This is not an article on improving your follower count or the &#8220;top 10 ways to drive traffic with <a href="http://wikipedia.org/wiki/Search_engine_optimization">SEO</a>&#8220;, but it will definitely help in a different way. Today, I&#8217;ll show you how to <strong>automatically</strong> post your blog articles straight to your Twitter and Facebook accounts using your <a href="http://wikipedia.org/wiki/RSS">RSS</a> feed as a stream.</p>
<p>For those of you writing <a href="http://search.twitter.com/search?q=%23daily365">#daily365</a> articles, or have signed up for <a href="http://project52.info">Project52</a>, this will be ideal. Let the computers do the work for you.</p>
<p>The service I use for this is called <a href="http://twitterfeed.com">TwitterFeed</a>, which you&#8217;ll need an account for. It&#8217;s all <strong>super easy</strong> and I&#8217;ll explain it after the jump. So anyway, here we go.<span id="more-270"></span></p>
<h3>Logging In</h3>
<p>If you like, you can sign up to their service with the usual form by clicking &#8220;sign up&#8221; at the top of the page. If you&#8217;re already signed in to Google, Blogger, WordPress.com, or OpenID though it&#8217;s as simple as clicking the picture you like the look of.</p>
<p>Find the &#8220;Sign In with OpenID&#8221; at the bottom of the homepage near the big &#8220;Login&#8221; button if you&#8217;re doing it this way. The box below will show up (with some other options for accounts) and run some fancy AJAX.</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_1.png"><img class="aligncenter size-full wp-image-272" title="twfeed_1" src="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_1.png" alt="" width="300" height="205" /></a></p>
<h3>Setting Up</h3>
<p>Once that&#8217;s done your dashboard will show up with a page like this.</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_2.png"><img class="aligncenter size-full wp-image-274" title="twfeed_2" src="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_2.png" alt="" width="530" height="273" /></a></p>
<p><strong>Feed Name:</strong> If you&#8217;re only using one blog this won&#8217;t matter as it&#8217;s only to tell the difference between the feeds you&#8217;re using within your own account. Others won&#8217;t see this.</p>
<p><strong>RSS Feed URL:</strong> For example, <a href="http://stephenmcintyre.net/feed">http://stephenmcintyre.net/feed</a>. This will be different for your own setup.</p>
<p>If you use a WordPress.com blog, the URL will be</p>
<pre>http://BLOGNAME.wordpress.com/feed</pre>
<p>Or if you use Blogger</p>
<pre>http://BLOGNAME.blogspot.com/feeds/posts/default?alt=rss</pre>
<p>Make sure to use the feed testing button before you continue.</p>
<p><strong>Active:</strong> Keep this ticked for now, but it&#8217;s a switch that allows you to stop the service reading it later on.</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_3.png"><img class="aligncenter size-full wp-image-276" title="twfeed_3" src="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_3.png" alt="" width="530" height="351" /></a></p>
<p><strong>Update Frequency:</strong> Even if you don&#8217;t post 5 times every 30 minutes, it&#8217;s probably best you set it to this, at least the half-hour part. It means that your posts will be sent to your social networks within half an hour of them being posted, keeping your friends and followers up to date.</p>
<p><strong>Post Content:</strong> I chose to just post the title, but it&#8217;s up to you. Description adds in an excerpt from the beginning of your article.</p>
<p><strong>Post Link:</strong> Something you definitely want to set up. Any service will do, but with <a href="http://bit.ly">bit.ly</a> you can generate analytics on the click-throughs and track its retweets. Great tool. You can use your username and API key here from your bit.ly account.</p>
<p><strong>Post Sorting:</strong> &#8220;pubDate&#8221; puts your latest posts first and &#8220;guid&#8221; sorts them alphabetically. You want to use pubDate for this.</p>
<p><strong>Post Suffix and Prefix:</strong> Statements to add to the start and end of your tweets and shares. Makes it easier for your readers to tell the difference between your blog posts and other links.</p>
<p><strong>Keyword Filter:</strong> Haven&#8217;t needed to exclude any posts from being sent so never used this. From what I understand you put pre-defined keywords into your posts to allow them to be sent by TwitterFeed. Handy if you have multiple types of content being fed into one RSS feed.</p>
<p>When you&#8217;re done you can click the &#8220;Continue to Step 2&#8243; button.</p>
<h3>Sync Up</h3>
<p>On the next page you can choose the accounts that you want to allow access to. In this example I&#8217;ll use Twitter, but others are just as simple.</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_4.png"><img class="aligncenter size-full wp-image-279" title="twfeed_4" src="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_4.png" alt="" width="530" height="261" /></a></p>
<p>Using their OAuth service, connecting to Twitter is as simple as clicking the blue button above, which prompts this screen.</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_6.png"><img class="aligncenter size-full wp-image-281" title="twfeed_6" src="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_6.png" alt="" width="540" height="259" /></a></p>
<p>If a login screen comes up, you can enter your details from there. Otherwise, clicking on the green &#8220;Allow&#8221; button will synchronise both accounts for you, taking you back to the previous menu.</p>
<p>If you&#8217;re using Twitter for driving a Google Analytics campaign, you can type some info in the UTM tags to track it. Otherwise you can skip it and click &#8220;Create Service&#8221;.</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_5.png"><img class="aligncenter size-full wp-image-280" title="twfeed_5" src="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_5.png" alt="" width="530" height="176" /></a></p>
<h3>Done</h3>
<p>So there you go, everything&#8217;s set. Now you can sit back and watch those viewers flock to your site, now with no effort on your part!*</p>
<p><a style="text-decoration: none;" href="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_7.png"><img class="aligncenter size-full wp-image-282" title="twfeed_7" src="http://stephenmcintyre.net/wp-content/uploads/2010/01/twfeed_7.png" alt="" width="540" height="225" /></a></p>
<p>*Well you&#8217;ve still to write that content, mind</p>
]]></content:encoded>
			<wfw:commentRss>http://stephenmcintyre.net/blog/auto-post-your-blog-to-twitter-and-facebook/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I&#8217;m a Twit</title>
		<link>http://stephenmcintyre.net/blog/im-a-twit/</link>
		<comments>http://stephenmcintyre.net/blog/im-a-twit/#comments</comments>
		<pubDate>Wed, 20 May 2009 05:56:57 +0000</pubDate>
		<dc:creator>Stephen McIntyre</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://stephenmcintyre.net/?p=109</guid>
		<description><![CDATA[Or is it twitee? Or twitterer&#8230;?
Either way my lack of sleep has lead me onto Twitter tonight and I signed up for a shiny new account on it. Thought it best to put my caffeine-induced insomnia to some use.


One of the first things I noticed about it was it&#8217;s difficult to get the user name [...]]]></description>
			<content:encoded><![CDATA[<p>Or is it twitee? Or twitterer&#8230;?</p>
<p>Either way my lack of sleep has lead me onto <a href="http://www.twitter.com">Twitter</a> tonight and I signed up for a shiny new account on it. Thought it best to put my caffeine-induced insomnia to some use.</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2009/05/twitface.jpg"><img src="http://stephenmcintyre.net/wp-content/uploads/2009/05/twitface.jpg" alt="twitface" title="twitface" width="300" height="170" class="aligncenter size-full wp-image-97" /></a><br />
<span id="more-109"></span><br />
One of the first things I noticed about it was it&#8217;s difficult to get the user name I wanted. Maybe it&#8217;s just me having an apparently common name but even countless variations on it didn&#8217;t give me much joy. And I know how important it is today to have the proper web names associated with yourself (it was hard enough getting this domain name, and turns out it&#8217;s just as difficult to get a twitter user name).</p>
<p>But anyway enough of that.</p>
<p>I settled on the (appropriate for those that know me) name of <a href="http://twitter.com/_bigsteve">@_bigsteve</a>, uploaded a profile picture (which Twitter told me was a nice one ^-^), and set up a Twitter updater for my feeds that should hopefully post this, and every other post for that matter, onto my account.</p>
<p>So yeah, don&#8217;t be shy and hit me up when you get the chance. I&#8217;m sure my replies will be somewhat informative or at the very least amusing.</p>
<p>Cheers and happy Tweeting <img src='http://stephenmcintyre.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stephenmcintyre.net/blog/im-a-twit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding your perfect wallpaper with Google Image Search</title>
		<link>http://stephenmcintyre.net/blog/finding-your-perfect-wallpaper-with-google-image-search/</link>
		<comments>http://stephenmcintyre.net/blog/finding-your-perfect-wallpaper-with-google-image-search/#comments</comments>
		<pubDate>Fri, 01 May 2009 17:58:48 +0000</pubDate>
		<dc:creator>Stephen McIntyre</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[The Web]]></category>

		<guid isPermaLink="false">http://stephenmcintyre.net/?p=81</guid>
		<description><![CDATA[After finally getting round to fixing my desktop background today (which had something to do with the whole &#8220;display web page on your desktop&#8221; thing, that I&#8217;ll explain at the end for those that have this problem), I decided to have a look around the internet for a nice new image for it.
After a few [...]]]></description>
			<content:encoded><![CDATA[<p>After finally getting round to fixing my desktop background today (which had something to do with the whole &#8220;display web page on your desktop&#8221; thing, that I&#8217;ll explain at the end for those that have this problem), I decided to have a look around the internet for a nice new image for it.<span id="more-81"></span></p>
<p>After a few very miserable attempts at some &#8220;website&#8217;s own&#8221; search results, or having to rake through lists of them from each site&#8217;s different categories, I turned to Google Images.</p>
<p>It wasn&#8217;t until now that I had found such a great use for its new feature, the <a href="http://googleblog.blogspot.com/2009/04/search-rainbow.html">colour filter</a>, that you might have noticed on your own escapades into their image search pages. Looks a bit like this:</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2009/05/gi_aclist.jpg"><img src="http://stephenmcintyre.net/wp-content/uploads/2009/05/gi_aclist.jpg" alt="Google Image colour filter" title="Google Image colour filter" width="96" height="49" class="aligncenter size-full wp-image-82" /></a></p>
<p>This helps you get the general <a href="http://images.google.com/images?q=wallpaper&#038;imgcolor=orange">colour of background image</a> you want, should you have a preference. I liked this because, as far as I know, no desktop image download sites have this and it&#8217;s an option a lot of people would benefit from.</p>
<p>You can also click on <a href="http://images.google.com/advanced_image_search">Advanced Image Search</a> next to the search buttons like in the image below&#8230;</p>
<p><a href="http://stephenmcintyre.net/wp-content/uploads/2009/05/gi_aslink.jpg"><img src="http://stephenmcintyre.net/wp-content/uploads/2009/05/gi_aslink.jpg" alt="Google Images Advanced Search link" title="Google Images Advanced Search link" width="314" height="83" class="aligncenter size-full wp-image-83" /></a></p>
<p>&#8230;to use a wider range of options:</p>
<p><strong>Content types</strong><br />
For news content, faces, photo content and line drawings specifically</p>
<p><strong>Exact size</strong><br />
If you want it to be the precise size of your desktop (with a handy link to put them in itself if you don&#8217;t know the sizes off-hand)</p>
<p><strong>Filetypes</strong><br />
If you want it to be in a specific format (may improve quality if you don&#8217;t choose GIF and pick BMP instead, but it&#8217;s not always the case)</p>
<p><strong>Coloration</strong><br />
If you&#8217;re looking for black and white or grayscale images</p>
<p><strong>Domain</strong><br />
If you like the images on a site, but want a better search method</p>
<p>There&#8217;s also an experimental feature in Google Labs called <a href="http://similar-images.googlelabs.com/">Similar Images</a> which may also help you find what you&#8217;re looking for (although it doesn&#8217;t have all the options listed above, so it&#8217;ll have to be a one-or-the-other choice).</p>
<p>I can now safely say that I have a much better background than the black screen I had been living with recently, although it wouldn&#8217;t have taken much.</p>
<p><span id="skip"></span>Oh yeah, the background solution thing.</p>
<p>Basically I was getting a completely black background and whenever I tried to change the image it just stayed the way it was, although it seemed to be taking the time to load it in.</p>
<p>Right click your desktop and go to <code>Properties</code>,<br />
Click the <code>Desktop</code> tab then the <code>Customize Desktop...</code> button,<br />
If there&#8217;s a <code>Web</code> tab click on that then untick everything that&#8217;s on that page and <code>OK</code> your way out.</p>
<p>If not, you probably don&#8217;t have the same problem I did.</p>
<p>Good luck <img src='http://stephenmcintyre.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stephenmcintyre.net/blog/finding-your-perfect-wallpaper-with-google-image-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
