Re: Acl giving permissions on afterSave function of a Model?

2013-05-15 Thread Ciul
* * *$aroNode = array(* *'User' => array('id' => $this->data['Post']['user_id'])* *);* * * * * *$Permission = ClassRegistry::init('Permission');* *$Permission->allow($aroNode, $acoNode);* *}* *What do you think?* On Wednesday, May 15,

Acl giving permissions on afterSave function of a Model?

2013-05-15 Thread Ciul
Hi there everyone. I'm starting to give my first steps with Acl and it's going well until now. Ok, now, I want to give permissions to some Acos after creating an Object that is an Aro. Example: Give permission to a User to update, delete a Post that he has just created. I wanted to use the aft

Re: TreeBehavoir cannot manage CHAR(36) for columns

2013-05-09 Thread Ciul
Ah got it. Thank you a lot André. On Thursday, May 9, 2013 1:33:08 PM UTC-5, André Luis wrote: > > It´s because the lft and rght are the position of the row, and have no > relationship with ID´s... > > Em quinta-feira, 9 de maio de 2013 15h24min00s UTC-3, Ciul escreveu: >&g

Re: TreeBehavoir cannot manage CHAR(36) for columns

2013-05-09 Thread Ciul
A screenshot of aros table. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subsc

Re: TreeBehavoir cannot manage CHAR(36) for columns

2013-05-09 Thread Ciul
guide? On Thursday, May 9, 2013 1:06:35 PM UTC-5, André Luis wrote: > > Yes, it supports very well... At least in CakePHP version 2.2.something or > above i never had a problem > > Em quinta-feira, 9 de maio de 2013 12h16min23s UTC-3, Ciul escreveu: >> >> Hi there, >

TreeBehavoir cannot manage CHAR(36) for columns

2013-05-09 Thread Ciul
Hi there, I just wanted to make you notice that TreeBehavior is not supporting using of CHAR(36) instead of INT for it's columns. Regards -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscr

Re: How can I keep a user logged in?

2013-05-01 Thread Ciul
COOKIES http://book.cakephp.org/2.0/en/core-libraries/components/cookie.html Cookies are normally used for persistent sessions. Regards On Tuesday, April 30, 2013 10:02:49 PM UTC-5, Shahruk Khan wrote: > > The Miles component is not what I'm looking for. Right now, I log users in > via Facebook

Re: Carregar campo tipo tinyint(1)

2013-04-30 Thread Ciul
'status', array(* *'checked' => false // This can be true or false, depending if you want it active or inactive respectively.* *));* Regards, Ciul *Translation:* *Guys, good afternoon.* * * *I did a CRUD client, where

Re: Best way to set up this Relation

2013-04-30 Thread Ciul
gs on. Also, in this way, I think you won't be needing Actors, Directors and ScriptWritters Models and Controllers as separate stuff, just Celebrities. Now that will depend on the other features and how the whole app is expected to work. Regards, Ciul -- Like Us on FaceBook https://www.fa

Re: Cake 2.1 Events:

2013-04-30 Thread Ciul
Hi again @phpMagpie, I've just found two better ways to achieve what you wish. #1 Override the Model "implementedEvents" method. If you check the CakePHP Model class code you see that it already implements CakeEventListener class). /** * Returns a list of all events that will fire in the mode

Re: Cake 2.1 Events:

2013-04-30 Thread Ciul
Hi @phpMagpie, from my personal point of view, you are doing it right. Since you were not too much confident about where to attach events to the EventManager, well, I propose two ways I think, might be cleaner that in the Controller according to your example. Method #1: Use CakePHP bootstrap u

Error on find on hasAndBelongsToMany relationed models

2013-04-24 Thread Ciul
I'm having troubles to restrict a find operation based on a related model field within a hasAndBelongsToMany relationship. *// Wedding Model* *public $hasAndBelongsToMany = array('Guest');* * * *// Guest Model* *public $hasAndBelongsToMany = array('Wedding');* * * *Then, calling in Guest Controll

Overriding Core a class while extending it

2012-10-12 Thread Ciul
Hi there, I want to override ConnectionManager class while extending it just to rewrite a few things inside it. Thus would like just to extend the original one. I created a APP/Lib/Model/ConnectionManager.php and yes, Cake loads it instead of Core one, but I want to extend original one to modi

Re: Hierarchical data base relations with CakePHP

2012-10-08 Thread Ciul
Got an idea seeking at Google. Create the PanoMoment, ImageMoment, VideoMoment models and controllers, which extend the common Moment classes (model and controller). Maybe that way? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You

Hierarchical data base relations with CakePHP

2012-10-08 Thread Ciul
Hi there, wanted to ask for advices from you, Cake pals, about a problem I have to solve for my app. I have these models: - Event: an Event is what in real life e.g. a party, a social meeting, a wedding, etc. - Moment: an Event hasMany Moments, e.g. in a wedding, when the bride arrives, when t

Re: complex find()

2012-08-31 Thread Ciul
Hi Rockbust, how did you solved to get user data which Attendance match from the array of Attendance u got? I have same issue (with different data but same relations) and I'd appreciate your help. Thanks On Thursday, August 30, 2012 8:48:02 PM UTC-5, rockbust wrote: > > ok figured it out now..

Epub format Cookbook not working

2012-03-04 Thread Ciul
Hi, I love the new design of the Cakephp site. Guys, please check the epub format Cookbook download link, it seems not working :: 404 error Regards, Ciul -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http

My Model doesn't validate anything

2011-06-26 Thread Ciul
Hi CakePHP pals. I'm reading about CakePHP, I come from CodeIgniter and well, I've liked a lot what I've seen until now. I am following examples for Model Data Validation through the $validate var but I don't what I might be doing wrong but my model doesn't validate anything, I mean, it throws er