30 6 / 2011
A dribbble style sneak peek of the site I’m working on. It’s the Little Engineering website I posted a few images of almost 2 months ago. It’s nearly finished, just content and styling changes left to do mainly. I plan to tidy up and either release the code or write a tutorial on how to do multiple image uploads in CakePHP 1.3.
Apparently the client plans to use the logo I designed on his van, and I can not wait to see that! :)
14 6 / 2011
Run multiple Notepad++ windows
I’m leaving this here more as a note to myself than anything else, as this quick tip for running multiple instances (windows) of Notepad++ is all over the place, but I find my self looking for it every time I format and re-install Notepad++.
Simply add the -multInst flag to your shortcut target, so that it looks like this:
"C:\Program Files (x86)\Notepad++\notepad++.exe" -multiInst
Simple!
13 6 / 2011
Send multiple records AND any related controllers to the view in CakePHP 1.3
This isn’t something particularly hard to figure out, but I was using the wrong search terms to help me figure this one out so it took me longer than it should have. Hopefully this will be of use to someone else, if just to explain it slightly differently.
Recognise this snippet:
Simply change “$this->Controller->recursive = 0;” to:
function index() {
$this->Controller->recursive = 0;
$this->set('controllers', $this->paginate());
}
This returns an array with nodes for each of the controllers related to the controller you’re using.
$this->Controller->recursive = 1;
26 5 / 2011
A better terminal window than Cygwin and Windows cmd.exe
I’ve been using Cygwin for ages, and while it has some great features it has some simple failures in its interface and integration with Windows. You can’t simply full screen it, and copy and pasting requires messing with cmd.exe settings.
But I’ve just discovered mintty and it’s a joy to use. Here’s the list of features copied from it’s Google Code page.
Get it here: http://code.google.com/p/mintty/ Or select it from the packages when installing Cygwin.
20 5 / 2011
reCaptcha and table based layouts
What based layouts? Table based layouts. I’ve been doing a small job making some modifications to a very old system that uses table layouts and non object oriented PHP. Frankly it’s a mess, and table layouts don’t just make it difficult to make layout changes. They were also the source of a problem installing reCaptcha that had me stumped for well over 2 hours!
Basically, if you have a structure like this:
<table>
<form>
<?php
require_once('../class/recaptchalib.php');
echo recaptcha_get_html($publickey);
?>
</form>
</table>
It simply wont POST the necessary fields “recaptcha_challenge_field” and “recaptcha_response_field”. I don’t know why, all I know is that they’re called from a function in the reCaptcha library and this is how to solve it:
<form>
<table>
<?php
require_once('../class/recaptchalib.php');
echo recaptcha_get_html($publickey);
?>
</table>
</form>
Make sure the form tags are wrapping the table tags. I’d love for someone to tell me why this is, but for now I’ll have to settle with just knowing that it works.
Permalink 4 notes
19 5 / 2011
Link: Change Apache’s document root to make developing locally easier
I’ve written a new blog post over at cenix.co.uk. Check it out.
I just started on a job to make some changes to a really badly made PHP job board system and came up with this solution. I had originally thought it could be done by using Window’s “hosts” file but that only supports IP addresses, so I couldn’t add a sub dir.
11 5 / 2011
Part of the footer for the Little Engineering website I’m working on. Really really really enjoying working on this project :D
05 5 / 2011
A little toggle switch I’m working on. I’m not happy with it yet, going to give it some more detail. I really want to use a toggle switch in something now.
04 5 / 2011
Working on my first custom design in ages and loving every minute of it. I worked on a logo today. Concerned I might be following the “meme” of old fashioned logos right now but I like it. I hope the client likes it too!

