Re: loading plugin in cake 1.3 bootstrap

2015-10-23 Thread Dario Savella
I realize this is ancient history, but I cannot find in the docs/books how to enable DebugKit in CakePHP 1.3. (I am doing support on an old app that seems to have been stripped of all the "unused" files). GitHub docs for DebugKit refer to lighthouse.com, but there does not seem to be anything

Re: loading plugin in cake 1.3 bootstrap

2015-10-23 Thread Dario Savella
Never mind. Just in case someone is not daring enough to try, it is done in the same way by adding: public $components = array( 'DebugKit.Toolbar' ); to AppController or the specific one where it is needed. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter

Re: Converting an existing site using different framework to CakePHP

2014-10-29 Thread Dario Savella
Unless the existing/old framework is derived from CakePHP, there is little chance that the application is organized in such a way that you can import it into CakePHP (or in any other popular framework for that matter). Even a manual conversion is likely to require a lot of time and to produce

Re: find('all') with results using id as the index instead of 0,1,2,3,...

2014-10-19 Thread Dario Savella
I think Hash http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::combine could be of help. Something like: $new = Hash::combine($result, '{n}.id', '{n}.otherdata'); -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP ---

Re: Multiple role Authorization not working (based on tutorial) Cake 2.5.4

2014-09-25 Thread Dario Savella
I think you will need to refer to the passed $user argument as shown in the docs: http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html#authorization-who-s-allowed-to-access-what public function isAuthorized($user) { // Admin can access every action if

Re: Best practice to get menu array

2014-09-19 Thread Dario Savella
By the look of it what you need is a Plugin and inside the Models for the tables you mentioned and at least an Helper to produce the HTML output. I recently used the MenuBuilder Plugin. You will have to add the logic to retrieve the menu from your Models though. On Saturday, September 13, 2014

Re: cant find the problem: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right sy

2014-07-06 Thread Dario Savella
Hi there, I think there's one extra, spurious comma in the UPDATE after :pageText (right before WHERE as the SQL error message tells you): On Saturday, July 5, 2014 3:52:34 PM UTC+2, Pascal Houtenbos wrote: $stmt = $db-prepare('UPDATE page SET pageTitle = :pageTitle, pageText = :pageText,

Re: cant find the problem: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right sy

2014-07-06 Thread Dario Savella
... and... What has this to do with CakePHP ? -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving

Re: Extending FormHelper causes error in it

2014-06-09 Thread Dario Savella
I find it difficult to understand where you added the useTag() function. If it is in the FormHelper.php class, you probably need to use echo $this-Form-useTag(...) If you have it in your own Helper class LanguageHelper (a much better solution so not to change the CakePHP's core), you will need

Re: CakePHP Database Tables exposed!

2014-05-17 Thread Dario Savella
Besides, it does not take a rocket scientist to figure out that any table could be accessed by entering the URL: http://yourdomain/plural_of_table_name (plus /add, /edit/id etc...). If you are concerned about access control, you should implement

Re: Using JQuery UI Datepicker for formatted date fields (dd/mm/yy)

2014-05-10 Thread Dario Savella
Thank you for replying. I was afraid that was the case... I will build a small helper to do that. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP

Using JQuery UI Datepicker for formatted date fields (dd/mm/yy)

2014-05-06 Thread Dario Savella
I was able to make this work without much of a problem using dates in the format they arrive from the database. But that's not an acceptable for the users... and here I started having problems. It's easy enough to set the dateFormat of the datepicker (as suggested in posts I've seen around),

Re: Problems with ACL ARO ACO

2014-05-06 Thread Dario Savella
I am wressling myself with Acl and I've found helpful to use the AclExtras plugin. There's a convenient (although slow) page that uses checkboxes to grant permissions. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this