cakephp-1.3

CakePHP HABTM Plugin table naming conventions (for 1.3)

Hi everyone, I know naming conventions for tables used by plugins generally start with the name of the plugin and then the model pluralized. For example lets say I had a plugin called Poll, with a model also called PollPoll and another model called PollTag then the resulting table names would be poll_polls and poll_tags. They would also ...

CakePHP 1.3 inflections?

Where do I put my inflections in CakePHP 1.3? I am new to Cake ...

Cakephp 1.3 JsHelper for AjaxHelper

Hi: I'm start using cakephp and i made a demo app using AjaxHelper $ajax->link('title', 'url', array('update' => 'mydiv')) Now i want to migrate that to cakephp 1.3 and AjaxHelper is deprecated on cake 1.3 and will be removed, so i want to accomplish the same with JsHelper which is replacing the functionality of AjaxHelper and Javascr...

CakePHP 1.3.0 RC4 Installation

I have been using 1.2.6 and downloaded 1.3 to try it out. I am using wampserver with Apache 2.2.11. I have mod rewrite enabled. When I bake a new application using the cake 1.3 console, after I verify that the webroot/index.php of the application CAKE_CORE_INCLUDE_PATH is set to the Cake1.3 Installation folder. The result is a page thats...

Cakephp 1.3 database migration with

Hello All, I am using cakephp 1.3 on LAMP (ubuntu 9.04) platform. Trying the database migration with cakephp inbuilt schema generation script. I am inside the app folder & When i fire a command in the terminal 'cake schema run create schema file name', It is giving me the error that "Error:schema.php could not be included." Can anybody...

How do I secure all the admin actions in all controllers in cakePHP

Hello Everyone, I am developing an application using cakePHP v 1.3 on windows (XAMPP). Most of the controllers are baked with the admin routing enabled. I want to secure the admin actions of every controller with a login page. How can I do this without repeating much ? One solution to the problem is that "I check for login information ...

Where is the appropriate place to define inflector rules in CakePHP 1.3?

In CakePHP 1.2, custom inflector rules could be defined in a file app/config/inflections.php. This file was removed in CakePHP 1.3. Instead, the documentation prescribes using the Inflector::rules function to load custom inflections. There's adequate documentation of how to define the custom inflections themselves, but the documentation...

CakePHP 1.3 controller save() does not save data

I want to add a new user to the database, and do so by making them fill in a form and submitting this. All seems to work fine. Just before my save() call in the controller I return all data and all necessary data is there. It is valid(ated), since no errors are returned. But then nothing happens. I'm being returned to my form without a...

How to run CakePHP app from subdirectory

Using CakePHP 1.3, I have the following layout: /srv/www/_cakephp13/ /app/ /cake/ /plugins/ /vendors/ etc... /srv/www/htdocs/ /cake_app/ /other-dir/ ... where htdocs is the public directory, and I have moved webroot of my app to be cake_app above... Which appears to be almost working. (After customizing...

CakePHP 1.3 advanced installation

Using cakephp 1.3.0, I am editing index.php to setup the app, cake and webroot directories. I have the following dir's setup: httpdocs/app httpdocs/cake httpdocs/webroot I have done this countless times in 1.2.xx and according to the cakebook this hasn't changed but I keep getting missing controller Error: WebrootController could no...

Running a Model::find in for loop in cakephp v1.3

Hi all, How can I achieve the following result in cakephp: In my application a Topic is related to category, category is related to city and city is finally related to state in other words: topic belongs to category, category belongs to city , city belongs to state.. Now in the Topic controller's index action I want to find out all t...

checkbox selection in edit section in cakephp

Hi... I want to shoe checkbox selected in edit section if there have value in DB. i m using cakephp 1.3 version .in edit section how i will show valued checkbox true. Please help me as soon as possible. Thanks Manish ...

CakePHP requestAction and eval code

Hi, I am using cakephp for my site. I have stored multiple blocks in database and trying to access the code with following syntax. foreach($blocks as $block){ if($block['Block']['position'] == 'left'){ $str = $block['Block']['value']; eval("\"echo $str\";"); } } And i m getting this error; : Undefined proper...

Error appearing in application after updating cakePHP library files from 1.3.0 to 1.3.1

Hi everyone, I have just updated my cakephp library to latest version 1.3.1. Before this I was running v1.3.0 with no errors. After running the application I am given this error message. unserialize() [function.unserialize]: Error at offset 0 of 2574 bytes [CORE\cake\libs\cache\file.php, line 176] I updated the libraries simply by r...

cakephp contain - condition

my problem is that can i give condition [ 'BookTitleMaster.id' => $xtitid, ] as like below $bbookinfs = $this->BookStockin->BookIssue->find('all', array( 'conditions' => array('return_status' => 2), 'contain' => array( 'BookStockin' => array( 'BookTitleMaster' => array( 'BookTitleMaster.id' =>...

Setting up magic routes for plugins in CakePHP 1.3?

I'm working on upgrading my project from CakePHP 1.2 to 1.3. In the process, it seems that the "magic" routing for plugins by which a controller name (e.g.: "ForumsController") matching the plugin name (e.g.: "forums") no longer automatically routes to the root of the plugin URL (e.g.: "www.example.com/forums" pointing to plugin "forums...

How to limit data to users who own it without limiting admin users in CakePHP?

Currently I am writing an application where I have multiple users. They have data that should only be visible to them and not the other authenticated users in the system. I also have administrators who manage the system and have access to all of the information. What is the best way to limit users to their data without limiting admin use...

What's the correct way to use Cakephp urls?

Hello all, it's my first post here :) I'm having some difficulties with dealing with urls and parameters. I've gone through the router class api documentation over and over again and found nothing useful. First of all, I'd like to know if there is any 'universal' format in CakePHP(1.3) for handling urls. I'm currently handling all my u...

Routing configuration in cakephp

Hello all I am trying to implement routing in cakephp. I want the urls to mapped like this... www.example.com/nodes/main -> www.example.com/main www.example.com/nodes/about -> www.example.com/about So for this I wrote in my config/routes.php file.. Router::connect('/:action', array('controller' => 'nodes')); Now, I got the thing go...

Problem using HTML Link Helper in Cakephp 1.3.1

Hello all I am having a problem using $html->link helper in my view. Consider this snippet... /views/nodes/packages.ctp <li><?php echo $html->link( "Package 1", array( "packages", "package1" ) )?></li> Now when I click on the link, the address in address bar appears like http://www.server.com/nodes/packages/packages/package1 Why i...