GoogleMapsV3 CakePHP Helper

106

This is a helper to generate GoogleMap maps (dynamic and static ones) in your CakePHP views. Note: Google Maps API V2 is marked "deprecated". API V3 is supposed to be faster and more compatible to mobile browsers. Details Also new:…

Flattr CakePHP Helper

3

Get "Flattred" As you can see wordpress (and my blog) already has a Flattr plugin (for posts) and a widget (for the sidebar). With a little helper you can easily integrate Flattr to your site – the "cake way". I…

Internet Tips and Tricks

0

Youtube Links exact to the second Using a timestamp we can now post and share youtube links with a specific starting point. Format: …#t={x}m{y}s (x = minutes, y = seconds) Example: http://www.youtube.com/watch?v=xyz#t=2m45s Now the video starts at 2 minutes and…

PHP

Frequent PHP problems and solutions

5

I started off with frequent CakePHP problems last month. This month I add some common PHP problems. Strip additional white spaces With UTF8 the "normal" preg_replace doesn’t really work anymore. For some cases we could use the following trick: $str…

Preventing Brute Force on Login

4

With default cake login procedures a user could try unlimited passwords to one specific account. That means, if you write a bot that tries every possible combination (thousand times per minute!), this bot could eventually gain access to the account….

Loading Classes on the fly

4

With the LazyLoading Model from Lorenzo (there are other sources as well) we already speed up the application by 20-40% (depending on the application size and amount of models). Something i never really liked is that components and helpers can…

PHP

About PHP basics and pitfalls

2

AND, && and & Usually you use && in favor of AND. At least, I prefer! Cake code conventions state the same. But they do exactly the same: They "intelligently" match the conditions and abort as SOON as the first…

Complete CakePHP naming conventions

0

For details into some aspects take a look at my old "coding standards" summary. Database Database tables are plural: "comments" or "user_comments" etc. I recommend to stick to conventions and underscore + lowercase all table fields: "last_login" (instead of "lastLogin"…

CakePHP Beginner Tips

4

Based on CakePHP1.x. Valid for 2.x (see updates below). Apache Server For Windows use WAMPServer2 and select "Apache" => "Apache Modules" => "rewrite_module". Thats all there is. Cake should now work out of the box without any other modifications. Database…