Shift8 Creative Graphic Design and Website Development

960 Fluid Grid System CakePHP Bake Templates

Posted on Fri, May 21 2010 00:17:00

With CakePHP 1.3 came some wonderful changes to the cake console. There is a more robust bake template system, including "themes" for baked view templates. This is nice because you can have multiple themes which could suit different needs, or simply allow you to drop in some files and stay better organized. 

960 Fluid Grid System CakePHP Bake TemplateGood timing. I also re-discovered a CSS framework, the 960 Grid System. I used to use BlueprintCSS quite a bit, but Croogo uses 960 and I also found this wonderful site that has a 960 Fluid Grid System. It's a very basic "slate" black and white colored template with some really nice JavaScript effects which mainly include collapsible divs and accordions. I love CakePHP and while I love it so much, I'm not particularly fond of the default baked views. That's partially why I don't use bake as often as I should. I typically copy and paste files and then do find and replace. So I'm trying to discipline myself a bit more lately. I'm hoping this should help.

960 Fluid Grid System CakePHP Bake Template - Edit RecordWhat I've done is taken that template and made a bake template with it. You can n ow bake views and have it look like the template in the link above. I don't have three columns, I only have two, but of course you can adjust that. You will need to copy some JavaScript files, CSS files, layouts, and optionally some elements over to your app folder to complete the picture. 

I may continue to evolve this, but this is now my starting point for all CakePHP projects that I do from scratch. You can download the bake template here.

CakePHP Image Version

Posted on Sun, May 02 2010 09:53:00

I built a component and helper for CakePHP called Image Version. It allows you to easily create and use various images at different sizes. For example, thumbnails. The helper wraps the CakePHP image helper so you can pass along an array of options that you normally would use, but you also have a few more options before those. That would be to control the width, height, quality, cropping for the thumbnail, "letterbox" effect when not cropping and when the image has one dimension smaller than the target size, handling for transparent images, background fill colors, and a few more goodies I'm sure somewhere. You'll have to check out the files (they are well documented).

Thumbnails, or image versions can be created from the view template or before getting to the view with the controller by using the component. You may find a very old version of it on the Bakery...That should definitely be updated. I now have a github repository for ImageVersion.

Agile Uploader

Posted on Mon, Apr 26 2010 23:19:00

Agile Uploader is a multiple file uploader with client-side resize feature for images. It is built using Flash and embedded with JavaScript. There's also a jQuery plugin to make it even easier. The project page can be found here.