Support
Plase visit Karamelo Trac for more details about how extend Karamelo.
Since Karamelo is developed using CakePHP framework you must have read the Cook Book Manual. BTW, we use CakePHP 1.2RC2. Karamelo only will runs on PHP 5.2 or higher, push PHP4 to quick and painless death! ;-)
We are using PostgreSQL 8.1 or higher as database, right now there is no MySQL version but since CakepPHP have his own DB abstract layer we think is easy convert sql scripts. If you already did this, please share your code ;-)
Get the current Karamelo code:
$svn co https://svn.chipotle-software.com/repos/karamelo/trunk/app karamelo
Install and feel free to hack the code.
Portal layout is APP/views/layouts/portal.ctp and CSS file is APP/webroot/css/portal/portal.css.
Control Panel, (aka admin area), layout is APP/views/layouts/admin.ctp and CSS is APP/webroot/css/cpanel/cpanel.css
We are using Auth component so just put:
public function beforeFilter() // see: http://book.cakephp.org/view/60/Callbacks
{
parent::beforeFilter();
if ( $this->Auth->user() ): // user is logged
$this->Auth->allow(array('action1', 'edit','view','delete'));
else:
$this->Auth->allow(array('action1')); // only action1 is public action
endif;
}
in your controller to set public and restricted actions. parent::beforeFilter(); is defined in APP/app_controller.php.
The admin_foo actions only can be executed by users logged in and belongs to group 1 (admin group) or 2 (teachers group). See APP/app_controller.php to view details.
You can add a new entry in admin menu editing:
APP/views/elements/admin_menu.ctp
Add a new Control Panel button editing:
APP/views/entries/admin_start.ctp
Currently there are only spanish and english translations but you can add new translations in APP/locale/ and set lang in APP/app_controller.php. See the CakePHP manual to know details.
Well that is, happy baking!
Please put your questions in Developers forum. In a couple of hours (generally) you will have your answer.