Category Archives: Uncategorized

CakePHP – Static pages under the root

I’ve recently started using CakePHP, I don’t really understand it too well, but the first thing I noticed was that any static pages you have normally would go under www.site.com/pages. I thought ‘this sucks’, so I’ve made a very simple work-around, which isn’t great, but it seems to work.

The idea is that someone will go to www.site.com/something and then cake will look for the something controller, if it can’t find it, it will normally throw up an error. By altering this error page, we can get cake to do the pages controller action instead of the error one.

So what I did was add the file: views/errors/missing_controller.thtml which contains:

$this->requestAction('pages'.stripslashes($_SERVER['REQUEST_URI']));

That seemed to do it. Not elegant at all, I know, so if you find a nicer way of doing it, or write some nicer code, please give it to me and I’ll post it on here.

Gallery stuff

Apologies for the gallery downtime over the weekend, I’ve been moving around web servers… it shouldn’t be too long now until there’s a proper web address for it, like gallery.john-hunt.com, rather than this: http://83.149.126.39:81/gallery/. You can always use the gallery link on this page (to the right) to access the gallery.

[edit]

You can just use http://gallery.john-hunt.com, it’ll always direct you to the right place.

[edit]

Gallery is offline completely for the foreseeable future.. however, we still have all the photos, so don’t worry!

Kick 4 Life

A good friend of mine Pete Fleming runs a charity called kick 4 life, I quote from his website (as it says it better than I could!):

Some people think football is a matter of life and death… it can be.

Kick 4 Life is a registered charity that uses football as a tool to fight poverty and disease in the world’s poorest countries. As the most popular game on the planet, football has the power to unite, bring hope and create opportunities. To make this a reality, we aim to:

  • Enhance the preservation and protection of good health throughout the world, in particular in relation to issues surrounding HIV/AIDS by the provision of information and advice to those at risk or who are suffering the effects of HIV/AIDS, and the provision of financial assistance to those effected.
  • The relief of poverty, hardship, and distress throughout the world by provision of financial and/or material assistance of those in need

You can check out Kick 4 Life here. Please make a donation if you can!

Free USB key!

I don’t know what kind of storage capabilities it has, but Microsoft are doing free USB keys, click the usb key image: from here and follow the instructions. You’ll have to use your ms passport login to do it. Answers are 4, false, true, true (or 2,true,true,true? I dunno, probably makes no difference) (so I’ve been told anyway). You might want to format it as soon as you get it!

ajchat

I recently discovered ajchat, it’s a chatroom thing for your website, although it uses the infamous ‘ajax’ method of doing things. This means that it’s smooth. I tried it out and it IS smooth, as smooth as IRC which is very nice indeed and makes it a real option for websites, or just a web IM client thing.

ajchat ajax chat thing