Getting Text Back From All Caps In Photoshop Elements (Not CAPS LOCK!)
After getting rather confused as to why my text layer in Photoshop Elements 6 would not budge from being in all caps (no not because of CAPS LOCK!) I discovered that to get it back to normal you need to do :
Mac :
Command ('Apple') + Shift + Y
Windows :
Ctrl + Shift + Y
This will put the text back to sentence case or lower case (whatever it should be before it was being forced into all caps)
moreHawes Through Time
Since I have been working on updating this site recently I thought I would delve into the history books (not really that far back) and look at the previous versions of my website.
Although slightly pointless, I have spent a fair bit of time making these so it’s nice to remember.
Version 1
Between around 2004 – 2005, I made this site before I even knew what programming really was, but that didn’t stop me wanting to be a web designer!

The site consisted of a simple 5-page site with a few fancy animated graphics. Still now I like how this site looks.
Version 2
Around 2005 – 2007. I knew a bit of PHP by now and decided that a new site was in order! Re-inventing the wheel slightly I write some scripts for comments, a basic forum and a few other twiddly bits.

Version 3
Around 2007 – 2008. Enter Drupal! I quickly realised the potential of using a content management system, though at this stage I was using it pretty much out of the box.

Version 4
2009 – 2010! Still using Drupal but heavily customised with my own theme. I have organised my content in more of a blog style with all sorts of fancy witchcraft working behind the scenes.

Version 5
2010 – present. Hello Wordpress! A complete re-write, re-design and migration to Wordpress. Since starting to use Wordpress it quickly because my CMS of choice with it’s long features list and great community support. It’s a tool that really makes publishing on the web a hassle-free task.

Tags: Internet • Me • Wordpress
Nochex Steal Your Money
For a client recently I had to test osCommerce was accepting Nochex payments. Having never used it before I went through the lengthy and painful process of signing up for a Nochex account.
Well now I know why no one used Nochex. It’s rubbish. It’s the only thing that would make me recommend Paypal (and I hate Paypal) to anyone but at least their service does what it is supposed to with minimum fuss.
OsCommerce was working fine and accepted my Nochex account but Nochex wouldn’t accept my address, so I was unable to put a card straight through (as a user without an existing Nochex account might). So I gave up on that as the client offers their own credit card gateway.
So I thought that was that – but when you add a credit/debit card to Nochex they debit a ’small’ amount from your card to help with their verification process. They didn’t go out of their way to tell you this when you register and they certainly don’t make it clear enough that this is non-refundable!
So there I was waiting for my couple of quid to get refunded only to discover it has been stolen. And for what? … other one for ‘the list’
Tags: Boycotts • Dislikes • Me • e-commerce • osCommerce
Web Usability – Even The Big Boys Get It Wrong
At work recently I have been looking into usability principles and in particular our checkout procedure. This consists of streamlining the process by reducing the number of hoops the user must jump through whilst trying to build confidence in the customer.
Whilst booking flights to Australia the other day I was surprised that even the big boys can get it wrong! Although the checkout procedure was smooth – this screen was the first thing I saw after I clicked the “pay” button:


Not exactly confidence building! This page is supposed to redirect the user to their card holders ’secure code’ page to prevent fraud and authorise payment. However when the re-direct doesn’t work a green screen with a form button seems to be enough to maintain the users confidence confidence!
Tags: Likes
Easily Generate Javascript and PHP Error Checking For Your Forms
I wanted a quick and easy way of adding Javascript and PHP error checking to my form elements. The benefit of this is that errors can be caught using Javascript before the form is submitted, but if JS is disabled in the users browser then the error is still caught using PHP.
The method I came up with to solve this is very simple and can be easily added to form elements with little extra code. The error checking is done by checking input against regular expressions.
See the demo and demo source code.
Code Explaination
One function is used to create both forms of error checking:
<?php $jsChecks = ""; //holds JS error checks $errorFound = false; //PHP error flag //Creates both JS and PHP error checks function errorCheck($elementName, $regExp, $errMsg) { global $jsChecks; global $errorFound; //Create Javascript error checking $check = ' var ' . $elementName . 'Filter = ' . $regExp . '; if (!' . $elementName . 'Filter.test(theForm.' . $elementName . '.value)) { errorMessage += "\n * ' . $errMsg . '"; errorFound = true; }' . "\n"; $jsChecks .= $check; //PHP error checking and return input class if(isset($_POST["formSubmitted"])) { //if form submitted if(!preg_match($regExp, $_POST[$elementName])) { $errorFound = true; return "error"; //css error class } } return ""; //no class if no error detected }
Error checking is created for the form elements specifying which element (by name), a regular expression to be checked against and a custom error message:
//Create error checking $nameError = errorCheck("name", "/([a-z0-9]{3}[a-z0-9]?)/", "Name is too short"); //Must be 3 chars or over $emailError = errorCheck("email", "/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i", "Invalid Email Address"); //must be valid email address
If no error is found then process the data.
//If no error found if(!$errorFound) { //Process form data... } ?>
In our head tags we add the following Javascript and CSS rules. The Javascipt checks we created for each element are included here by the PHP ehco:
<style type="text/css"> input { border: 1px solid #DDD; } .error { border: 1px dashed #F00; } </style> <script type="text/javascript"> <!-- function validateForm(theForm) { var errorFound = false; var errorMessage = "Please correct the following errors:\n"; <?php echo $jsChecks ?> if(errorFound) { alert(errorMessage); } return !errorFound; } //--> </script>
The form is really simple with code to display a CSS class depending on whether a error is detected (for the PHP error checking) and to set the value of the field:
<form method="post" onSubmit="return validateForm(this)"> <label for="name"><strong>Name</strong> (must be 3 characters or over)</label><br /> <input type="text" name="name" id="name" size="30" class="<?php echo $nameError ?>" value="<?php echo @ $_POST['name'] ?>" /><br /> <label for="email"><strong>Email Address</strong> (must be a valid email address)</label><br /> <input type="text" name="email" id="email" size="30" class="<?php echo $emailError ?>" value="<?php echo @ $_POST['email'] ?>" /> <br /> <input type="hidden" name="formSubmitted" id="formSubmitted" value="true" /> <input type="submit" value="Submit" /> </form>
There you are, both Javascript and PHP error checking! See the complete source code here.
Tags: Javacsript • PHP • Programming • Web Development
Tesco Boycott
Since Tesco opened a third store all within a ten minute walk of each other where I live in Cardiff I decided enough was enough and didn’t shop there any more. Though occasionally I admit I did pop in for milk or if Walkers Sensations are on offer for 72p!
This was until I saw for myself number 4… FOUR! Thats 4 stores within one mile walk of each other.
Never again will I step foot inside a Tesco’s store. Never.
Tags: Boycotts • Dislikes • Me
eBay Ads Gone Mad!
I usually surf the web with my trusty Adblock Plus Firefox extension turned on, but after turning it off recently (I have been working on my works affiliate programme… it actually took me a few seconds to work out why things weren’t appearing that should have been!) I got a bit of a shock when I went on to eBay. My usual eBay experience looks like this:
However to my disgust with adblock plus disabled I was confronted with the following:
I think eBay should be ashamed of themselves. They have completely compromised their site by selling out to ads and lets face it – it’s not exactly like they are short of money! I knew eBay had ads but this is getting silly.
Tags: Dislikes • Me • Software • eBay
The Cat Came Back
I remembered this cartoon from my childhood today whilst speaking to my girlfriend. She hadn’t heard of it, so if you haven’t seen it you should definitely check it out!
Magento Theme / Templating Tutorials, Guides and Resources
I think anyone that has worked with Magento will agree that it is a steep learning curve, this is not helped by the lack of documentation. I have put together a list of useful links when that I found helpful whilst trying to get my head around Magento themes:
(I have expanded upon these lists which I found useful)
- Php|architect’s Guide to E-Commerce Programming with Magento
- Designer’s Guide to Magento – The most solid of Magento’s documentation, though it might take a few reads before things become clear! (pdf version)
- The Magento API
- Magento Screencasts
- Designing for Magento Webinar – worth watching the wmv file as much better quality
- Magento Wiki – out dated but some handy concepts
- Ohminu forum post – the lead designer breaks things down for newbies
- Magento Folder Structure
- Changing Text – using the Locale File
- Builing Blocks – more handy hints from the lead designer
- Screencast on creating themes – a very brief introduction to creating a new theme
- Video’s and other resources from php | architect
Tags: Magento • Web Development • e-commerce
Windows Text Editors
I’m a Mac user through and through but recently I have been required to use Windows for work. My favourite text editor for Mac is undoubtedly Textwrangler which is a free stripped-down version of Barebones BBEdit. This is a great text editor that does everything I need.
After having such good experiences with Textwranger on OS X my job was finding a Windows alternative. Other than the usual features (syntax highlighting etc) I was looking for:
- FTP Support (though I do not use this text editor feature on OS X, this was a requirement for me on Windows)
- Powerful multi-file search / replace
- Tabbed file editing
- Smart indenting- shortcuts to indent / unindent whole blocks of text
- Matching brackets
After some searching and testing of various solutions I found Crimson Edit, this is a great text editor that is also free! The only small problem I have had is a few bugs in the FTP connections but this is forgiveable and for me was the best free text editor for Windows. Crimson Edit has been open-sourced because the developer had no time for it any more.
Unfortunately Crimson Edit does not support SFTP connections so I had to look further. In the end I went for EditPlus. This application costs but is fairly cheap (35USD / 30 day trial available) and has a extermely powerful array of features (like Search / replace regular expression support and advanced (S)FTP support with file browser pane). I found out about this editor as it is used by the Magento developers.
Tags: Likes • OS X • Programming
