Cakes ACL with one more Layer

2012-02-13 Thread ricktap
Hi everyone, I'm facing a problem that I'm unable to solve on my own. I'm building a management software for rental companies. The software can manage different companies with their vehicles, each company owner is only allowed to view their own vehicles and in each company there are different

Re: Auth Component CakePHP 2.0

2012-02-13 Thread Alexandre Leprêtre
Hi Ahmed, thanks a lot for your help. My array looks like this now, but it doesn't work better. public $components = array( 'Acl', 'Auth' = array( 'authorize' = array( 'Actions' = array('actionPath' =

Re: Auth Component CakePHP 2.0

2012-02-13 Thread Alexandre Leprêtre
It actually worked with 'fields'. thanks for your help :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group,

Re: Helper aliasing acting weird in 2.1 Beta

2012-02-13 Thread Rodrigo Rodrigues Moyle
Did you try this: class PdfHelper extends AppHelper { public $helpers = array( Table = array( className = PdftableHelper ) ); } -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help

Re: cake 2.0.5 AppExceptionRenderer not found error

2012-02-13 Thread Daniel
Do you have the line in app/Config/bootstrap.php: App::uses('AppExceptionHandler', 'Lib'); See: http://book.cakephp.org/2.0/en/development/exceptions.html#create-your-own-exception-handler-with-exception-handler -- Our newest site for the community: CakePHP Video Tutorials

Re: Send user to specific controller/action from front page?

2012-02-13 Thread Rodrigo Rodrigues Moyle
Use the redirect routing http://book.cakephp.org/2.0/en/development/routing.html#redirect-routing -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

FPDF with Cake

2012-02-13 Thread Rogerio
Hello guys, Somebody is using FPDF with Cake 2.0. I created a Helper like http://bakery.cakephp.org/%20%20%20articles/view/4caea0dd-b838-4fcb-aa20-457d82f0cb67, if somebody can help i'll thank you. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

Re: Edit enabled grid interface?

2012-02-13 Thread Joey Mukherjee
On Thu, Feb 9, 2012 at 10:42 AM, Daniel danwgr...@gmail.com wrote: It might work. I will need to link each row of the spreadsheet with a row on the database, but I don't necessarily need to store the spreadsheet data on the database. We did something similar with jQuery and Jeditable.

Cannot change my baked view. Help!

2012-02-13 Thread bobzibub
Hi all; I've turned off caching client and server (deleted the files in app/ tmp/cache/m/p/v) , yet changes I make to the view (in this case add.ctp) are not rendered. I'm stumped. It is rendering an autogenerated one--I can delete the vew.ctp file and nothing changes. db table is named

Re: Cannot change my baked view. Help!

2012-02-13 Thread euromark
is there some $scaffold = true in your controller? On 13 Feb., 17:55, bobzibub bobzi...@gmail.com wrote: Hi all; I've turned off caching client and server (deleted the files in app/ tmp/cache/m/p/v) , yet changes I make to the view (in this case add.ctp) are not rendered. I'm stumped.  It

Re: Cannot change my baked view. Help!

2012-02-13 Thread bobzibub
Thank you so much!! That was it!!! B On Feb 13, 10:42 am, euromark dereurom...@googlemail.com wrote: is there some $scaffold = true in your controller? On 13 Feb., 17:55, bobzibub bobzi...@gmail.com wrote: Hi all; I've turned off caching client and server (deleted the

Re: request-is('post') v request-is('put')

2012-02-13 Thread McScreech
No one willing to explain this one? On Feb 6, 11:12 am, McScreech scre...@sympatico.ca wrote: OK, I get that. Then the core of my question is: The condition in add function makes sense to me:     if ($this-request-is('post')) But why does the edit function use this:     if

Re: request-is('post') v request-is('put')

2012-02-13 Thread McScreech
I am attempting to use the same input form for both add and edit actions. echo $this-Form-create('Clon'); So, when I create the form as above, then access the output via both add and edit actions I see the following html generated: form action=/GPDdev/clons/add id=ClonEditForm

How to detect which button on input form pressed?

2012-02-13 Thread McScreech
PHP 5.3.3, CakePHP 2.0.6 echo $this-Form-submit('Submit', array('div'=false, 'name'='Submit' )); echo $this-Form-submit('Cancel', array('div'=false, 'name'='Cancel' )); If I code multiple buttons on my form as above, how do I detect when the Cancel button is pressed? McS -- Our newest site

Re: How to detect which button on input form pressed?

2012-02-13 Thread Tilen Majerle
if (isset($this-request-data['Submit'])) {} or if (isset($this-request-data['Cancel'])) {} -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/2/13 McScreech scre...@sympatico.ca PHP 5.3.3, CakePHP 2.0.6 echo $this-Form-submit('Submit', array('div'=false, 'name'='Submit' )); echo

Can't get .htaccess override to work in 2.0

2012-02-13 Thread Yves S. Garret
Ok, here's my problem, after going through the install instructions and getting most of the problems resolved (will deal with the database connection once I start a project), I still get this nastiness when I go to my CakePHP 2.0 page. *Warning*: _cake_core_ cache was unable to write

Re: Can't get .htaccess override to work in 2.0

2012-02-13 Thread 0x20h
As the last warning states, your cache directory is not writeable. Make it writeable to the your webserver's user, e.g. chmod -R 777 app/tmp Am 13.02.2012 21:16, schrieb Yves S. Garret: Ok, here's my problem, after going through the install instructions and getting most of the problems

Re: Can't get .htaccess override to work in 2.0

2012-02-13 Thread Yves S. Garret
It worked! Thanks. On Mon, Feb 13, 2012 at 3:34 PM, 0x20h k...@informatik.uni-marburg.dewrote: As the last warning states, your cache directory is not writeable. Make it writeable to the your webserver's user, e.g. chmod -R 777 app/tmp Am 13.02.2012 21:16, schrieb Yves S. Garret: Ok,

Re: Helper aliasing acting weird in 2.1 Beta

2012-02-13 Thread José Lorenzo
I'm not sure you can alias helpers in helpers, it is definitely possible in controller. I will check that today. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their

Re: Cakephp 2 schema and foreign key

2012-02-13 Thread José Lorenzo
What do you mean with supporting foreign keys exactly? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group,

Re: How to detect which button on input form pressed?

2012-02-13 Thread thatsgreat2345
I understand why there might be applications in which you want to know what data was in the form when the user clicked cancel, but if you're canceling why are you submitting the form? Why not just link them back to the index or wherever they came from. On Feb 13, 12:02 pm, McScreech

Re: How to detect which button on input form pressed?

2012-02-13 Thread McScreech
Thank you, that did it. McS On Feb 13, 3:05 pm, Tilen Majerle tilen.maje...@gmail.com wrote: if (isset($this-request-data['Submit'])) {} or if (isset($this-request-data['Cancel'])) {} -- Lep pozdrav, Tilen Majerlehttp://majerle.eu 2012/2/13 McScreech scre...@sympatico.ca PHP

Re: How to detect which button on input form pressed?

2012-02-13 Thread McScreech
That's exactly what I am doing. If they click Cancel I redirect back to the referring page. McS On Feb 13, 4:34 pm, thatsgreat2345 thatsgreat2...@gmail.com wrote: I understand why there might be applications in which you want to know what data was in the form when the user clicked cancel, but

paginate recursive

2012-02-13 Thread Waterschaats
I have a Route model that's related to a Event model wich contains a Event.user_id. Now I want to filter Routes model by Route.id and the Event model by Event.user_id. How do I accomplish that with paginate? $this-paginate = array( 'Route'=array(' conditions' = array(

Re: paginate recursive

2012-02-13 Thread Daniel
Something like this perhaps: $this-paginate = array( 'Route' = array( 'limit'= 10, 'page' = 1, 'conditions' = array('Route.id' = $value), 'recursive' = -1, 'contain' = array( 'Event'=

Re: Cakephp 2 schema and foreign key

2012-02-13 Thread Mohammad Naghavi
For example if there is a hasMany relation, then the tables from the contained module would also have a foreign key constrain to the containing one. an additional DB consistency step. PHP ASP .Net 3.5 web developer Java C# desktop developer

Re: datetime array to string

2012-02-13 Thread rockbust
Yes i did get it done first with php but i needed to split my time and date inputs then convert and use concatenation. this was exactly what I was looking for. $sendDateAsString = $this-Queue-deconstruct('send_date', $this-data['Queue']['send_date']); thanks so much -- View this message in

cakeDC utils csvImport - fixed fields

2012-02-13 Thread elogic
Hi All, I am using cakeDC utils csvImport to import an uploaded CSV into a table. Everything is working besides one of the fixed fields. I have 3 fixed fields, 2 work as required but the other is skipped everytime. I cannot work out what is happening or why this is the case. It's not making sense

Re: cakeDC utils csvImport - fixed fields

2012-02-13 Thread Graham Weldon
Hey, Where is this code being run? beforeSave, afterSave, somewhere in the controller? If you haven't performed the save yet, then getInsertID won't work. Cheers, Graham Weldon http://grahamweldon.com e. gra...@grahamweldon.com p. (+61) 0407 017 293 Skype: grahamweldon On Tuesday, 14

Re: cakeDC utils csvImport - fixed fields

2012-02-13 Thread elogic
Thanks but that isn't the issue as I even tried putting it in manually i.e. $fixed = array('Property' = array('estate_id' = $estate_id, 'staff_id' = $staff_id, 'upload_id' = 3)); It's quite strange, I even renamed the field in the DB and in the fixed array but nothing is working. On Feb 14,