Backend/Frontend

2006-04-10 Thread zis
Hi, I'd like to know how all of you manage the backend of your sites. Do you write two distinct applications for the backend and frontend or do you use ACL to limit access to certain functions in the frontend? --~--~-~--~~~---~--~~ You received this message

Re: controller-callbacks with scaffolding

2006-04-10 Thread Attiks
Hi, I appear to have the same problem, do you know an easy solution? Thnx, Peter --~--~-~--~~~---~--~~ 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

Re: How to send to browser JavaScript code for execution? (AJAX request)

2006-04-10 Thread 100rk
I found article in wiki, which answers to my question, but it doesn't work even in fresh CakePHP installation (final). Could please someone try or inspect this code? CONTROLLER tests_controller.php class TestsController extends AppController{ var $components = array('RequestHandler');

Problem with extends - no access to parents var?

2006-04-10 Thread Attiks
The following code is not working, I get an error that currentUser isn't defined although it is declared public. Output is: GroupsController__beforeFilter AppController__beforeFilter AppController::currentUser=6 Notice: Undefined variable: currentUser in

error handling in Cake

2006-04-10 Thread sawa
Hello, I was wondering how I could catch an error in Cake? For example if I do $this-Model-save() in a controller and it fails, how can I discover a failure reason. For example: I would like to be emailed if an operation fails due to a database disconnection. save() function return only true or

DISTINCT Query

2006-04-10 Thread immure
I need to get a list of DISTINCT elements from a table. Looking through the Cake manual/wiki, I can't find any explicit way of doing it in the methods, so I'm making a query script to do it. The problem is that it returns nothing, has anyone got a better way of doing it? Or a fix for my query?

Re: Problem with extends - no access to parents var?

2006-04-10 Thread AD7six
Hi Attiks, You are missing a couple of things in your code. Try this: function beforeFilter () { debug ('AppController__beforeFilter'); //$currentUser = new User($this-Session-read('User')); $this-currentUser = new

Re: Problem with extends - no access to parents var?

2006-04-10 Thread Attiks
Thanks, It's working! --~--~-~--~~~---~--~~ 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 from this group, send email to [EMAIL PROTECTED]

Re: DISTINCT Query

2006-04-10 Thread nate
Pass it in the $fields parameter of the find or findAll method, i.e.: $this-NewsItem-findAll(null, Distinct NewsItem.source_name); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

The MySQL UTF8 Issue

2006-04-10 Thread [EMAIL PROTECTED]
I use mysql5 and utf8 table to store Chinese data. Everything insert into the utf8 tables though cake can be fetch out by cake fine. But when I use other database tools (such as MySQL Query Browser) to query the data which insert by cake will got unreadable characters. I'm so confuse on it,

Re: error handling in Cake

2006-04-10 Thread nate
If you do $db = ConnectionManager::getDataSource($this-Model-useDbConfig), that will give you a reference to the database connection object, from which you can retrieve query and connection errors. --~--~-~--~~~---~--~~ You received this message because you are

Re: How I change the layout of the home.thml

2006-04-10 Thread nate
Either set $this-layout in the controller, or pass the name of the alternate layout in the second parameter of $this-render( ). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,

Re: How I change the layout of the home.thml

2006-04-10 Thread Wasenbr
The question is: how I change the layout of the any view of the PagesController without change the pages_controller.php page of cake/libs/controller dir? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP

Re: How I change the layout of the home.thml

2006-04-10 Thread Samuel DeVore
You can take the pages_controller from libs/controller and put a copy in your app/controller directory then from there you can set layout for particular 'pages' based on a set of rules. Or if you make your own app_controller.php in your app you can set the layout there for pages as well Sam DOn

Re: Problem with Model access in AppController

2006-04-10 Thread Tobias Parent
I had this same problem - it appears to be a conflict with PagesController setting the $uses to null. I think. The only way I could define $uses in my app_controller was to comment out the $uses line in PagesController (and I HATE mucking with the core). However, I then went through the

Make a quick unobtrusive Table Sorting (Standardista / sorttable)

2006-04-10 Thread Olivier percebois-Garve
Hi I implemented that today, it was quick 'n easy, so I thought I share it. Probably many app can be enhanced with that. An unobtrusive way to DHTML sort the list of records outputted by the index() method. Based on script by Stuart Langridge and Neil Crosby. 1. download standardista and

Scaffold without standard conventions.

2006-04-10 Thread Gonçalo Marrafa
Hi. I'm portuguese and i like to use table names (hence model names) in my own language. The problem is that if i do this, i can't use scaffolding, because Cake assumes that the model associated with the controller i scaffold is the singularized controller's name (according to Cake's

Re: Scaffold without standard conventions.

2006-04-10 Thread Mika
I'm sure it would help if you either set the table name in the Model (useTable: http://api.cakephp.org/class_model.html#699e150b922e2ef4bb51cf7d46fef0ea) or use the inflections.php file in your app/config folder (http://api.cakephp.org/inflections_8php.html)