I’ve been impressed by how WordPress integrates custom content types into it’s interface whilst maintaining the ease of use of the CMS. Rather than using a database approach, it is all code based. There are a lot of tutorials available but I found the one by Think Vitamin the easiest to run through. My one issue with it, however, is that there is a lot of code required for each type you create. I was recently re-developing a site to using a CMS from using CodeIgniter and decided to give the custom types a go myself.
Continue Reading
Custom Post Types Plugin WordPress
Converting Seconds to Hours, Minutes and Seconds in PHP
echo date('G:i:s',mktime(0,0,round($seconds,0),0));
To do this in a single line use this. By plugging the number of seconds into mktime, you account for any timezone issues you would otherwise encounter passing the number of seconds into the date function. Since we’re not after the date itself in this instance, it’s irrelevant we’re looking at Jan 1st 1970.
Selenium Case Study – Part Two: Selenium Remote Control
In the first part of this case study, I covered the usage of Selenium IDE for automating UI testing. The second part will introudce Selenium Remote Control (Selenium RC). Selenium RC allows for tests to be produced in a server side language and then run on browsers and operating systems of your choice. In this case study, the PHP implementation will be used (the PHP version uses the PHPUnit library).
We will start by exporting the tests created in Part One. These will be used to demonstrate the features of Selenium RC, such as the production of test suites and allowing you to use multiple systems/browsers for your testing. Following this I will show what else is possible using Selenium RC and limitations of the system.
Continue Reading
Custom User Authentication in phpBB
One issue with using phpBB for site forums is hooking the forum up to be logged in by your main site login. phpBB 3 allows the creation of a custom authentication plugin. Create a document named “auth_name” where name is what you want the authentication method to be called. Store this in the auth/ folder and then specify in the config table in the database or the Client communication/Authentication settings section of the administration panel.
Continue Reading