Archive for September, 2008

The latest thing to dropbox

Friday, September 12th, 2008

Dropbox has just come out of testing and is now a public release. It’s a method of keeping files synchronised across as many different devices as you install it on, PC, Mac or Linux, and even if you’re not at one of your own, there’s a web interface too (with a visual design not dissimilar to Facebook). The attractions of Dropbox for teams or people who work across several sites are obvious, and you can share public links to files in your Dropbox, meaning for instance you could share files with clients. It’s a bit like a Subversion repository, but it doesn’t merge changes or check for conflicts: it just saves a new version of the document with the option to restore a previous one. That said, it’s certainly a good place to keep invoices or project plans where several people might need access but there needs to be a definitive version.

The real usefulness of Dropbox will emerge over time; for now, it’s certainly easy to use and understand, which is half the battle.

Fair trade news

Friday, September 5th, 2008

I’ve just added a news section to Hand Up Media’s site, bringing in the latest in the fair trade world as supplied by the BBC and the Guardian. HUM previously had an HTML-only host, so the only way to include this news section was using javascript. Two problems – no javascript, no news, and also search engines, which rate fresh content highly, generally don’t run javascript.
Their host eventually upgraded and offered PHP, so I took the opportunity to grab the feeds on the server side, solving both those problems. PHP5 has much improved XML parsing over previous versions: the simplexml_load_file function reads in an xml file and makes it available as an object:


$bbc = "http://newsapi.bbc.co.uk/feeds/search/news+sport/fairtrade";
$bbcrss = simplexml_load_file($bbc);

Then, in the case of RSS, take the item element and loop through its contents:

$bbcitems = $bbcrss->channel->item;
foreach ($bbcitems as $item){
$item->source='the BBC';
if (time() - strtotime($item->pubDate) < 5259487){
$news[]=$item;
}
}

Also in there, I just check that the story is less than two months old before adding it to the $news array, and add a ’source’ element because that’s not included in the RSS in any proper form. Last thing to do (after adding news from other sources to the same array) is to sort it in date order using usort:

function _cmpAscA($m, $n) {
if (strtotime($m->pubDate) == strtotime($n->pubDate)) {
return 0;
}
return (strtotime($m->pubDate) > strtotime($n->pubDate)) ? -1 : 1;
}
usort($news,'_cmpAscA');

This function takes the array and a function as arguments: the function checks each element’s pubDate value (converting it to a UNIX timestamp) and changing its order in the original array accordingly. Then all that remains is to output it in a list and style it up…

Screencasting

Friday, September 5th, 2008

I thought it might be interesting to put a moving portfolio image as my ‘featured project’ on the front page of the site. I needed to capture a 950px-wide website, and end up with a 600px-wide SWF. I tried a few different applications:-

RenderSoft’s CamStudio can capture direct to AVI or SWF (SWF was what I ultimately wanted) but neither gave the option to resize the video (I wanted to reduce the image from 950px wide to 600px). TechSmith’s Jing is a much more 2.0 type of affair, but while it seems really useful for quickly getting a point across over something like MSN, again it lacks resizing options. Nice app and well worth checking out; but not right for this.

Debugmode’s Wink is free and really easy to configure, at least for these purposes. It lets you choose the area of the screen you want to capture, then just press shift+pause and away you go. Then you can adjust the size of the resulting frames, delete frames and do whatever you need to do before rendering it as a reasonably lightweight SWF. It takes a few goes to get something reasonable, but if you’re not doing an actual screencast, with audio and timings, it’s a nice quick job.

James McKay

Friday, September 5th, 2008

Congratulations to James McKay, whose portfolio sites I recently completed: he’s moving to Norway and needed one site to arouse interest in potential employers and the other to show them his work when he popped over to Oslo a couple of weeks ago. And, at the first attempt, he landed a job, so all that meticulous work and the long hours paid off! Have a look at www.james-mckay.com

Search the blog

You are currently browsing the pobo.org blog archives for September, 2008.

Categories

contact

accessibility

Access keys: press alt (Windows)/ ctrl (Mac)

+ 0 to skip to navigation

+ 1 to skip to main content

+ 2 to return to the home page

+ 3 to increase font size

+ 4 to decrease font size

(followed by Enter if using IE)

modify

click to increase font size

click to decrease font size