Re: Simple association problem

2007-06-22 Thread Mauro
Thank you all! the `s` wasn't there, it is true :( I hate when tthis happen Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com

Re: Session expire after browser window close

2007-06-22 Thread Grant Cox
I'm still not understanding what the problem is. Are you saying that: You log into your site Close your browser (all windows) Load your browser again, visit your site, and you are automatically STILL logged in? If this is the case, please describe what CakePHP sessions you have (all the session

Re: Simple association problem

2007-06-22 Thread Joshua Benner
Perhaps try: var $belongsTo = array( (Note the 's' in there!) Mauro wrote: > Hi, > I am having some problems with belongTo, > here is my code: > > Model: > >class Document extends AppModel > { > > var $belongTo= array( > > 'Recorder' => >

Re: slash escaping

2007-06-22 Thread Divagater
urlencode() should do the trick: http://us.php.net/urlencode ~Billy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe fr

_selectedarray() error in 1.1.8.3544. Need some help...

2007-06-22 Thread DanielMedia
Hi, I'm using the check box helper for HABTM that is found here on the bakery: http://bakery.cakephp.org/articles/view/create-multiple-checkboxes-instead-of-a-multiple-select-in-your-views Adding HABTM to the database doesn't seem to be a problem but on edit I get this error in my controller:

Re: I keep seeing 'e' when reading tutorials.

2007-06-22 Thread Pablo Viojo
e() is a shorcut for echo() defined on basics-php -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net On 6/22/07, inVINCable <[EMAIL PROTECTED]> wrote: > > > I am currently following a tutorial, and this line appears in my > code: > > if ($error) > { > e('Invalid Login'); > } > > > Obviously thi

slash escaping

2007-06-22 Thread [EMAIL PROTECTED]
Hello guys, I have the following issue, I'm retrieving information from a table which has slashes in its records, for example, the expedient of a given patient has this form 1349523/05, so when I send this via url in order to retrieve a record info cake interpret it as a parameter of the controll

Re: I keep seeing 'e' when reading tutorials.

2007-06-22 Thread [EMAIL PROTECTED]
http://manual.cakephp.org/chapter/constants On Jun 22, 4:21 pm, inVINCable <[EMAIL PROTECTED]> wrote: > I am currently following a tutorial, and this line appears in my > code: > > if ($error) > { > e('Invalid Login'); > > } > > Obviously this means there is an error. The problem is I do not > re

Re: Simple association problem

2007-06-22 Thread soytuny
Maybe set DEBUG to 2 and look at the SQL being generated. Does $this->Document->findById(1) return the same thing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send ema

I keep seeing 'e' when reading tutorials.

2007-06-22 Thread inVINCable
I am currently following a tutorial, and this line appears in my code: if ($error) { e('Invalid Login'); } Obviously this means there is an error. The problem is I do not remember defining $error anywhere, nor do I have any idea what the single 'e' means. Thank you for any advice on the matter

Simple association problem

2007-06-22 Thread Mauro
Hi, I am having some problems with belongTo, here is my code: Model: array('className'=> 'Recorder', 'conditions' => '', 'order'=> '', 'dependent'=> true,

Re: Best method for extending existing models/controllers?

2007-06-22 Thread Jonathan Langevin
Thanks for the direction Dan :-) If you have any more links about Components/Behaviors, fire away. I'm searching to find whatever I can on the topics, so I can make sure I do this right Thanks again! On 6/22/07, danfreak <[EMAIL PROTECTED]> wrote: > > > Yeas, use behaviors for generic/abstract m

Re: Best method for extending existing models/controllers?

2007-06-22 Thread danfreak
Yeas, use behaviors for generic/abstract model actions, and components for generic/abstract controllers actions! Also have a look at this post: -- More about Behaviors ? http://groups.google.com/group/cake

Re: To-do like task manager

2007-06-22 Thread Jonathan Langevin
To try to understand better, why does the task_type need to be recreated every year? On 6/22/07, Anibal Caixinha <[EMAIL PROTECTED]> wrote: > > > Hello, I'm trying to create a task manager aplication for an > acountants firm. > > I have several regular tasks so I defined the aplication in two > t

Re: Session changes

2007-06-22 Thread John David Anderson (_psychic_)
On Jun 22, 2007, at 11:55 AM, BoSc wrote: > > anyone?? Please don't bump an issue without trying a different approach. Make it more simple, supply more details. Something. Thanks, John > > On Jun 21, 11:07 am, BoSc <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I'm currently figuring out sessions

Re: Session changes

2007-06-22 Thread BoSc
anyone?? On Jun 21, 11:07 am, BoSc <[EMAIL PROTECTED]> wrote: > Hi, > > I'm currently figuring out sessions on my develop environment (XP, > Apache 2.0, PHP 5.0, newest Cake). Sessions don't seem to work > however, > > I have a index inside a controller: > > function index() { > $this->Session->

Re: Does Model->query() modify queries at all?

2007-06-22 Thread Jonathan Langevin
thanks ;-) On 6/22/07, rtconner <[EMAIL PROTECTED]> wrote: > > > SELECT GROUP_CONCAT(name ORDER BY name SEPARATOR ',') > > On Jun 22, 5:57 am, "Jonathan Langevin" <[EMAIL PROTECTED]> wrote: > > out of curiousity, where was the location of the whitespace? (to help > avoid > > similar errors on my e

To-do like task manager

2007-06-22 Thread Anibal Caixinha
Hello, I'm trying to create a task manager aplication for an acountants firm. I have several regular tasks so I defined the aplication in two tables : "task_type" name; time-> montly or every 3 monts; end_date -> the date when the task has to be completed "task

Re: Javascript submit code with Ajax post

2007-06-22 Thread noso
OK I found one thing. The form has to be underneath the tree. But I still can't submit the form ... On Jun 22, 3:47 pm, noso <[EMAIL PROTECTED]> wrote: > Hi Jeremy! > > Also NL of BE ? ;-) > > Anyhow. Great help! > I implemented your code. But I faced another problem: > Because of $ajax->submit(

Re: requestAction, modularity and multiple forms in one view

2007-06-22 Thread R. Rajesh Jeba Anbiah
On Jun 22, 12:40 pm, Vincent <[EMAIL PROTECTED]> wrote: > Hello - > > Did you ever get some answers on that. I have the same problem. I have > 2 forms on my page and I am not sure how to manage them! Not tested, but look for the 'model' option in $form->create(). Something like this might

Re: Does Model->query() modify queries at all?

2007-06-22 Thread rtconner
SELECT GROUP_CONCAT(name ORDER BY name SEPARATOR ',') On Jun 22, 5:57 am, "Jonathan Langevin" <[EMAIL PROTECTED]> wrote: > out of curiousity, where was the location of the whitespace? (to help avoid > similar errors on my end :-) ) > > On 6/21/07, rtconner <[EMAIL PROTECTED]> wrote: > > > > > Nev

Re: Javascript submit code with Ajax post

2007-06-22 Thread noso
Hi Jeremy! Also NL of BE ? ;-) Anyhow. Great help! I implemented your code. But I faced another problem: Because of $ajax->submit() my dhtmlTree isn't draggable anymore. It's just printed out link the HTML tree. If I push the "save" button it does nothing (maybe because of the dhtmlTree problem)

Re: Amazon S3?

2007-06-22 Thread Jonathan Langevin
you could drop your class into Vendors, use it from there. On 6/22/07, Oreonix <[EMAIL PROTECTED]> wrote: > > > So I have been looking for a solution to using amazon S3 with > cakephp. I am still relatively new to cakephp. I have an amazon s3 > class file, that you can call functions from to cr

Amazon S3?

2007-06-22 Thread Oreonix
So I have been looking for a solution to using amazon S3 with cakephp. I am still relatively new to cakephp. I have an amazon s3 class file, that you can call functions from to create objects on amazons s3 repo from a posted file. How could I integrate this into cakephp? --~--~-~--~-

Re: Javascript submit code with Ajax post

2007-06-22 Thread noso
I removed the $uniq var... thnx On Jun 21, 5:09 pm, Jeremy David Pointer <[EMAIL PROTECTED]> wrote: > Jeremy David Pointer wrote: > > I'm not sure I'm getting to where your problem actually is because you > > haven't told us what is or is not happening. > > But... > > 0. I'm using Cake 1.2 so

Re: Best method for extending existing models/controllers?

2007-06-22 Thread Jonathan Langevin
Sorry, yes, I've built most of the Content model & controller, and I'm wanting to build additional model/controller extensions essentially for enhanced functionality I don't see how I could apply $uses within ContentController, as ContentController is what i'm wanting to use but now that I'm thin

Re: Best method for extending existing models/controllers?

2007-06-22 Thread Repsah
It looks to me that you are trying to build a controller... That business should be in your ContentController which $uses all the models that you want, although I'm not a great fun of "generic" controllers. On 6/22/07, Jonathan Langevin <[EMAIL PROTECTED]> wrote: > > I'm building a generic Cont

Best method for extending existing models/controllers?

2007-06-22 Thread Jonathan Langevin
I'm building a generic Content model, and I would like to build extensions such as Posts, News, etc, that would use Content for processing/storing the main posted content, while additional information for each item would be stored in it's own model (i.e.- a forum post would include info like the us

Re: Which editor you use for views ?

2007-06-22 Thread unimatrixZxero
TextMate ( http://macromates.com/ ) + CakePHP Bundle for .php and .thtml CSSEdit( http://macrabbit.com/cssedit/ ) for CSS unless I'm just making a tiny edit, that I'll just do in TextMate BTW those are both for Mac OS X --~--~-~--~~~---~--~~ You received this m

Re: Mystery, Edit action changes to Add action when validation fails...

2007-06-22 Thread Jonathan Langevin
I personally use $form->hidden('id'), dunno if $form->input would automagically create it as a hidden field (tho, knowing cake, it probably would) On 6/22/07, Dr. Tarique Sani <[EMAIL PROTECTED]> wrote: > > On 6/22/07, oleonav <[EMAIL PROTECTED]> wrote: > > > > > > I have posted this questions ear

Re: ASP.NET uses dataset, what does Cake use?

2007-06-22 Thread Chris Hartjes
On 6/22/07, TheTorst <[EMAIL PROTECTED]> wrote: > > I've just built my first small application with Cake. This is a really > small application using the following tables: groups, users, items, > groups_users, and items_users. My problem is that Cake generates way > to many queries when its process

Re: Simple use of 1.2 authComponent

2007-06-22 Thread Benedikt Laube
On 22 Jun., 10:43, sentel <[EMAIL PROTECTED]> wrote: > Hi all, > > could someone give me some insight on how to simply use the auth > component? As long as you do not need access control based on the auth component, it's very simple. A good tutorial which is still valid for 1.2 alpha is here: ht

Porting cakephp activerecord

2007-06-22 Thread LeonB
Hi all, I thought about porting cakephp's activerecord to other frameworks or just use it in other projects. Kind of like using PEAR:DB Is this possible? How much work would it involve and what could be the caveats? Can it be used stand-alone? Or is it that much woven into cakephp that it can't

Re: Mystery, Edit action changes to Add action when validation fails...

2007-06-22 Thread Dr. Tarique Sani
On 6/22/07, oleonav <[EMAIL PROTECTED]> wrote: > > > I have posted this questions earlier on but no replies so I'll ask you > again; > > --- > Strange things happen when using multiple validations rules in cake > 1.2. in combination with an edit action > > When requesting a edit action for example

Mystery, Edit action changes to Add action when validation fails...

2007-06-22 Thread oleonav
I have posted this questions earlier on but no replies so I'll ask you again; --- Strange things happen when using multiple validations rules in cake 1.2. in combination with an edit action When requesting a edit action for example admin/pages/edit/3 - in the view admin_edit.ctp the helper $form

Re: Does Model->query() modify queries at all?

2007-06-22 Thread Jonathan Langevin
out of curiousity, where was the location of the whitespace? (to help avoid similar errors on my end :-) ) On 6/21/07, rtconner <[EMAIL PROTECTED]> wrote: > > > Nevermind, whitespace is the culprit. > > > > > --~--~-~--~~~---~--~~ You received this message because

Re: ASP.NET uses dataset, what does Cake use?

2007-06-22 Thread Jonathan Langevin
BTW, if you're using version 1.2 of cake, apparently it has support for various different cache protocols, such as Memcache as Dan mentioned. That might be useful for you (I believe cache settings are core.php) On 6/22/07, TheTorst <[EMAIL PROTECTED]> wrote: > > > Yes, that sound pretty well thoug

Re: ASP.NET uses dataset, what does Cake use?

2007-06-22 Thread TheTorst
Yes, that sound pretty well thought. Additionally, I found this link http://www-128.ibm.com/developerworks/views/opensource/libraryview.jsp?search_by=cook+web+sites+CakePHP were some IBM guy had addressed Cake's cache helper. Once I read this article, I understood that the Microsoft's dataset wasn

Re: (Good) way of pulling data into view?

2007-06-22 Thread AD7six
On Jun 21, 4:36 pm, simon <[EMAIL PROTECTED]> wrote: > The code in that function (get_items_this_month) just does a findAll > based on the function parameters. Maybe someone can write a little function to hookinto request action that does the following if ($calledByRequestAction&&$justAFindAl

Re: SIGTERM bug

2007-06-22 Thread dardosordi
> (CN) `localhost' does NOT match server name!? Did you changed the servername? Anyway I had a similar one (php generating cores) and it was the zend optimizer, asked admin to turn it off and everithing worked like a charm. On Jun 21, 4:51 pm, francky06l <[EMAIL PROTECTED]> wrote: > Look's like

Re: (Good) way of pulling data into view?

2007-06-22 Thread dardosordi
Somethig like that, but with so litle understandig of ypur problem cant't help you more, anyway seems like you figured out a way of doing it. On Jun 21, 11:36 am, simon <[EMAIL PROTECTED]> wrote: > > In my experience, specific problems that warrant breaking rules are a > > lot rarer than many thi

Re: Graham Bird's AJAX tutorial in 1.2.x.x

2007-06-22 Thread dardosordi
>From the title i'm guessing you dont have short_tags enabled (), try using . On Jun 21, 11:23 am, Robert K S <[EMAIL PROTECTED]> wrote: > charsetTag has been changed to charset and I have my Scriptaculous > scripts in the right place (presumably: app\webroot\js). Still just > getting the Cake S

Re: Simple use of 1.2 authComponent

2007-06-22 Thread Divagater
Some one else just asked the same question about doing acl without having to add users to the aros table. I am not sure what the resistance there is. I Just think of it as another association where every user has one access request object. Here is how I use the auth component in 1.2. In app/app_

Re: ASP.NET uses dataset, what does Cake use?

2007-06-22 Thread Dinh
It is normal. PHP encourage share nothing architecture that is a very good thing on shared environment. However, you can cache the result set by using memcache, sharedance or any caching system that is exposed to PHP. Regards, Dinh On 6/22/07, TheTorst <[EMAIL PROTECTED]> wrote: > > > I've just

ASP.NET uses dataset, what does Cake use?

2007-06-22 Thread TheTorst
I've just built my first small application with Cake. This is a really small application using the following tables: groups, users, items, groups_users, and items_users. My problem is that Cake generates way to many queries when its processing my code. The debugger shown in the bottom of the page

Re: Model without a table

2007-06-22 Thread [EMAIL PROTECTED]
Nevermind. Stupid error. GRR. I just found that i needed to include the User model if i use the uses array (hehe, do you think i used the word use enough?) man google groups could really speed up its caching... On Jun 22, 12:12 am, Grant Cox <[EMAIL PROTECTED]> wrote: > You need to be more s

Re: Model without a table

2007-06-22 Thread [EMAIL PROTECTED]
Notice (8): Undefined property: UsersController::$User [CORE/app/ controllers/users_controller.php, line 89] if(empty($this->data) == false) { #print_r($this); if(($user = $this->User->validateLogin($this- >data['User'])) == true) { U

Simple use of 1.2 authComponent

2007-06-22 Thread sentel
Hi all, could someone give me some insight on how to simply use the auth component? Release: 1.2.0.5146alpha I'm converting a large site to cake and wish to make use of the auth component. When I start searching for information I always end up with acl, is this required by the auth component? I

Re: requestAction, modularity and multiple forms in one view

2007-06-22 Thread Vincent
Hello - Did you ever get some answers on that. I have the same problem. I have 2 forms on my page and I am not sure how to manage them! -V willi wrote: > Hi there! > > I'am very impressed about the huge capabilities of CakePHP and about > to create a bigger application after playing around and f

Re: Model without a table

2007-06-22 Thread [EMAIL PROTECTED]
Ok now i just tried somethign differe, I commented out the $uses=array("NavigationData") and i could login and everything.. then i uncommented it to see what error message i would get, and i got Fatal error: Call to undefined method stdClass::findAll() in /var/www/ cake/app/controllers/users_contr

Re: Problem with created date; It is not automatically saving to db

2007-06-22 Thread Grant Cox
Well, the inbuilt behaviour is hard-coded to "created", "modified" and "updated". However, you can easily throw a beforeSave() in your model, check if an id is already set (indicating UPDATE rather than INSERT) and set your data yourself. function beforeSave() { i

Re: A piece of Cake? Questions on Dispatcher & Decoupling

2007-06-22 Thread Grant Cox
Oh, and of course you can use routes to make all of your "sites" run through a single controller (if appropriate) even with different URLs, you can render without a layout so the HTML pages created by your designers are complete in themselves, and you can link to images/css etc directly (without u

Problem with created date; It is not automatically saving to db

2007-06-22 Thread Sridhar Gowda
Dear All, As we all know that in any table if we don't have primary key as id we can use our own key as primary by defining the $primaryKey in the Model var $primaryKey= 'TBP_Id'; Is there any other way so that i can change the created, modified filed to my own field. Because in my tab

Re: A piece of Cake? Questions on Dispatcher & Decoupling

2007-06-22 Thread Grant Cox
Well, the behaviour of a form is: 1. Display to user - populated with any existing data 2. Submit to some processor 3. If there is any submission error, display the form again with appropriate error messages 4. If there is no submission error, display/redirect to success page. Of course, more co

Re: Model without a table

2007-06-22 Thread Grant Cox
You need to be more specific with the problems you are having. Please post the error messages, and the code that causes them to appear. > Surely someone has actually used a model without a table before.. Yes, plenty of people, and "var $useTable = false" is all you need. --~--~-~--~---

Re: How to update a View-DIV and an element at once with Ajax-Submit-Button?

2007-06-22 Thread keymaster
On an earlier thread I suggested a simple approach - have two observeFields both monitoring the same field. Each updates a different div. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to