generic cialis
Home » Archive

Articles in the Web Development Category

PHP, Regular Expressions »

[24 Sep 2009 | No Comment | ]

Problem
I have a ton of date strings in the stupid US style dd/mm/yy format. i.e. 12/24/09 being 24th September 2009. I need to convert them to the UK style dd/mm/yy.
Solution 1
As a string in PHP is really just an array of characters, the simplest fix was to address the individual number characters by their positions within the sting, and rearrange them into the format I wanted:

$d = “12/24/09″;
$d = $d[3].$d[4].”/”.$d[0].$d[1].”/”.$d[6].$d[7];
echo $d; // displays “24/12/19″.

Solution 2
I posted my solution on twitter (@hutchings) and asked for comments and @londonhackspace organiser Jonty came …

Flash »

[13 Aug 2009 | No Comment | ]

Problem
I’m doing some freelance Flash development, and it’s been a while. I have just created a dynamic text field that I wanted to fill via actionscript, then fade in via an alpha tween. This wasn’t working, even if I set _alpha = 0 on the movieclip containing the text field.
Solution
You can only set _alpha on a Dynamic Text field if the font has been embeded (with the embed button).
Works now! wohoo! Simple stuff that I’ve known in the past, but forgot.

Joomla!, Windows »

[22 Jul 2009 | 2 Comments | ]

Problem
When trying to add a Plugin, Component or Module in Joomla’s Extension Manager, you might get the following error:
JFolder::create: Could not create directory
Warning! Failed to move file.
Shown here:

This is likely – but not definitely – to be after the site has been moved from location to another, a change of directory, or server.
Solution
When a Component, Plugin or Module is added, the Joomla system attempts to copy the installable zip to a temporary directory, called ‘tmp‘. From there, PHP extracts the files and installs them. The error above usually occurs for …

CSS »

[19 Jun 2009 | 2 Comments | ]

Problem
I’ve just had to convert a photoshop visual to a wordpress template. The designer wanted a bulleted list where the bullets themselves were very close to the list items, and were small dashes. Cross browser support for list item and bullet styling is ropey at best, and to make things perfect I’d have to resort to browser specific styles.
Solution
The solution I think I’ll be using for the rest of my ‘web’ career will be this. JUST FORGET THE BULLET ITEM, and use positioned background images instead.
In the stylesheet, add styles …

Internet Explorer, Tools »

[24 Apr 2009 | No Comment | ]

Problem
While doing web development, I frequently need to insert lorem ipsum into a text field or textarea. To do this – bearing in mind that I don’t really like or use bookmarks, too messy – I tend to google “lorem ipsum”, hit lipsum.com, select/copy the block of text, and then return to my form field and paste it.
I wanted a quicker solution, and as I find myself using IE more and more to develop in now (thanks to the excellent ‘Developer Tools’ extension – never thought I’d say that!) my lorem …