Scriptaculous effect running two times on $ajax->div

2009-09-28 Thread Kappa
Hi everybody, today I was doing a country-> region -> city selection page and i was trying to dynamically update the same $ajax->div('list'); according to the selected item. Everything was ok, until i tried to apply some effect on the 'before' callback (the same happened with the 'after' callback

Re: What do you develop in (ide, text editor, etc.)?

2009-03-01 Thread Kappa
Does the code completion works well with netbeans? I'm currently using Eclipse, and it's completion is not great.. for i period i used to work with Zend IDE ..and it was definitively great..but not free. Does anybody is using Aptana with cakePHP ? bye, Andrea On Feb 28, 11:34 pm, Gonzalo Se

Re: Very slow response times with CakePHP

2009-02-27 Thread Kappa
Where are you actually changing that? Because my bootstrap.php (the one in /cake/bootstrap.php ) have this: require CAKE . 'dispatcher.php'; no App::import there On Feb 9, 4:19 pm, Emanuel Nedelcu wrote: > I've reduce the request time of a page by changing bootstrap.php file > like this: >  //

Re: Using elements as views?

2009-02-25 Thread Kappa
Maybe (i don't know if is a valid solution) you can try to do this thing: you can import all the controllers, invoke their actions and then return their computed data , and set those as view variables something like: $this->set( 'articles' , $mycontroller->latest_articles() ); so inside your v

Re: Any one looking for a freelance work

2009-01-25 Thread Kappa
I'm interested, we can discuss about it, please send me the details in a private mail, thanks, Andrea On Jan 25, 9:55 am, Novice Programmer wrote: > Hello, > > Please get in touch with me if you are looking for a freelance work. I have > a site based on cakephp and want to add a few features

Re: Distant Association Issue

2009-01-16 Thread Kappa
If you set up properly the model associations, and set the recursive value of the $this->EventDeadline object to the number of associations you have, you can do : $this->EventDeadline->find('all', array( 'conditions'=>array('User.id'=>$user['User']['id']), 'order'=>'EventDeadline.due_

Re: Using a different path for image storage

2009-01-16 Thread Kappa
Why not using the html helper in view? $html->image('photo/HawaiiSurf.jpg'); Andrea On Jan 16, 5:40 pm, Stefano Manfredini wrote: > On 16 Gen, 11:48, g4b0 wrote: > > > Hi all, > > I'm trying to put some images in /app/webroot/img/photo, but the > > following html doesn't display anything: >

Re: Tabs in Layout... Help Please.

2009-01-14 Thread Kappa
Why not using "for_layout" variables? Just set into your controller action a "selectedtab_for_layout" variable and inside the layout (yes i said layout, not view) you can access it. On Jan 14, 5:42 pm, teknoid wrote: > If I understand this right, you are looking to set an "active" tab, > based

Re: Accessing a directory

2009-01-12 Thread Kappa
Why not configuring properly the .htaccess ? put a rule before the cake routing, in that way it will not be remapped in /app/webroot Bye, Andrea On Jan 12, 2:33 pm, Unite wrote: > On my servers WWW directory I have cakephp installed and it works. My > problem is I want to now add a comercial

Re: share function in views

2009-01-12 Thread Kappa
I agree with the helper solution, it's more scalable.. now you have 1 function soon you'll maybe have 1 hundred.. On Jan 12, 1:00 pm, Adam Royle wrote: > If it's just a simple function, then you can place it in bootstrap.php > and it will be globally available. > > Cheers, > Adam > > On Jan 12,

Re: Very slow response times with CakePHP

2008-12-18 Thread Kappa
aybe i should convert all those calls to direct URLs ..or at least do not use the array Url format ('controller'=>'posts','action'=>'view',34) but /posts/view/34 . thanks, Andrea On Dec 18, 3:30 pm, "Jon Bennett" wrote: > Hi Kappa,

Re: Using a model without a table

2008-12-18 Thread Kappa
Have you tried to reset the cache? Sometimes i have the same problem, and i solve it deleting the cache in /app/tmp/cache bye, Andrea On Dec 18, 6:55 pm, George wrote: > Hello. > > I'm pretty new to cake and am working on creating a reporting intranet > application. Basically I aggregate a b

Re: Very slow response times with CakePHP

2008-12-18 Thread Kappa
So, i've been experiencing some time problem too on a cakephp based portal. I have seen that with debug setted to 0 the speed increases a few.. but it's still to slow.. I also enabled caching on each requestAction (1 day) but nothing changed; the overall database time is quite small (40msec) but t

Re: Seperate Public/Admin Apps with Shared Models & Webroot?

2008-11-07 Thread Kappa
I agree with you, but at the same time i think that having separate webroot for admin and public app is quite hard, because often the admin app is used not oly to insert "written" data but also to upload images, videos,files and so on.. and i suppose that all those data have to be put inside a "co

Re: Admin + Members suggested setup??

2008-10-31 Thread Kappa
Admin routing and ACL are two different things, admin routing is just a "quick way" to have some action not accessible from everybody with a few efforts. And from what i know (but it should be cheched) at least in Cake 1.2 there's also the availability of some "super_admin" methods. Anyway a nice

Re: ACL troubles

2008-10-29 Thread Kappa
first of all sorry for the empty message that i sent before this one. Personally i created my own ACOs tree structure in this way, i added a root node then i created two big branches 'controllers' and 'admin' $aco->create(array('parent_id' => $root_id, 'model' => null, 'alias' => 'controllers'

Re: ACL troubles

2008-10-29 Thread Kappa
On Oct 29, 8:03 am, cbankier <[EMAIL PROTECTED]> wrote: > I know there are ample tutorials on acl, and a few posts in here, but > I haven't been able to find anything to help my specific problem. > I'm using acl with auth to control access to actions - that all works > fine on my normal controll

Re: user name on default.ctp

2008-10-27 Thread Kappa
Anyway that's the case in which you should consider creating an Element to render inside the layout, generally it's not a very nice thing to put that kind output inside the layout. bye, Andrea On Oct 27, 11:53 am, Carlos <[EMAIL PROTECTED]> wrote: > Thanks > I must be very bad because I spent

Re: Linking to non-admin action from admin-action

2008-10-09 Thread Kappa
In order to redirect to an admin action, just put the key 'admin'=>true into the array of redirection. On Oct 9, 6:15 pm, Fran Iglesias <[EMAIL PROTECTED]> wrote: > Hi, > > El 09/10/2008, a las 18:11, Sam Sherlock escribió: > > > I think you have to add prefix => false to the array 2nd param   >

Re: Is there ANY way to insert page-specific code in to $scripts_for_layout??

2008-10-08 Thread Kappa
This is what i did some time ago: File: app_controller.php (so every controller has it for free) function beforeRender(){ //Load a controller specific CSS if( file_exists(CSS.$this->name.'.css') ){ $this->set('controllercss_for_layout',$t

Re: Is there ANY way to insert page-specific code in to $scripts_for_layout??

2008-10-08 Thread Kappa
Why not setting a variable 'specific_js_for_layout' with $this- >set('specific_js_for_layout',#WHAT YOU WANT#); inside the beforeFilter or beforeRender? On Oct 8, 9:54 am, grigri <[EMAIL PROTECTED]> wrote: > What about $this->addScript() ? > > From the view: > > $this->addScript(""); > > Adds it

Re: Does calling model methods from elements break MVC pattern?

2008-10-05 Thread Kappa
First of all, i must admit that this discussion is becoming very interesting, because i often find myself thinking if the way i'm doing something with CakePHP is actually the right way. My suggestion in using the after_find was just an example of a restricted case, but I think that it's not the t

Re: Does calling model methods from elements break MVC pattern?

2008-10-04 Thread Kappa
You are right, but the fact is that in this case we are merging more principles, and the correct thing (as far as design is concerned) in my opinion is to let the product to deal with its own responsibilities as well, but invoke those operations from the controller and not from the view. In that w

Re: Does calling model methods from elements break MVC pattern?

2008-10-03 Thread Kappa
hi everybody, I'm not a MVC guru,but in my opinion, the fact that a view can import something and invoke actions not performed by a controller, but from a model, breaks somehow the MVC pattern. Maybe if you need some action to manipulate data of a model before display them, you should use the afte

Re: Does calling model methods from elements break MVC pattern?

2008-10-03 Thread Kappa
hi everybody, I'm not a MVC guru,but in my opinion, the fact that a view can import something and invoke actions not performed by a controller, but from a model, breaks somehow the MVC pattern. Maybe if you need some action to manipulate data of a model before display them, you should use the afte

Re: Two foreignKey belongsTo same Model

2008-09-11 Thread Kappa
You have to use two different Keys for the association, something like: var $belongsTo = array( 'Creator' => array( 'className' => 'User', 'foreignKey' => 'created_id' ), 'Modifier' => array( 'className' => 'User', 'foreignKey' => 'modified_id' ) ); f

Re: retrieving an ARO list that have access to an ACO

2008-09-05 Thread Kappa
I have been working with AROs and ACOs in the last period, and i think the the main problem of your question relies on the fact that both AROs and ACOs are organized as trees (MPTT), so since in general there is no explicit 1-1 association between ARO and ACO, but each rule it's tipically express