The Link

The project
I’ve had an ongoing relationship with Tim Matcham for a while now, having done a little maintenance here and there on The Garden Network over the past year. Tim approached me with a view to giving his site a bit of an overhaul, and wanted to incorporate his wordpress hosted blog at the same time.
With limitations imposed by his current hosting provider, Tim decided to move to my servers and asked me to organise the migration of his site and blog and to sugest possible ideas for a ‘freshen up’. After a brief discussion, we decided that the best course of action would be to hack around an existing theme to get it to look and function in the way we wanted. This gave a site that reflected Tim’s branding, but with minimal development costs.
The Geek Stuff
The site has been built using Wordpress as a content management system (CMS), and uses a modified version of the Cutline Wordpress Theme and various pre-built plugins including WP-sIFR. The WP export tool made bringing across all the blog posts, pages and comments an absolute breeze, until a bunch of folks decided to add more comments before I had a chance to go live. This meant trying to grab just a handful of comments from a sprawling XML file to import. Quite a pain – it would be nice to see some functionality added to the export tool in WP that allowed limitation my date or post type. All or Nothing can prove quite problematic at times. Still, we get by…
Safe.
Posted: March 7th, 2010
Categories:
Projects,
Web Development,
Wordpress
Tags:
Comments:
No Comments.
The Link

The Project
The purpose of this site was simple, to provide an upcoming gig listing, a contact form, an MP3 player and links to the various social networking sites that the band are involved in. Expandability was key, with future plans to incorporate photo galleries and online sales to be kept in mind.
After stripping the content down to its bare essentials, I decided that anything other than a single page would be unnecessary. A sense of ‘web-site’ rather than ‘web-page’ was created by spreading the content across a large area and using an up/down auto-scrolling navigation.
The Flavours needed a site to reflect their DIY eithic, but one that also captured their individuality and irreverent sense of fun. The minimal use of colour and the use of ‘courier’ and hand-drawn fonts kept the site ‘lo-fi’, and the strong areas of black/white contrast create a striking visual effect, especially when flying past the screen on the auto-scroll.
The Geek Stuff
Site management needed to be kept as simple as possible for the guys, so the ‘random player’ (hats off to premiumbeat for the OS love) is based on a PHP script that picks a random mp3 file that has been uploaded into a perticular directory on the server, and then grabs all the other info necessary from the metatags of the file.
The gig guide reads from a spreadsheet uploaded to the same directory, and automatically wipes any listings that are in the past.
Obviously a big helping of JQuery and associated plugins, the detail of which I’ll go into at a later point.
Peace.
Posted: February 6th, 2010
Categories:
Projects,
Web Design,
Web Development
Tags:
Comments:
No Comments.
The Link

The project
I was approached by John (the Chippy!) of JTC Carpentry & Construction for a minimal website that would cement his online presence a little, to work alongside his Trust-a-trader profile and facebook pages.
John came up with the logo himself, from which the concept for the site design wasn’t too much of a giant leap.
Quite specifically after a minimal site design, all John wanted was the a page with some information about his company (that he could edit himself), a contact form and a gallery area, to which he could upload images with captions.
The Geek Stuff
The site has been built using Wordpress as a content management system (CMS), and my own WP configuration which will allow John to expand the site at a later date should he decide it is appropriate, and I’ve also made use of JQuery and a bunch of plugins, more details on those later…
I’ve based the WP theme around HTML5, but had to buckle a little bit to get the lightbox effect to work correctly, although with a little more attention I think this will run fine with the new HTML 5 block level element as opposed to the generic <div> containers. I’ve also implemented a little bit of PHP based browser sniffing to leave the Javascript off mobile devices, as the MopBox didn’t seem to translate so well to the smaller screen. That’s one for the to-do list right there.
Safe.
Posted: February 6th, 2010
Categories:
Projects,
Web Design,
Web Development,
Wordpress
Tags:
Comments:
No Comments.
Edit:As of recent changes (7/2/2010) to FB, this is no longer working for me. You might have better luck. Why don’t facebook just make this stuff available?
Edit: This method has worked for my account and several others, but fails for some people. If you are greeted with the message “This feed URL is no longer valid. Visit this page to find the new URL, if you have access, http://www.facebook.com/minifeed.php?status&id=XXXXXX” or something similar then you are one of those unfortunate people. Currently looking into a solution for this problem… anyone found it?
I’m working on a ‘lifestream’ plugin for the next version of my website, and hit a little bit of a wall when trying to lay my grubby little paws on an RSS feed of my personal status updates on Facebook.
Although they don’t seem to publicise it on the site, there appear to be RSS feeds available by direct access of almost everything we post. It’s pretty obvious really. The only issue is finding the URL of the feeds.
For a personal page
The simplest way to do this that worked for me (although browsing around there appear to be some people experiencing difficulty) was as follows:
- Open up your notifications pop-up in the bottom right of your facebook window and choose ‘view all’
- Copy the link location of the ‘Subscribe to Notification > Via RSS’ option on the right of the page (something like – ‘http://www.facebook.com/feeds/notifications.php?id=123456789&viewer=1234567898&key=98765432a&format=rss20′
- Change it from http://www.facebook.com/feeds/notifications.php?id=123456789&viewer=1234567898&key=98765432a&format=rss20 to http://www.facebook.com/feeds/status.php?id=123456789&viewer=1234567898&key=98765432a&format=rss20 and paste into any RSS reader
- Check you privacy settings – The feed will only display status updates that are marked as being viewable by ‘Everyone’. ‘Friends Only’ status updates will not appear in the Feed. You can set this in your privacy settings, but also on each individual update as you post it.
There are other feeds accessible in a similar manner to this, but for my purposes I’ll not confuse the issue.
For a fan page
MUCH simpler:
- Paste the RSS url http://www.facebook.com/feeds/page.php?format=rss20&id=xxxxxxxxx (where ‘id=’ the ID of your facebook fan page – found in the address bar when you view your page) into any RSS reader
- If you’ve already set up your own vanity URL for your page, you can grab your page ID by logging in and clicking ‘Edit Page’. You’l find it tagged on to the url in the address bar.
And there you have it. From researching this, it appears Facebook have a habit of relocating the RSS Feeds without telling anyone – probably why they don’t publicise them too heavily – so you might find that these stop working in the future, but for now I’m all good to go in my project and hope I’ve helped you with yours.
Cheers,
Neil
Posted: January 19th, 2010
Categories:
Web Development
Tags:
Comments:
7 Comments.
If you’re reading this page then you’re already likely familiar with the standard PHP for, while and foreach loops. If not, then may I suggest some background reading first – http://www.php.net/manual/en/language.control-structures.php.
That said, I added a new weapon to my PHP arsenal today in the form of a better understanding of the break command.
I’ve used the break command before of course – it sits inside switch statements to stop each case running into the next one as below:
-
switch ($i) {
-
case "apple":
-
-
break;
-
case "bar":
-
-
break;
-
case "cake":
-
-
break;
-
}
But I didn’t realise that it can be used within any loop to stop the cycle continuing there and then.
This came in handy today when needing to perform a particular loop 8 times only. Normally one would just use a for loop, as that is what they’re -um- ‘for’, but in this instance I wanted to iterate across an array 8 times only. In essence, I wanted a foreach loop to run 8 times and then stop, regardless of how many items it contained.
Usually I would have either used array_slice() to reduce the array to 8 elements only, or introduced a counter and an if statement to my foreach loop as follows:
-
$i = 0;
-
foreach($array as $value){
-
if($i < 8){
-
-
}
-
$i++;
-
}
Whilst this would work, it’s not an ideal solution because the foreach statement needs to perform the logical test ‘if $i < 8' for every item in the array - of which there could potentially be thousands. Which is where break comes in. Changing my foreach loop to the following…
-
$i = 0;
-
foreach($array as $value){
-
if(++$i == 8) break; //edit suggested by CHris
-
-
}
means that as soon as the loop hits the ninth iteration (when $i is equal to 8) the break command is executed and the loop stops. No unnecessary iterations, and in my opinion much tidier code – which is always a good thing in my book!
Posted: January 6th, 2010
Categories:
PHP,
Web Development
Tags:
Comments:
2 Comments.