Thursday, January 6, 2011

CakePHP Croogo Plugins CSS.

I had solved how to load plugin css in Croogo CMS.
Simply add these,

in app/plugin/myplugin/views/helpers/myplugin.php
public function beforeRender() {
if($this->Layout->View !== false)
and in app/plugin/myplugin/config/myplugin_bootstrap.php
make sure you have declared

// As in Croogo documentation
// Home → Wiki → Developers → Plugins → Hooks
// To hook your plugin's ExampleHelper
// (at app/plugins/example/views/helpers/example.php)
// in ALL controllers:
Croogo::hookHelper('*', 'Myplugin.Myplugin');

Hope it helps, happy baking.

Wednesday, January 5, 2011

CakePHP Captcha component with Securimage

I had made some changes so the component could work with cakePhp 1.3,
or at least it works in my application. The original article is
here, download the latest and the code i have modified.
Make sure you have:

1. Copied the component file into your app/controllers/components.
2. Copied the view file into your app/views/element/
3. To use "captcha_code" field form input.

You could "diff" to see what changes i had made in the code,
specially the component file. Hope it helps.

Happy baking.