Remove the Dropbox context menu entry

Recently in an update to the Mac OS X Dropbox client they added a ‘Move to Dropbox’ right click menu entry (without asking).

Continue reading

Barefoot Running

I’ve been running ‘barefoot style’ for nearly a year now. The important part of running ‘barefoot style’ is actually having a fore/mid foot strike rather than actually running with nothing on your feet. The aim is to get away from a heel strike, which is the common way people run in regular supportive running shoes. A heel strike is close to impossible to do barefoot (or in minimal footwear). Continue reading

Remove the WordPress Admin Bar in your theme

I don’t know who decided to include the admin bar by default in your theme/front end when logged in to WordPress, but I find it really irritating when laying out a new theme.

I just want to see how my theme looks and behaves! The admin bar means you worry if anything will be affected when logged out. Continue reading

Mozilla Thunderbird UI Going Downhill

Although Mozilla announced they would no longer be supporting their Thunderbird mail client as of last summer, it remained in my mind a decent free client, especially for Windows where decent free mail clients seem hard to find.

This week when I had the opportunity to escape Microsoft Outlook I downloaded Thunderbird and discovered however that some sloppy, ugly UI has crept in. The worst of this is the new rounded tabs. Continue reading

Set a custom home screen title for your website on iOS devices

Here’s a neat little trick I’ve just learned. I’ve been setting up all the different icon sizes on mtvan.com for iPhone and iPad (including retina displays) for when you ‘Add to Home Screen’ and got the icons all working nicely.

The only thing that bugged me was my title tag. ‘mtvan – Courier Work and Networking for the Sameday Courier Industry’ is descriptive, accurate, great for Google and users alike however gets truncated the you add to home screen – far from ideal. Continue reading

iOS App Icon Names & Sizes

Just a quick reference to the names and sizes required for iOS app icons. The format is always .png.

Here’s a list with the file name and the icon size in pixels.

iPhone and iPod

  • Application Icon for iPhone (retina display) – Icon@2x.png 114×114
  • Application Icon icon for iPhone – Icon.png 57×57
  • Settings/Spotlight icon for iPhone (retina display) – Icon-Small@2x.png 58×58
  • Settings/Spotlight icon for iPhone – Icon-Small.png 29×29
  • Launch image Portrait (retina display) – Default@2x.png 640×960
  • Launch image Portrait – Default.png 320×480

iPad

  • Application Icon for the new iPad (retina display) – Icon-72@2x.png 144×144
  • Application Icon for the iPad – Icon-72.png 72×72
  • Settings/Spotlight icon for iPad – Icon-Small-50@2x.png 100×100
  • Settings/Spotlight icon for iPad – Icon-Small-50.png 50×50
  • Launch image Portrait (retina display) – Default-Portrait@2x.png 1536×2008
  • Launch image Portrait – Default-Portrait.png 768×1004
  • Launch image Landscape (retina display) – Default-Landscape@2x.png 2048×1496
  • Launch image Landscape – Default-Landscape.png 1024×748

iTunes App Store

  • App icon for the App Store (retina display) – iTunesArtwork@2x.png 1024×1024
  • App icon for the App Store – iTunesArtwork.png 512×512

Allow PHP to send mail in Fedora

Just run into this one as I’ve been configuring a new server.

On a fairly standard Fedora set-up it’s likely that the reason you can’t send emails from a PHP script is in fact because SELinux is stopping  Apache (httpd). This applies to both sending with Sendmail, and sending via SMTP.

You’ll need to run the following commands as root to fix the problem:

$ setsebool -P httpd_can_sendmail 1
$ /etc/init.d/httpd restart

mtvan courier directory redesign

Following on from the mtvan booking page, the next update I’ve been working on is the long overdue revamp of the courier directory. This part of the site provides a listing of owner drivers and courier companies for other site members.

It ought to allow members to quickly find others with required skills and availability in the desired location. Unfortunately the old version struggled a little to achieve that.

What we had to beat

The old directory provided a paged listing of all the members on the site. It allowed re-sorting by whatever location you chose to enter. However it was built before we’d implemented a really solid ‘service types’ matrix, so selecting skills was not possible. You could also search against company names and first/last names – it was a little hit and miss though. As it was one of my first ventures into using AJAX, it was a bit heavy and annoyingly didn’t save state – it was not possible to select a courier and then hit ‘back’ and be where you left off. Oh, and the SQL queries were not fantastic so that slowed things down too!

The new mtvan courier directory

So… what have we done for the new page (above) then?

Combined SQL Queries

The new page also displays our empty couriers, as well as the directory. Despite doing more, we now perform just 2 queries to the database and bring back only what we need. Previously a lot of logic was performed in PHP before a result was calculated.  Now all that is sorted before any data comes back. It’s really very fast now.

Sort by any column (almost)

The new directory is sortable by any column (apart from the ones that don’t make sense to sort by). It’s intuitive and helps you find what you want ASAP.

Display Service Types Offered

We now provide a full listing of all service types members can handle. You can drill down results by service type too.

Trusted Status

This was one of our very old ideas that got binned. Now we realise better the value of being able to create your own ‘favorite’ list of couriers. This is now included: you can add and remove your trusted members with just one click. It’s all AJAX so things get done on the fly. Again, you can drill down to display just your trusted members only too. We plan to build on this feature heavily in the future.

Saves State

If you navigate away from the page and go ‘back’, the state is as you left it. You can try the next search result rather than having to refill the form.

Give it a try

The courier directory is free to use for anyone in the transport and logistics industry. Get started on mtvan and start building your business relationships today.

Update 18/05/2011: You can check out more about the courier directory here.

Time Zone Conversion Using PHP DateTime Class

Following on from my post last month about problems with PEAR daylight saving, here’s a quick example of using the PHP DateTime Class which was introduced recently (PHP 5.2).

Convert from UTC to Europe/London local time:

$time_object = new DateTime('2011-04-19 17:45', new DateTimeZone('UTC'));
$time_object->setTimezone(new DateTimeZone('Europe/London'));
$LondonDateTime = $time_object->format('Y-m-d H:i:s');

This will work with daylight saving too.

Here’s that example wrapped up in a handy time zone conversion function:

function convert_time_zone($date_time, $from_tz, $to_tz)
	{
	$time_object = new DateTime($date_time, new DateTimeZone($from_tz));
	$time_object->setTimezone(new DateTimeZone($to_tz));
	return $time_object->format('Y-m-d H:i:s');
	}

New mtvan booking page

I’ve just finished putting the final touches on a new mtvan booking page.

It replaces a rather old and clunky version that I did when I was first starting out building dynamic websites in PHP. So what have I improved…

Minimised Required Fields

The old page required the user to provide all sorts of information: Customer details, booking reference number, short description, collection address, collection postcode, delivery address and delivery postcode! This obviously presents the user with a bit of a hurdle to overcome. The new page just asks for a collection postcode and a delivery postcode as that’s all we need to create a booking. The main aim of this was to reduce the arduous form filling that some of our busy vendors don’t have the time for.

Minimised Visual Weight

There’s a lot of different data that can be useful to collect about a courier work booking. Unfortunately even if completion is optional, a big long form can be rather daunting to the user. The new form has a default ‘quick’ layout, which can be expanded to a detailed view if required. The state the page is left in is recorded in our user table for next time they visit the page.

Improved Page Submission Speed

Previously when the booking form was submitted, we went away and did all sorts of clever things geocoding and looking up time zones etc. Except as the server had to make various calls to multiple services, this was not so clever. Although it was bearable, it did add a good few seconds to the submission time. The new page minimises the required calls, and the ones it does make it performs in a separate PHP fork, so as not to affect the user experience. The form submission is now instant.

Reassuring Animations and Feedback

The new page takes advantage of jQuery to slide open various options when the user requests something or selects an option that is going to require a little more data. Previously we would just show/hide via addresses, but these are now animated. Not only is it more cute to use, I think it makes it far more obvious what just happened when an option was selected.

There are loads more little improvements here and there (too many to list here), but if you’re in the transport and logistics industry and have excess work that needs covering, you can give it a try over at mtvan now – it’s free.