Archive for June, 2008

Actionscript - Loading Acute and UTF-8 Characters from XML into Dynamic Text with Flash

Thursday, June 19th, 2008

Writing flexible applications in Flash is easy, (/me points in the direction of my XML Configuration Class) and there's few reasons why all your text strings should not be read in at run time to allow for easy internationalization. However, one pitfall to be aware of is trying to use Acutes ...

Validating Image Uploads in CakePHP

Monday, June 16th, 2008

Following on from my article on CakePHP - Uploaded File Validation in Models, today's snippet will show you how to use Cake's validation rules to reject invalid images, or images which do not conform to a specified mime-type. This code relies on the fact that you have LibGD installed ...

Holiday Photography

Sunday, June 15th, 2008

I'm back from a week long holiday in the bay of Elounda, Crete. During my stay I took about 200 pictures using my trusty Samsung i6 my favourite of which were taken on the Island of Spinalonga which served as a leprosy colony until 1957, the following pic was ...

CakePHP - Activating User Account via Email

Tuesday, June 3rd, 2008

Continuing on from my User Registration with the AuthComponent post I'm going to cover how to activate user account's via email. Before we get down to the code lets look at a simple use case first. Activating User Accounts Via Email Use Case Goal: To confirm that users are registering with ...

CakePHP - Open_Basedir Restriction in Effect

Monday, June 2nd, 2008

Just deployed a CakePHP on a domain running PLESK and dismayed by the fact that your screen is over-flowing with warning about open_basedir restriction in effect? Fear not, the solution is straight forward (if a little frustrating to track down!) The problem is caused by this line (line 69, in ...

ActionScript 2.0 Configuration Class

Monday, June 2nd, 2008

This is an update to my original Actionscript 2.0 Configuration Class which I wrote back in February. It features a new access method for reading and writing values and allows you to load in external XML configuration documents with an easy to understand Schema. All comments welcome.

CakePHP - Uploaded File Validation in Models

Sunday, June 1st, 2008

Allowing uploaded files from users in PHP is fraught with danger, however by using CakePHP 1.2 and a little bit of Validation magic we can make things a little safer. First, lets start by creating a simple upload form where the users will be uploading their files Nothing particularly special here, just ...