Archive for the ‘Programming’ Category

Protected: Pro PHP Security

on Thursday 6th March, 2008 Gabe speculated thusly…

This post is password protected. To view it please enter your password below:


Posted in Books, Information, PHP, Programming

Enter your password to view comments

Protected: CodeIgniter for Rapid PHP Application development

on Thursday 6th March, 2008 Gabe speculated thusly…

This post is password protected. To view it please enter your password below:


Posted in Books, CodeIgniter, Frameworks, Information, PHP, Programming

Enter your password to view comments

Using jQuery to make a login form more sleek

on Wednesday 5th March, 2008 Gabe speculated thusly…

The following code is well commented, please read the comments for a thorough understanding.

<script type="text/javascript" charset="utf-8">
$(document).ready(function(){

// The following js code will take the standard login form and hide it's
// labels. It will then change the password input type to text
// (so that normal letters are
// displayed in it), set the value of the email input to 'email. Set the
// value of the password input to 'password. These values server as the
// new labels.
(more…)

Posted in JavaScript, Programming, jQuery

No Comments »

Linking images in Code Igniter

on Sunday 17th February, 2008 Gabe speculated thusly…

I’m a big fan of the PHP framework, CodeIgniter. However, until recently it has lacked an elegant way of nesting an image in an anchor tag. I had to resort to manually typing out HTML like this:
<a href="<?=site_url?>/controller/action"><img src="<?=base_url()?>/images/button.gif"></a>
CodeIgniter 1.6 has been released, quickly followed by 1.6.1. This includes an image helper. One is still unable to elegantly link images using CI’s helpers. If you want to be able to do something like this:
<?= anchor( 'controller/action', img( 'images/button.gif' )?>

You could just comment out line 117 in /system/helpers/url_helper.php but that means you are altering CI core, which is not a good idea. For a start it will be overwritten when you upgrade and it is an inelegant hack.

A better bet is to create your own helper file and use it to override CodeIgniter’s one. This is dead-simple, just create a file called MY_url_helper.php in the following location /system/application/helpers/. Note that the MY_ prefix is set in the config.php file under $config['subclass_prefix'] = ‘MY_’; so if you have changed that setting you will need to adjust your file-name accordingly.

Then just copy and paste the following in to it: (more…)

Posted in CodeIgniter, Development, Frameworks, PHP, Programming

7 Comments »

Rails Production Environment Using Mongrel Cluster, Apache 2.2 mod_proxy, and Capistrano on Ubuntu Gutsy

on Wednesday 13th February, 2008 Gabe speculated thusly…

Recently, I had to setup a production environment for Rails applications at work. I encountered many difficulties, including problems with permissions on client/server computers, and not least because the documentation I had was out of date (Agile web dev and The Rails Way). Online tutorials were helpful but incomplete. I have compiled all that I discovered here. (more…)

Posted in Development, HowTo, Linux, Operating System, Programming, Ruby, Server

4 Comments »

Gabriel’s musings over DRCS and RCS

on Tuesday 18th September, 2007 Gabe speculated thusly…

For the last couple of months we have been using a subversion server I setup for our version controlling. More recently I have experimented with newer (better?) version control systems. Subervion (svn) uses a central repository form which everyone must checkout working copies, and commit their changes there. However, there exists DRCS, or distributed revision control systems. These allow users to branch from other users, and commit to their own branches; or the central-model can be used.

(more…)

Posted in Programming

No Comments »

Andrew Norman: The Book Collection

on Thursday 5th July, 2007 Gabe speculated thusly…

Andrew commissioned me to give his books an on-line presence. He wanted only to list his books and nothing else such as shopping or contact details.This post summarises, and then specifies the project. Designs are presented, and a project plan is demonstrated. Finally, the project is completed and I can make the source code available on request. (more…)

Posted in Development, MySQL, PHP, Programming

No Comments »