Re: Website Structure

2010-07-21 Thread keymaster
Not so clear what you're describing. Sounds like an accordion widget in javascript, not something server side. Do you mean something like this? http://thedesigned.com/2009/09/25/10-examples-of-impressive-jquery-accordions/ http://docs.jquery.com/UI/Accordion If you wanted to have a module syste

Re: Website Structure

2010-07-21 Thread Andy H
Hi Chaim, This is more of a HTML/css question rather than a cakephp question. Try checking out some web libraries like JQuery or similar. These will help you achieve what you are after On Jul 21, 6:13 pm, Chaim wrote: > Hello, > > I am a beginner to CakePHP, so forgive my amateur question. >

Re: How could controller inform about layout or view existing?

2010-07-21 Thread Dr. Loboto
Just create flsah for every theme and keep default markup for those you do not need special. On Jul 22, 5:19 am, saidbakr wrote: > Hi, > > I use themes in my application, so there is multiple layouts and views > for each controller could be handled. For one of the themes used, I > created a layou

Re: $validate Does not work as expected!

2010-07-21 Thread huoxito
I guess you should use cake convention flelds for this which are 'created' and 'modified' instead of 'mdate' in your case. If you have those fields in your table you won't have to bother about validating or saving manually that datetime of your records. On 21 jul, 17:37, saidbakr wrote: > Hi, >

Access in controller data modified in a Model on callback method beforeSave?

2010-07-21 Thread huoxito
Is is possible to access data modified in a Model on callback method beforeSave? I changed the value of a variable on beforeSave method in a model and I need to retrieve that new value on my controller. I know i can use the read method to get that value, but I was hoping if it's possible to do tha

Trouble on non-standard database tables

2010-07-21 Thread guvilla
>>> database tables CREATE TABLE IF NOT EXISTS `product` ( `id_product` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_supplier` int(10) unsigned DEFAULT NULL, `id_manufacturer` int(10) unsigned DEFAULT NULL, `id_tax` int(10) unsigned NOT NULL, `id_category_default` int(10) unsigned DEFAUL

Re: Inflections + Naming Conventions Generator?

2010-07-21 Thread euromark
sounds like a nice idea that shouldn't be too hard to accomplish maybe you want to give it a try and publish it somewhere i always wanted to set up a "sandbox" cakeapp with some similar stuff never had the time though for such little goodies so if you lack the webspace i could offer you the url "

How could controller inform about layout or view existing?

2010-07-21 Thread saidbakr
Hi, I use themes in my application, so there is multiple layouts and views for each controller could be handled. For one of the themes used, I created a layout called "flash" which is dedicated for displaying flash messages, so in the controller I used the following line of code: $this->Session->s

Re: let users 'edit' database

2010-07-21 Thread Kirk
Some guy submitted a "multiple undo" type thing to the bakery. I thought it was kinda clunky, but it gave me an idea for an improvement, which could also be applied to your situation. Create a table for pending changes, and save all submitted changes to that table in serialized form. Then you can j

Re: let users 'edit' database

2010-07-21 Thread Jay
so a database revision/version control module is not available for cakephp? =( On Jul 20, 10:54 am, "mattmoy...@gmail.com" wrote: > Drupal does something like this called revisions.  You could implement > a much simpler version of this in your application by adding 2 columns > to your database ca

Re: Undefined property: View::$Session

2010-07-21 Thread Jeremy Burns | Class Outfit
What are you calling and what error are you getting? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 21 Jul 2010, at 19:01, Abby wrote: > I am getting this error when I am using check function. I have added > Session to helper and component in my controller b

$validate Does not work as expected!

2010-07-21 Thread saidbakr
Hi, In the pages controller I've created an action called "contact" to allow receiving messages from visitors and then this messages are stored in the database. I have a field in the table contacts called "mdate" which is dedicated for storing the MySQL datetime of the message sent. The mdate has

Re: $useTable = false - ignored

2010-07-21 Thread Xander
I have Aro and Aco tables and whole ACL is working just fine. GroupsController operates on both using separate Aco and Aro objects (using aliases as keys). Model is used only for data validation in group edit form - it doesn't need any table. I'm not using it to any read, find or save operations. I

Re: Dynamic Fixture List

2010-07-21 Thread adamcl...@gmail.com
I've solved the problem for the moment. With this server.test.php App::import('Model', 'Server'); include_once 'PocadsTestCase.php'; class ServerTestCase extends CustomTestCase { function startTest() { $this->Server =& ClassR

Javascript include error

2010-07-21 Thread Velmurugan Kuberan
I create a default layout and added css and javascript into it like the following, For CSS I added the following lines in the head section of the default.ctp in layout folder echo $html->css('reset', 'stylesheet', array("media"=>"screen"))."\r \n"; echo $html->css('style', 'stylesheet', array

Re: Login

2010-07-21 Thread Germano
I can create a model and define it as Auth userModel on beforeFielter callback of your AppController. function beforeFilter() { $this->Auth->userModel = 'Login'; . . . } and you can define inflections on bootstrap.php for pural of login b

Multiple login forms submitting to one login action

2010-07-21 Thread tersmitten
I'm having 2 login forms in my (cake) application. One on the home page (served by pages controller) and one in my user controller. The one from my user controller is working fine. But when I try to login from the homepage I get a blank page and I see in firebug I got a 404. The strange thing is th

Dynamic Fixture List

2010-07-21 Thread adamcl...@gmail.com
I'm tired of having to include all of my fixtures when I create a new test case. Is there a method to generate all fixtures needed? I noticed that he 'cake bake test' command can generate a list of fixtures. Is there some way to expose that so when my DB/Model changes I don't have to modify ever

Undefined property: View::$Session

2010-07-21 Thread Abby
I am getting this error when I am using check function. I have added Session to helper and component in my controller but that doesnt seem to help. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because y

Website Structure

2010-07-21 Thread Chaim
Hello, I am a beginner to CakePHP, so forgive my amateur question. I am unsure how to structure my website. I have four blocks and then when one block is clicked it changes to show the content for that block. However the other three blocks still remain visible and clickable so that if you click on

Login

2010-07-21 Thread Velmurugan Kuberan
Hi, I just want to create a login controller in cake.. the url will probably like this http://localhost/cake/login/ if i named the controller like logins http://localhost/cake/logins/ it 'll not sounds good... is there any way of making the standalone controller for login... i don't want it to be

login generates malformed sql query

2010-07-21 Thread markatto
My automagic login function is generating malformed sql queries, for example: "SELECT FROM `users` AS `User` WHERE `User`.`username` = 'user2' AND `User`.`password` = 'a87e0c9a0bcd15c86f7e319c87955c41cf1dc16f'LIMIT 1" The problem obviously is that there is nothing between 'SELECT' and 'FROM

Re: $useTable = false - ignored

2010-07-21 Thread cricket
On Wed, Jul 21, 2010 at 9:55 AM, Xander wrote: > > Second model is used to validate the GroupsController edit form. After > validation ACL's Aco Tree or both Aro and Aco Trees are updated (users > are in both trees, contents in aco only) using separate Aco and Aro > objects. I set useTable to fals

Re: Unknown Problem

2010-07-21 Thread cricket
On Wed, Jul 21, 2010 at 1:39 PM, Dr. Loboto wrote: > It may happen because of use debug functions in code (some people here > reported it). Great point. Being one of those who have brought that up here before, I should have thought of that. If one has any code using Debugger class methods, Cake w

Re: $useTable = false - ignored

2010-07-21 Thread Xander
Actually I tried, but I'm not sure if I did it correctly. Here's my model: array( 'type' => 'integer', 'key' => 'primary', 'length' => 11 ), 'parent' => array( 'type' => 'integer', 'length' => 11 ), 'alias' => array( 'type' => 'string', '

Re: $useTable = false - ignored

2010-07-21 Thread Xander
I'm sure both model's classname and filename are correct, otherwise validation wouldn't work at all. I tripple checked if I didn't made model's name plural or something - just for case. On 21 Lip, 19:41, "Dr. Loboto" wrote: > Ignored model properties and methods in 99.9% of cases is wrong model >

Re: $useTable = false - ignored

2010-07-21 Thread Dr. Loboto
Ignored model properties and methods in 99.9% of cases is wrong model filename so it is not loaded at all. On Jul 21, 8:55 pm, Xander wrote: > Hello. > I'm developing applications with user's and content's groups based on > ACL trees. > In my app I have 2 models without any tables. Models are use

Re: Unknown Problem

2010-07-21 Thread Dr. Loboto
It may happen because of use debug functions in code (some people here reported it). If at debug=0 site do not work, then you set debug to 1 or 2 and it works, then change back to 0 and it still works - it's definitely caches as Cricket told. On Jul 21, 5:46 pm, mirfan wrote: > I have deployed m

Re: Using Variables (data from db) in Controller

2010-07-21 Thread cricket
On Wed, Jul 21, 2010 at 9:51 AM, Mad Stacks wrote: > Hi, I'm new to CakePHP. I'm working on a project using it and so far I > love it, but I have a question. > > I have created my database, and the tables, filled in some sample > data, and used cake bake all for each of my tables. > Everything wor

Re: Unknown Problem

2010-07-21 Thread cricket
On Wed, Jul 21, 2010 at 6:46 AM, mirfan wrote: > I have deployed my cake application running on the following url > socialbidz.com/sb/sb > > i have got a serious problem > > when i keep the debug mode to 0 its display "the requwsted url is > available on this server", and when i set the debug to 2

Re: $useTable = false - ignored

2010-07-21 Thread Nabil Alsharif
Try setting the $schema variable in the model. On Wed, Jul 21, 2010 at 8:55 AM, Xander wrote: > Hello. > I'm developing applications with user's and content's groups based on > ACL trees. > In my app I have 2 models without any tables. Models are used because > I want to use automatic validation.

Re: translate behavior: no join for default language?

2010-07-21 Thread LunarDraco
I would make the data schema design the same or consistent regardless of the language. Anytime you introduce a special case to your design you really complicate the supporting code for reading, writing and displaying the data. You'll end up doing all kinds of conditional checking for that one speci

$useTable = false - ignored

2010-07-21 Thread Xander
Hello. I'm developing applications with user's and content's groups based on ACL trees. In my app I have 2 models without any tables. Models are used because I want to use automatic validation. First model is for ContactsController. There is no table used, so I set Contact:: $useTable to false and

Using Variables (data from db) in Controller

2010-07-21 Thread Mad Stacks
Hi, I'm new to CakePHP. I'm working on a project using it and so far I love it, but I have a question. I have created my database, and the tables, filled in some sample data, and used cake bake all for each of my tables. Everything worked great, my table relationships were all configured correctly

Re: Email Component

2010-07-21 Thread Ed Propsner
I played around a little more and found a few things online that got me pointed in the right direction however things still aren't working correctly. $this->email->from = 'Some Name ' // email does not send at all $this->email->from = 'Some Name ' (email all lowercase) // ignores both email and

[solved] Re: Using plugin Helpers in main app doesn't seem to work

2010-07-21 Thread kadanis
my bad. I have changed the helper in my plugin from class HelpernameHelper extends PluginnameAppHelper { to class HelpernameHelper extends AppHelper { and it seems to work now... Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

Re: Using plugin Helpers in main app doesn't seem to work

2010-07-21 Thread kadanis
thanks for the reply oops. yeah 1.3, sorry forgot to mention that. tried Helpername->out();?> error now : Undefined property View::$Helpername Fatal Error: call to function out() on a non-object. Any other suggestions? Check out the new CakePHP Questions site http://cakeqs.org and help o

Inflections + Naming Conventions Generator?

2010-07-21 Thread Anthony
Does anyone know of a site that would allow you to enter a word or two (something you'd use for a table name) and then spits out a list of the inflections and where each one should be used (ie: the corresponding file name, URL, object name, etc) following cake naming conventions? Or if you enter t

Re: calling method passing employee_id variable

2010-07-21 Thread grigri
Pretty much this: function filter($filter_id = null) { if (empty($filter_id) && !empty($this->data['Lead']['employee'])) { $filter_id = $this->data['Lead']['employee']; } // Rest of code here } hth grigri On Jul 21, 11:00 am, james wrote: > Thanks grigiri - i'll get on it! > > out of

Re: Using plugin Helpers in main app doesn't seem to work

2010-07-21 Thread euromark
cake1.3? try Helpername->out();?> On 21 Jul., 11:35, kadanis wrote: > Don't know if its me or cake, but I can't get a helper from the plugin > to load in the main app. > > plugin helper is in /plugins/pluginname/views/helpers/helpername.php > > class HelpernameHelper extends PluginnameAppHelper

Unknown Problem

2010-07-21 Thread mirfan
I have deployed my cake application running on the following url socialbidz.com/sb/sb i have got a serious problem when i keep the debug mode to 0 its display "the requwsted url is available on this server", and when i set the debug to 2 then it is ok and displaying everything, any solution. Che

Re: calling method passing employee_id variable

2010-07-21 Thread james
Thanks grigiri - i'll get on it! out of interest, how would that be accomplished by usnig the data[] instead of passing the id parameter? It would be useful i guess to avoid the redirect every time if possible On 21 July, 10:27, grigri wrote: > Ok, this setup will give you a post-redirect-get me

Using plugin Helpers in main app doesn't seem to work

2010-07-21 Thread kadanis
Don't know if its me or cake, but I can't get a helper from the plugin to load in the main app. plugin helper is in /plugins/pluginname/views/helpers/helpername.php class HelpernameHelper extends PluginnameAppHelper { function out(){ return $this->output('testing out method from plugin'

Re: calling method passing employee_id variable

2010-07-21 Thread grigri
Ok, this setup will give you a post-redirect-get mechanism. You could also forgo the requirement for the id to be passed as a parameter, and just use the posted data[] - this would avoid the redirect. Some kind of validation would be good to add, too. View: create('Lead', array('action' => 'fil

calling method passing employee_id variable

2010-07-21 Thread james
Im having a real noob time with this! Im trying to refine the information that is represented in an index based on the selection from a combo box which has a list of employees. The user selects the employee they want, clicks go and view then gets refined to all records associated to that employee_

Re: Cannot send the email to more than one recipient.

2010-07-21 Thread googong
Thank you for all suggestion. I used SwiftMailer with Cake 1.1 and now I'm trying email component in Cake 1.2 The reason I'm going to send email to many recipient because we're testing the system. In production, I agreed it's very bad idea to put them all in "to". Now, I'm just wonder how to confi

Re: Email Component

2010-07-21 Thread Jeremy Burns | Class Outfit
Have you tried clearing the cache (/app/tmp/cache/...and sub folders)? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 21 Jul 2010, at 03:06, Hugo M wrote: > Mm... if you have Linux you can check in /etc/php5/apache2/php.ini the > sendmail configuration and

Re: Phrase inflections

2010-07-21 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/953/Inflections Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Jul 2010, at 18:36, desheffer wrote: > I have a model called LeaveOfAbsence. The proper English name for the > pluralized controller would be "LeavesOfAbsence" rat

Re: CakePHP 1.3.2 Pagination Error under Plugin

2010-07-21 Thread Louie Miranda
Try changing from: class ClientsController extends CoreAppController to: class ClientsController extends AppController -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Wed, Jul 21, 2010 at 1:30 PM, Bryan de Asis wrote: > I'm having errors when trying to ex

Re: Unicode problem between controller and view

2010-07-21 Thread Louie Miranda
Thanks for the info Kirk! I'll be using this as well in the future. -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Wed, Jul 21, 2010 at 10:14 AM, Kirk wrote: > I thought it might get annoying... my conversation with myself. But I hope > it helps someone! >

CakeFest 2010 - Last chance for cheap tickets!

2010-07-21 Thread Graham Weldon
The End is Nigh! (for early-bird ticket pricing) CakeFest has always offered cheaper tickets for those that purchase as early as possible. This year, the early bird ticketing finishes on the 24th July. Following the 24th, ticket prices will be raising to