Sort any XML file in PHP with one XSL

September 3rd, 2010

I feel I’ve now earned the particular distinction of having participated in a cage match with an XML file and beaten its bloody face in. Sure, they’re pretty nifty for storing collections of data and laying them out on web sites, but you don’t get the full experience until you have to create a web interface to edit, insert, delete, and sort said XML file. Honestly, it would have been easier just to store the data in a PHP array. But hell, I love a good cage match! My biggest problem was that anytime I would edit or insert an event element, it would appear in the XML file as the last node rather than in date order. I figured out how to sort the XML contents as they were rendered in HTML using an XSLT (EXtensible Stylesheet Language Transformation). This worked fine for one display but sadly, this XML needed to be displayed several different ways in different places and I wasn’t thrilled with the thought of having to create an XSL file for every variation. All I really needed was one XSL file to sort the XML data each time it was updated. So I wrapped rope around my hands, coated them with resin, dipped them in broken glass, and stepped into the cage.

 

Posted in PHP Scripts | No Comments »

Stunning Nature Photography

August 27th, 2010

After looking through her photo gallery, it’s hard to think of Magdalena Wasiczek (aka “nikx”) as just a photographer. She is a camera wizard! She was featured in an article on Digital Foto Video where she explains some of her techniques and experimentation. I don’t think I’ve ever seen bugs look more beautiful. Head on over to her website and see for yourself. You won’t be disappointed. I’ve put a few of my favorites on display here.

Wasiczek

 

Posted in Science & Nature | No Comments »

Custom WordPress Plugins

August 25th, 2010

WordPressI was looking through my site stats over the past few weeks (nothing to brag about I assure you) and noticed a disturbing trend. Most of the hits on my blog are the result of searches for various topics. I realized most of those topics are related to blog posts which no longer display on my site homepage. I imagine most people are really confused as to why my site came up in their search results if the page doesn’t mention what they are looking for. I suppose I could have put a search box on my site, but I’m not particularly fond of them and besides, my site only has like 25 posts max so there really isn’t a lot of content. I currently only display the seven most recent posts on my homepage. I wanted a way to provide links to the posts which have fallen off the homepage. I couldn’t find a plugin that would do this for me, so I decided to write my own.

 

Posted in PHP Scripts, WordPress | No Comments »

MK12 – “Telephoneme”

August 19th, 2010

I stumbled upon this fun little video at vimeo.com the other day. I’m not sure how “scientific” it is, but it is certainly entertaining.

Posted in Science & Nature | No Comments »

Illustrations by Zso (Sara Blake)

August 10th, 2010

I was sent merrily off to this website via a link tweeted by Pat Cartelli (@shnoobles) a few weeks back. I can work all sorts of magic in Photoshop, but I’m not particularly good at drawing things by hand. Sara Blake is! Also known simply as “Zso”, Sara is an Interactive Art Director, Designer, and Illustrator from New York City. Here are a few of my favorites. You can view more of her work on her website www.hellozso.com.

Sara Blake

 

Posted in Art & Design | No Comments »

Pendulum – “Watercolour”

August 3rd, 2010

Every three minutes and thirty-three seconds today, I’ve had to stop what I was doing, switch back over to the tab in my web browser with this video in it and press “play” again. Yes, it’s that addictive. It’s from the new Pendulum album “Immersion” which was released in the UK this past May but is not yet available on iTunes. This tune rocks seriously. Can’t wait to hear the rest of the album.

Posted in Music | No Comments »

Losers – “Flush”

July 29th, 2010

The official video for Losers’ (XFM’s Eddy Temple-Morris and ex-Cooper Temple Clause frontman Tom Bellamy) new single Flush, out April 5th on Distiller Records. Directed and Animated by Tom Werber, featuring the artwork of Dan Hillier. Additional animation and by David Gray, Yasmin Moktarzadeh and Sarah Harris.

Posted in Music | No Comments »

Next Page »