My Twitter

Archive for the ‘Coding’ Category

Q&A: Dealing With XML, Telling A Friend They Got ‘Had’

Friday, May 29th, 2009

This is a Q&A section where I answer some questions I have been asked.

Dealing With XML

Question: Is there a quick and easy built in function in PHP to convert XML to an array?

In short yet, assuming the XML your trying to sieve through is not too complex the simplexml_load_file() function should be able to handle your needs.

Telling a friend they got ‘had’

Question: A colleague of mine recently went about starting his own .com, unfortunately the Designer/Coder they used was awful (for some reason, they did not ask me as well). Basically they paid (a large sum of money) to have a wordpress blog with a tacky (and invalid) design slapped on top of it. Should I tell them they got ripped off, and if yes how should I go about it?

This is quite a sensitive subject, on the one hand they have been seriously ripped off (unclosed tags is not forgivable), but on the other hand they also may not take too kindly to finding out that their website is about as useful as  a burning boat.

I suggest showing your friend his website in another web browser, generally if the coding sucks it should render incorrectly. Hopefully the little nudge in the right direction should set the ball rolling in terms of fixing the problems. If they don’t fix it (or ignore the problem), their loss.

Building a Print CSS

Thursday, May 21st, 2009

CSS sheets revolutionized the way websites are managed and created; they essentially made managing the design a piece of cake.

However, many webmasters (and blog lords) forget to add a print sheet (many of the themes for wordpress lack even a simple CSS print sheet). Here is a quick video tutorial on creating a simple print CSS really quickly.

(more…)

Internet Statistics – April 2009 (and IE6 Death Date)

Wednesday, May 13th, 2009

Overall April was quite an eventful month for the OS and Browser wars. On the OS front, Windows 7 (Win7) release candidate was made available to the public, which has received quite a positive response. Microsoft also started advertising how cost effective windows machines are in their “I’m a PC” advertisement campaign.

Browser wise, webmaster have been encouraged by Google to inform their IE6 users about the alternative browser available and the disadvantages of IE6. The effect this has had on IE6 users is debatable, but overall IE6 is slowly disappearing.

(more…)

The Google Chart API

Saturday, May 9th, 2009


This is a simple pie chart

Google offers Webmasters an easy solution to create simple or and quite complex graphs in the Google Chart API section of the Developers Guide. It is quite simple to use, if you want to create an image such as above, just link to the following image:

]http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Pie|Not%20Pie

(more…)

Making a simple Facebook Application

Tuesday, May 5th, 2009

In this quick tutorial I’m going to show you how to make a simple “return all” application for facebook. Before you start take a look at the Facebook Developers page and the Facebook Developers Wiki as it’s full of useful stuff.

The Core Components

  • API – Lets you talk to the facebook servers. [put picture here explaining in detail]
  • FBML – Facebook markup language, it’s like a cute little html snippet which facebook turns into normal HTML.
  • XFBML – A javascript which lets you use FBML in iframes.
  • FQL – Lets you run SQL type query’s.
  • FBJS – This changes your javascript so you can only work within a close environment.
  • PHP Client Libraries – The PHP Facebook provides to communicate with their servers.

(more…)