Custom Wordpress Theme

It’s taken a while, but I achieved my goal I set for myself this weekend: to complete my first custom Wordpress theme for the website. And to top it all I’m actually very happy with the outcome!

Saying this I’ve not yet implemented any of my WP To-do List - I’ll get round to those two items in September.

How did I find creating a custom theme from scratch? Not back actually. Kudos goes to the Wordpress team for making such an easy-to-theme application - the Codex helped immensely when trying to find out which ‘tag’ to use to get the desired result.

What’s my favourite part of the theme? It’s got to be the Admin Bar (not that you see it as it’s only visible when the admin person is logged in). When logged in the About text is replaced by administration options. To get an idea of what I mean have a look at the screenshot below (animated):

Wordpress Adminbar demonstration

What would my tips be for anyone wishing to create a custom theme? Here they are:

  1. Have a look through the code of other themes you like the functionality of - quite often someone has already done what you’d like to achieve.
  2. Search the Codex site - it has ALL the answers.
  3. Persevere - it’s worth it in the end!

Finally, if anyone has any questions about how I achieved anything on the theme please feel free to either leave a comment, or use the contact page - I’ll happily try to answer your questions.

I’ve tested the theme in Internet Explorer 6, Firefox 1.5.0.6 and Opera 9.01 (all on Windows) - if you’re a Mac user please let me know if there seems to be any oddities when viewing the theme. Thanks.

Only In South Africa

Just saw this news item on the BBC website about how the South African police minister was quoted saying:

“If you don’t have a car, ride a bicycle or a donkey,”

in response to police who said they don’t have transport to investigate crimes.

And South Africa is hosting the 2010 World Cup…

jQuery 1.0 Released

I’m pleased to see that jQuery has finally gone to version 1.0! If you don’t know what jQuery is and you’re a web developer then you’re really missing out on a great Javascript Library that will make your coding of Javascript alot easier.

There are also a host of plugins available that extend this useful collection.

Be sure to check it out!

Noah In 2006

This was emailed to me the other day and I thought I’d share it with everyone:

In the year 2006, the Lord came unto Noah, who was now living in England and said, “Once again, the earth has become wicked and over-populated, and I see the end of all flesh before me. Build another Ark and save 2 of every living thing, along with a few good humans.”

He gave Noah the CAD drawings, saying, “You have 6 months to build the Ark before I will start the unending rain for 40 days and 40 nights.”

Six months later, the Lord looked down and saw Noah weeping in his yard - but no Ark.

“Noah!” He roared, “I’m about to start the rain! Where is the Ark?”

“Forgive me, Lord,” begged Noah, “but things have changed. I needed Building Regulations Approval because the Ark was over 30m2. I’ve been arguing with the Fire Brigade about the need for a sprinkler system.
My neighbours claim that I should have obtained planning permission prior to building the Ark in my garden because it is development of the site even though in my view it is a temporary structure, but the roof is too high. I had to appeal to the Secretary of State  for a decision.

The Local Area Access Group complained that my ramp was going to be too steep, and the inside of the Ark wasn’t fully accessible, then the Department of Transport demanded a bond be posted for the future costs of moving power lines and other overhead obstructions, to clear the passage for the Ark’s move to the sea. I told them that the sea would be coming to us, but they would hear nothing of it.

Getting the wood was another problem. All the decent trees have Tree Preservation Orders on them and we live in a Site of Special Scientific Interest set up  in order to  protect  the spotted owl. I tried to convince the environmentalists that I needed the wood to save the owls - but no go!

When I started gathering the animals, the RSPCA sued me.

They insisted that I was confining wild animals against their will - arguing the accommodation was too restrictive, and it was cruel and inhumane to put so many animals in a confined space.

Then the  County Council, the Environment Agency  and the Rivers Authority ruled that I couldn’t build the Ark until they’d conducted an environmental impact study on your proposed flood.

I’m still trying to resolve a complaint with the  Equal Opportunities Commission on how many BMEs I’m supposed to hire for my building team.

The trades unions say I can’t use my sons. They insist I have to hire only CSCS accredited workers with Ark-building experience.

To make matters worse, the Customs and Excise seized all my assets, claiming I’m trying to leave the country illegally with endangered species.

So, forgive me, Lord, but it would take at least 10 years for me to finish this Ark.”

Suddenly the skies cleared, the sun began to shine, and a rainbow stretched across the sky. Noah looked up in wonder and asked, “You mean you’re not going to destroy the world?”

“No,” said the Lord. “The government already beat me to it.”

ColdFusion Folder Gallery

A while ago I had the need for a very simple way to display images in a folder using ColdFusion. So, I thought I’d share a very simple application with you all that does just that. And as an added bonus I’ve included the Lightbox javascript enhancement to the application.

Below is a screenshot of how it should all look.

CF Folder Gallery

Download the cf_foldergallery.zip file - this file is 1.5mb in size due the images used in the example.

Mewebdev.net Updated

Well, after my delay I’ve finally released the latest version of mewebdev.net.

mewebdev

At first glance you may think “What took so long? There’s not much to the website!”

Which is true - it’s now a single page website. The part that took extra time was researching what to do with the structure change and search engines. This is something I’ve never really thought about before. It turns out the best thing to do is a 301 redirect, as that informs the search engine that the page has permanently moved to a new location (the search engine should then update it’s links). I’ll monitor how this works.

As usual, please let me know what you think to the update.

ColdFusion and AJAX Edit In Place

Earlier this week I created a project that had a very basic CMS administration area - this consisted of updating the status of a car (whether it’s available or sold) and also the ability to change the car’s price.

Having recently fallen in love with Flickr I thought it would be great to have a Flickr-like ability when editting the prices - i.e. click on the price and it becomes a form field which allows you to update the price without refreshing the whole page.

So, after much research I’ve managed to implement this with the help of the Prototype Javascript Library and Joesph Scott’s Edit In Place add-on.

Here’s a screenshot to give you an idea of what I mean:

Edit In Place example

I’ve also packaged a simple example of this technique - but taken one step further; all the database records (except for the ID) are edittable. This should give you plenty to sink your teeth in.

Download cf_editinplace.rar file or Download cf_editinplace.zip file

Update: the above archives now include a debug form. That’s one of the joys of AJAX is trying to debug the application. Hopefully the debug form will make this a little easier.

I welcome your comments.