A global telephone directory

Added on: Saturday 28th February 2009

From 24th March everyone will be able to register a .tel domain. This new top level domain is very different to all the others that are currently used though.

The idea of the new .tel domain is that it is used to store contact information for companies or individuals.

You might argue that this is already done by having a website on any of the other domains.

The difference though is that you won't need a website as the details are stored directly in the DNS. You can think of this as similar to doing a whois lookup at the moment - the owner, admin and technical contact details are all stored against this record.

With a .com or .co.uk domain for example when someone requests a URL the DNS looks up the location of the page and this is then loaded into the users browser.

The .tel domain doesn't need to forward you to a slow loading website but simply loads all the contact information for that company or individual into your internet enabled device (it could be a mobile phone or palm top device).

So what are the advantages in this? It is being touted as a single point of  contact for a company or individual enabling them to publish all their contact details such as telephone numbers, fax numbers, email addresses, website links etc and also include location information and keywords for search engines. In short a global directory.

Will it work? As with any directory or listing it will only really be useful if it is taken up by the majority and there seems to be little or no hype relating to it at the moment even though priority registration has been available since early December.

Also, as of the time of writing you can't access any .tel domains from a web browser and a google search on companies such as IBM or even Google itself doesn't present a .tel result.

It seems as if most people are waiting to see what will happen before they jump on board and at the moment its just another 'must have marketing tool' being forced on them.

The difference though is that it will use the DNS system which is the backbone of the Internet so it is tried and tested technology which so far has proved extremely reliable.

I must admit that I will be watching this closely as I like the idea of a single, easily updatable point of contact and if it is universally adopted it will revolutionise the way we get information. Whether it will replace the likes of Google, Facebook etc as marketing tools is another debate.

Internet Explorer reserved word problem

Added on: Wednesday 25th February 2009

I was working on an update to some software the other day and while it worked fine in Firefox and Opera it kept throwing up a javascript error in Internet Explorer.

I am always hopeful that one day there will be a time that you can create a web application knowing that it will look and operate exactly the same across all browsers without the need for extensive testing in each one.

Unfortunately this won't happen soon so for the time being we are stuck with applying fixes for the various shortcomings and vagaries of modern browsers.

To cut a long story short, when I finally tracked down the error it had nothing to do with javascript at all.

The problem appears to be that I had an element on the page that I had given an id of 'tags' (because I was updating the tags field for a record via AJAX).

Simply changing the id of this element to something other than 'tags' solved the problem, so it seems that this is probably a reserved word for IE.

It was only afterwards that I did a search on Google (probably because I didn't know what I was looking for initially) and found some references to javascript print errors to do with an id of 'tags'. 

Your website and the law

Added on: Tuesday 24th February 2009

Besides the obvious one of making sure you own the copyright (or are licensing it) on all content on your website there are several other issues you need to be aware of - even on the smallest website.

I went to an interesting seminar last week that discussed the legal issues involved with setting up and running a website.

In addition to copyright, you will need to think about disability discrimination - (can disabled users get access to the same material as anyone else?), data protection - (are you processing personal information on your site - the answer is probably yes!), email marketing - (do you have an opt IN policy and not an opt OUT for anyone signing up to receive newsletters or other correspondence?) .

You also need to make sure that there are contact details somewhere on the site and for companies the registration and VAT numbers should be displayed.

See these sites for more information:

Information Commissioners Office

The Privacy and Electronic Communications Directive 2003

Web accessibility

A hidden gem in PHP

Added on: Friday 20th February 2009

One of the most common tasks when developing websites or online applications is date manipulation. You might for example need to create a list of memberships due to expire within the next month.

Of course PHP has plenty of date/time manipulation functions you can use but there is one called strtotime (string to time) that is very underrated.

The description in the manual says - Parse about any English textual datetime description into a Unix timestamp

A timestamp is simply a numeric representation of a date and it is this value that can be used to compare two dates or add a number of days, weeks, years etc.

I have been using strtotime for years but up until recently it was mainly to convert dates pulled from a database (as they are retrieved as strings).

If I wanted to work out the date in a months time I would use mktime. For example:

$dt = mktime(0,0,0,date("m")+1,date("d"), date("Y"));

This is not too complicated but it still has three other function calls (to date()) within it.

Consider however this alternative:

$dt = strtotime("next month");

A bit simpler, eh?

As the description says you can use just about any English textual datetime description. I tracked down a reference giving some information on the date input formats but essentially you can use common phrases such as 'Monday', 'next week', 'last year', '1 month', '1 day ago'.

By default the function calculates the timestamp from the current date and time but you can also include as a second parameter a timestamp from which to calculate the new date from.

I discovered this whilst looking for an easy way for users to add tasks to our contact management software. I wanted a way for people who were away from their office to be able to add a task or reminder by email from their Blackberry or iPhone.

This had to be as simple as possible - the email is sent to a specific address with the due date of the task or reminder in the subject and the details in the subject.

I thought a nice touch would be to allow users to put tomorrow or next friday in the subject and I thought I'd have to write a function to process these into dates - but then I discovered that it was already done. Fantastic!

Screen capture of web pages

Added on: Wednesday 18th February 2009

Have you ever needed to take a screen grab of a web page you are viewing? You can press the Print Screen button but if you want to edit anything you have to load it into your image editing software.

There is an excellent tool called Fireshot available as an add on to both the Firefox and Internet Explorer browsers.

One of the best things about it is that it enables you to grab the entire page in one go even if it scrolls off the screen.

There are also some fairly sophisticated editing facilities built in that allow you to crop the image, add annotations and apply other effects.

One I use all the time is the blur tool. I can quickly take a copy of a web page and obscure any sensitive information before emailing it or uploading it to the web.

A built in email button converts the capture into an image and attachs it to an email - what could be easier. And if you do need more powerful editing options you can save it to a file and load it into your main image editing software.

Here's one I made earlier (of adding this article to my blog)

Fireshot screengrab

Visit the Fireshot site for more information.

Database Conversion

Added on: Friday 13th February 2009

If you find yourself frequently moving data between different types of databases then you can either write a script to do it or you can use one of the many utilities available.

I've been converting a lot of Microsoft Access databases to MySQL recently as customers want their software applications to be available online.

Although I have developed a script that I can use to do this it is a bit rough around the edges and I haven't had time to refine it at all so I usually end up with quite a bit of additional tidying up to do on the data.

So, the other day I thought I'd see what was available on the Internet. In the past I've tried various programs but have always found them lacking in certain areas (or not working at all).

To my surprise though I found a piece of software - Access To MySQL - by a company called Bullzip

Unlike a lot of other utilities it doesn't try to be clever and only does the one type of conversion but that is all I wanted.

I have to say I am really impressed - its very simple, fast and more or less foolproof. As well as all this the software is Freeware so may be used free of charge for non-commercial purposes.

I will do some more testing but it looks like this might become a valuable tool for me.

Fantastic Book Offer

Added on: Wednesday 11th February 2009

If you want a good deal on books about web design and marketing take a look at the fantastic offer on Sitepoint at the moment. But HURRY its only on until this Friday.

As the owner of half a dozen Sitepoint titles, I can vouch for the fact that all their titles are very informative and of a high standard.

Their offer is for 5 books for the price of 1. These are PDF downloads and Sitepoint are giving 100% of the sale proceedsto the Australian Red Cross Victorian Bushfire Appeal.

So hurry over to take advantage of this time limited offer. I know I will be!

Video screen capture

Added on: Tuesday 10th February 2009

If you ever need to record a video tutorial of something on your screen then this great online application is the ideal tool

Screen Toaster is a FREE online video screen capture tool. It is fairly basic but that means it is easy to use.

Once you have created an account you just click the Record link and it downloads a small applet onto your computer.

Once this is installed a dialog pops up and when you click Start Recording you have five seconds to get to the page you want to record.

You can use audio and subtitles but at the moment there is no way of exporting the file with either of these options so the video has to be hosted with screen toaster.

There is an option to upload to youtube but this is still experimental and doesn't work that well.

Anyhow, I'm going to be exploring more as I am wanting to create video tutorials for our content management system, contact management software and email marketing package.

For now though here is my first attempt at using this software:

Resizing Photographs for your website

Added on: Thursday 5th February 2009

Most modern digital cameras nowadays have very high resolutions which means that the photos are larger than most computer screens let alone web pages.

Even when displaying larger pop up images from a thumbnail in a photo gallery you only need a resolution of 800 x 600 pixels - unless perhaps you are selling photographs online in which case you should have some sort of watermark to prevent downloading.

Although many website content management systems allow you to resize images via the administration area, you still have to upload the file first and with typical sizes of 3+MB this may take some time.

Try to upload half a dozen or so together and you'll probably be timed out or be told you've exceeded the maximum file size.

There are lots of tools around that can be used to resize images on your PC but most of these come with a huge number of options to rename the resized images, save or overwrite the original etc.

Here is a little used way to easily resize a group of photos in Windows without any additional software. The method below describes how to do this in Windows XP but Vista will be similar.

Firstly, go to the folder with the photos in and select the ones you want to resize. Once the selection is complete click the right mouse button on one of the photos and select Send To > and then Mail Recipient.

Emailing Photographs

A window will then pop up options to make the photos smaller or keep at the original size. The Make all my pictures smaller option is selected by default.

If you click the Show more options... link at the bottom of the window you will see a list of three sizes - Small, Medium or Large. Small is the default but Medium is also OK for websites.

Photo Sizes

Select the size and click OK. This then generates a new email message with the photos as attachments.

At this stage there is no need to send the email (although you can of course use this option for sending to other people) but you can simply select File > Save Attachments... from the menu in your email software.

Select a new folder to put them in and you now have a set of photos resized ready for your website.

So, how do you get them on to your website? Well thats the subject of another posting but our content management system has a secret weapon that makes this very easy!

Sorting photos by date taken

Added on: Wednesday 4th February 2009

I had a bit of a disaster last night whilst trying to get all my digital photos into a web based gallery and needed a quick bit of code to fix it.

The gallery uses a MySQL database and has a facility to index new photos that have been downloaded into a new folder.

Once the images have been indexed by the database they are moved from the download folder and renamed to match the reference in the database.

I made a stupid mistake when using this and managed to rename all the existing photos so that they no longer matched the database reference.

Not a major problem you might think as it is easy to write a quick php script to rename all the files in a folder.

However, the database also contains metadata about the photos and the new filenames no longer sorted into date taken order as they would have done when first indexed.

Exif to the rescue

Luckily, php has a set of functions to extract the 'exif' data from a digital photo and using the read_exif_data function I was able to get the 'DateTimeOriginal' value for each photo.

It was easy enough to load these into an array, sort them and then loop through the array and rename the files.

So 10 minutes later I had my photo gallery back to the state it was in before I messed it up.

I've put the code in a text file for use by anyone who wants to do this.

Is your software weatherproof

Added on: Tuesday 3rd February 2009

As some parts of the country experience the worst winter weather for 20 years can your business cope if no one can get into the office?

Car in snowUnlike North America or other European countries, a little snowfall here seems to disrupt the entire transport system.

This means that many people can't get into the office so businesses are running at reduced capacity or in some cases not at all.

However, with the increasing availability of broadband connections and web based software many companies are now able to operate from anywhere with access to the Internet.

Obviously, if the business relies heavily on transport and delivery or needs key workers in the field then this isn't going to help but much of the administration could still be done online.

It is much easier than you might think to put your existing system online and our online contact management software has many of the features needed already included as core modules.

And because its modular the only customisation required is for specialised areas of your business.

As I sit here writing this the snow is once again falling heavily outside but I don't have to go anywhere!

A font with holes in

Added on: Monday 2nd February 2009

A company in Holland have come up with a new font that they say will save on ink costs by cutting down the printable area on each letter.

The font called the Ecofont is similar to the Verdana font but each letter has a series of holes in it - thus in theory requiring less ink.

However, many people have said that although the font is freely downloadable, the quality of printed documents that use it is not good enough for publication.

So what will it be used for? Printing out internal emails and memos?

Although the company should be applauded for the idea shouldn't we really be encouraging people not to print emails in the first place?

That's why we are constantly developing our online contact management software so that the information is available to all users without having to print it.

You can find out more about (and download) the Ecofont here.