<?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>Things About Stuff: Food, Sounds, Comics and Waffle &#187; Java</title>
	<atom:link href="http://www.earth-x.co.uk/?feed=rss2&#038;tag=java" rel="self" type="application/rss+xml" />
	<link>http://www.earth-x.co.uk</link>
	<description>Braindrops from the Clouds of Earth-X</description>
	<lastBuildDate>Sat, 08 Jun 2013 18:23:55 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>The Return of Twitter</title>
		<link>http://www.earth-x.co.uk/?p=647</link>
		<comments>http://www.earth-x.co.uk/?p=647#comments</comments>
		<pubDate>Wed, 16 Jan 2013 12:45:47 +0000</pubDate>
		<dc:creator><![CDATA[Andy]]></dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.earth-x.co.uk/?p=647</guid>
		<description><![CDATA[After sporting a steampunk-esque &#8220;fail whale&#8221; on the front page for some time, following Twitters change of access specs that...]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.earth-x.co.uk/?attachment_id=648" rel="attachment wp-att-648"><img class="alignleft size-full wp-image-648" style="margin-left: 5px; margin-right: 5px;" alt="whale" src="http://www.earth-x.co.uk/wp-content/uploads/2013/01/whale.png" width="242" height="178" /></a>After sporting a steampunk-esque &#8220;fail whale&#8221; on the front page for some time, following Twitters change of access specs that blocked my previous PHP function from  working, the tweets are back.</p>
<p>I should really have been filling out job applications this morning, but got carried away with fixing this issue having acccidentally come across <a href="http://www.robertvenditti.com/" target="_blank">a site</a> that was clearly doing almst <em>exactly</em> what I wanted. A bit of searching after that led me to <a href="http://minitwitter.webdevdesigner.com/" target="_blank">Oliver Brechét&#8217;s page</a>, which contained the CSS, JQuery and brief explanation of how to apply the &#8220;widget&#8221;.</p>
<p>Although there is a WordPress version, these widget&#8217;s tend to knacker any preferred settings that I&#8217;ve already written in to the underlying PHP, so I added this by linking in the PHP itself, rather than using the WP widget.</p>
<p>I don&#8217;t quite follow 100% of the JQuery script (another item on my to do list!) but could garner enough of what was going on in it to rewrite it to fit my own, rather more sparse, needs. This also meant that a lot of the included CSS was unnecessary so could just be copied in to my main CSS sheet and adjusted for appearance (no header, no separator lines, no borders and no background). I imagine this is against Twitter&#8217;s new usage requirements and that I will thus soon be excommunicated&#8230;</p>
<p>Main change was to the fetchTweetsData function, edited down as follows, preceding lines to the first, italicised one unchanged:</p>
<pre><em>obj.finalText = $([linkURLs(obj.writeTweet, obj.entities)]).linkUser().linkHash()[0];</em>
obj.header = '';
obj.avatar = '&lt;div class="tweet"&gt;&lt;div class="avatar"&gt;&lt;a '+rel()+' '+target()+' href="'+obj.userUrl+'"&gt;&lt;/a&gt;&lt;/div&gt;';
obj.textTweet = '&lt;div class="mt_text"&gt;'+obj.finalText;
obj.footer = '&lt;div class="time"&gt;'+obj.tweetTime+'&lt;/div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;/div&gt;';
return obj;</pre>
<p>Consequently, the only CSS used was:</p>
<pre><span style="color: #ff00ff;">.tweets {</span>
 max-width:245px;
 max-height:150px;
 font:13px/17px "Tahoma",Helvetica,Arial,sans-serif;
 color:#CCC;
 background-color:transparent;
 margin:auto;
<span style="color: #ff00ff;">}</span></pre>
<pre><span style="color: #ff00ff;">.tweets a {</span>
 color:#d08702;
 text-decoration:none;
<span style="color: #ff00ff;">}</span></pre>
<pre><span style="color: #ff00ff;">.tweets a:hover {</span>
 color: #f7d274;
<span style="color: #ff00ff;">}</span></pre>
<pre><span style="color: #ff00ff;">.tweets .tweet {</span>
 padding-bottom: 15px;
 text-align: left;
<span style="color: #ff00ff;">}</span></pre>
<pre><span style="color: #ff00ff;">.tweets .tweet .time {</span>
 float:right;
 color:#999;
 font-size:11px;
 padding-left: 10px;
<span style="color: #ff00ff;">}</span></pre>
<pre><span style="color: #ff00ff;">.tweets .tweet .avatar {</span>
 display:block;
 float:left;
 background-image: url(images/tweet.png);
 height: 15px;
 width: 21px;
 background-repeat: no-repeat;
 background-position: top;
<span style="color: #ff00ff;">}</span>
<span style="color: #ff00ff;">.tweets .tweet .avatar a {</span>
 display:block;
 height: 15px;
 width: 21px;
<span style="color: #ff00ff;">}</span></pre>
<pre><span style="color: #ff00ff;">.mt_text {</span>
 padding-left:25px;
<span style="color: #ff00ff;">}</span></pre>
<p>&nbsp;</p>
<p>Excellent work, Mr Brechét, and thanks!</p>
<p><em>[Original code that inspired this and has slightly different, or broader, functionality, is <a href="http://tweet.seaofclouds.com/" target="_blank">here</a>]</em></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earth-x.co.uk/?feed=rss2&#038;p=647</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
