Archive for 'Code'

CakePHP guiListTree

If you haven’t ever heard of CakePHP, you do not know what you are missing. CakePHP is a MVC framework that is not only simple to use, but extremely powerful. While working with this framework, I wanted to use the YUI (Yahoo User Interface) to add some features. In the process of trying to work out drag and drop, I discovered the guiListTree in the Html->Helper. But how are you suppose to structure the data you send to the function to have it spit out the unordered list correctly?
Read more

Adding SVN Information to File Headers

(see the revised edition of this post => http://blogchuck.com/2009/09/adding-svn-headers-revisited/ )

In the past as I have examined open source php applications, I have noticed the comments in the top of the files contain SVN information about the file. At first, I thought that maybe the developers added the information to the top of each file manually. I soon discovered that would be a rediculous requirement to put on the coders. A bunch of unnecessary red tape from their perspective. So I began to research. It didn’t take long to find the answers I was looking for.
Read more

Phone and Email REGEX for PHP

I, and a few other developers I work with, looked the Internet over for a good REGEX that will pull a valid phone number from HTML content. The challenge is the many different ways a phone number can be formated. (ie. 123-456-7890, 123.456.7890, 1(123)456-7890, etc.)


Read more