Archive for July, 2009

Excuse the mess

17, Jul 2009

Reorganizing and switching to a much slicker theme. Everything should be nice and clean again soon.

Back on time. I think I’m going to downgrade from a firm 5 tutorials per week to just as many as I have time to review, because I don’t want to skim over material or choose sub-par stuff simply to make my quota. So, three this week. But as always, I’m constantly coming across useful [...]

Apparently custom prefixes and custom named arguments in URLs don’t mix all that well in good ol’ CakePHP. I’ve got a StatisticsController with some custom_-prefixed actions. So, in routes.php I added this line to parse the URLs: Router::connect('/statistics/custom/:action/*', array('prefix' => 'custom', 'controller' => 'statistics', 'custom' => true)); Straightforward enough, right? And to generate a link [...]

OK, so maybe I’m a few days late. Plenty of useful CakePHP resources out there, just not enough time to write about it all! But, better late than never, right? Anyway, I’m constantly coming across useful tips, code, and tutorials that save me a lot of time. So I thought it might be useful to [...]

Nothing like writing a tutorial on your code to realize how you could improve it! Just minutes after writing a tutorial on persisting pagination limits in CakePHP – a system I developed weeks ago, I wondered to myself why I just didn’t make it a component and boost its portability by a billion percent. So, [...]

Nothing like writing a tutorial on your code to realize how you could improve it! Just minutes after writing a tutorial on persisting pagination limits in CakePHP – a system I developed weeks ago, I wondered to myself why I just didn’t make it a component and boost its portability by a billion percent. So, [...]

If you find yourself paginating a lot of results, you may want to give your users the ability to change the number of results per page they see. Easy enough, I know, but the user’s preference should also persist through the session no matter what data the application is serving up. And, ideally, we don’t [...]

Week #2 of my “this stuff is useful” roundup, right on schedule! I wonder how long I can keep this up. Anyway, I’m constantly coming across useful tips, code, and tutorials that save me a lot of time. So I thought it might be useful to others to gather up some tutorials every Friday and [...]

Watch out when using ‘image’ input types, since the $_REQUEST variables you get vary depending on the user’s browser. Let’s say you’ve got this input field: <input type="image" src="go.png" value="go" name="pagination_submit" /> In Firefox (and I assume most other logical browsers) you’ll get three $_REQUEST variables from this input: ‘pagination_submit’, ‘pagination_submit_x’, and ‘pagination_submit_y’, where the [...]

I don’t like CAPTCHAs. I don’t know anyone who does. But most forms need some sort of protection against spam, especially where heavyweight spam detection services (e.g. Akismet) aren’t suitable. The downfalls of CAPTCHAs are many – hard to read, annoying, impossible for those with vision difficulties – and the benefits are slim. So, a [...]


top