Enable Write Permissions for the Native Built-In Apache in Mac OS X Lion

on Thursday, 23 February 2012.

When using the native built in version of Apache in Lion OS X you won't have write permissions unless you change the User and Group settings in apache's httpd.conf file. Here are some quick instructions on how to achieve that.

How to write PHP with CSS Syntax

on Tuesday, 02 August 2011.

I've recently designed a template system, and wanted to make it as easy as possible for the designers to enter values into PHP functions. So I wrote a little function to allow a CSS style string to be converted into an array.

Add a MySQL User, Simple & Reliable

on Monday, 01 August 2011.

I've found the easiest most reliable way to add a MySQL user with all priviledges is with a simple query.

Search Engine Friendly (SEF) Urls for Virtuemart

on Tuesday, 14 June 2011.

I've come up with a very simple FREE solution to give your VirtueMart Joomla! 1.5 sites SEF URLs. This is the an example of the format you will achieve:

http://yoursite.com/store-alias/category-name/product-name/unique-id

Test PHP Execution Time with the Microtime Function

on Monday, 09 May 2011.

I only recently came across the microtime() function. It's very useful for debugging slow loading server side issues. 

Flexible Random String Generator with PHP

on Wednesday, 06 April 2011.

This is a short  and relatively simple tutorial with some useful php functions to generate unique random alphanumeric codes. These can be useful for generating url codes, like the ones featured in bit.ly, tinyurl, youtube etc.

These php functions allow you to create as many codes as you like with the characters you chose. It also lets you add in your existing codes so that you don't get duplicates.

Yootheme Zoo - Accessing Element Data with Joomla Code

on Wednesday, 23 March 2011.

If you're looking to write some custom code with yootheme's zoo then you'll probably be wondering how to access all the data in those dynamic fields you created through their lovely admin user interface. If you look in the jos_zoo_item table in your database you'll see a column called elements. If you look at the contents you'll see that majority of your zoo items data is stored in there as XML.

Dynamic PHP Copyright Date Code

on Thursday, 24 February 2011.

Pretty simple but pretty handy too! Here's a short tutorial to generate the current year in your footer's copyright declaration. It also detects if the the site has been running for less than a year to avoid the date printing out like this © 2011-2011 rather than just this © 2011.

Example: Your Company Name © 2010-2011 All Rights Reserved.

Full Screen Background Image - Pure CSS Code

on Monday, 17 January 2011.

This is a simple tutorial that teaches you how to create a full screen background image for any sized screen or browser window using pure css code.

This method is cross-browser compatible and doesn't require any javascript or flash.

Joomla - Custom Page Title

on Sunday, 12 December 2010.

In the past I've used a joomla plugin called Title Manager. However I've noticed that it isn't as flexible as it should be.

So I've come up with some code that gives you the ability to name your front page title & append your desired description to all other titles. This is essential for SEO.

Default Descriptions in Text Fields

on Sunday, 28 November 2010.

Ever noticed in web 2.0 sites that the search description is contained in the text field? This is important as it frees up that extra space the search label would usually consume.

The way it works is by inserting a default value, usually with a lighter font color. Then when you click into the field the text disappears so that you can enter your information as quick as possible. If you forget what the description is you can then delete all text and click out of the field and the default description will reappear.