Re: French who works with cake??
Salut Olivvv, salut Fab, C'est exact. Utilisons le groupe français. Je m'y rends dans la foulée. A+ Chris --~--~-~--~~~---~--~~ Vous avez reçu ce message, car vous êtes abonné au groupe Groupes Google "Cake PHP" groupe. Pour envoyer des messages à ce groupe, envoyer un e-mail à cake-php@googlegroups.com Pour résilier votre abonnement à ce groupe, envoyez un courrier électronique à l'adresse [EMAIL PROTECTED] Pour plus d'options, veuillez visiter le groupe à http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: CakePHP Manual 0.10.x.2460
Updated manual: * Manual 0.10.9.2473 http://www.box.net/public/felmnrhpsu For reference: * Api 0.10.9.2378 http://www.box.net/public/q2fynh1ef8 * Api 0.10.9.2462 http://www.box.net/public/7r2v6osf8l Gustavo: Any luck with box.net? --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: The MySQL UTF8 Issue
I think this is a good idea. Why not make a ticket for it in trac? (https://trac.cakephp.org/) --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Scaffold without standard conventions.
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) --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Make a quick unobtrusive Table Sorting (Standardista / sorttable)
WebFx has a script you could use too: http://webfx.eae.net/dhtml/sortabletable/sortabletable.html --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: DISTINCT Query
Try setting debug to 2, to see what your qry looks like. --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Scaffold without standard conventions.
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 conventions). One possible solution to the problem would be to use the model specified in the $uses var (or the first one if it is an array). I think this little tweak would greatly benefit Cake since, as far as i can tell, there are many non english speakers out there using it that would be very happy with the improvement. I've already created a ticket requesting this (https://trac.cakephp.org/ticket/659) Thanks in advance. Best regards. -- Gonçalo Marrafa <[EMAIL PROTECTED]> --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: The MySQL UTF8 Issue
I had the same problem (with Cyrillic letters), and only/most elegant solution I found was to modify the core. Try this: in file "cake/libs/model/dbo/dbo_mysql.php" find function connect(). Replace these lines: if (mysql_select_db($config['database'], $this->connection)) { $this->connected = true; } with this: if (mysql_select_db($config['database'], $this->connection)) { mysql_query("SET names utf8"); $this->connected = true; } I wish there was more elegant solution, without modifying the core. Perhaps another setting in DATABASE_CONFIG (app/config/database.php), something like: var $default = array('driver'=> 'mysql', 'connect' => 'mysql_connect', 'host' => 'localhost', 'login'=> 'user', 'password' => 'password', 'database' => 'project_name', 'charset' => 'utf8', 'prefix'=> ''); --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: cake in Iss
Me adiciona no gmail que te dou uma ajuda. --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: selectTag onchange
echo $html->selectTag($fieldName, $optionElements, $selected=null, $selectAttr=array("onchange"=>"myFunction()"): should be fine. --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: The MySQL UTF8 Issue
check this: http://rossoft.wordpress.com/2006/02/11/mysql-and-utf-8/ --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: cake in Iss
Nando, I've tryed what you told me about virtual hosts in apache. With some changes like those: my website it's under d:/webserver/mywebsite and in hosts file I've tryed 127.0.0.1 mywebsite and mywebsite.local and all that I get it's a 'eternal' loading in my browser, and never get on the site. Tah I comment the line: #NameVirtualHost *:80 and I've got an 403 error [You don't have permission to access / on this server]. no htacess in the site. I would love to use apache as my webserver, but it seems to painfull use it. In iis with a couple clicks I have a website running, in apache there's so many things to do, and when it's all done, nothing works! RA under windows xp pro with sp2, apache 2 with php5 and mysql 4, if it will help anyone to help me... On 4/7/06, Rafael Apocalypse <[EMAIL PROTECTED]> wrote: > I'll try that! > > On 4/7/06, Nando Vieira <[EMAIL PROTECTED]> wrote: > > > > Hi RA. > > > > > > Configurar diretórios virtuais é baba! > > > > > > To configure vhosts/mod_rewrite on Apache: > > > > 1) Open httpd.conf > > - Uncomment the lines > > #LoadModule rewrite_module modules/mod_rewrite.so > > #LoadModule vhost_alias_module modules/mod_vhost_alias.so > > #NameVirtualHost *:80 > > - Change the line NameVirtualHost to > > NameVirtualHost 127.0.0.1 > > - Add a host. > > > > DocumentRoot c:/my-vhost > > ServerName myvhost > > > > 2) Create the folder c:/my-vhost. Put your files there. > > 3) Open the file c:/windows/system32/drivers/etc/hosts > > - Add the line below: > > 127.0.0.1 myvhost > > - Save the file > > 4) Restart Apache > > 5) Point your browser to http://myvhost > > > > Tell us if this works! > > > > -- Nando Vieira > > > > > > > > > > > -- > Rafael Apocalypse > ideiadigital > +55 31 3446.2555 > -- Rafael Apocalypse ideiadigital +55 31 3446.2555 --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: error handling in Cake
Yup, that helped, thanks a lot! --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
selectTag onchange
How do you add HTML options to a selectTag so you can call an onchange event? (I want to show/hide a div based on the selectTag's value) thanks --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Make a quick unobtrusive Table Sorting (Standardista / sorttable)
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 unpack it in the webroot/js folder. http://www.workingwith.me.uk/downloads/standardista-table-sorting.zip 2.In your index.thtml add : link("standardista-table-sorting/common"); ?> link("standardista-table-sorting/css"); ?> link("standardista-table-sorting/standardista-table-sorting"); ?> 3. Make sure your tablehas a class="sortable" and has a thead and a tbody: example: ID Title Modified Created ... etc Et voilà that's it !!! Hope somebody enjoy it. Olivvv --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Updating Packages in CakeForge
I found the relavent links, and have updated the locale package. If anyone has any comments or improvements to the tutorial I wrote last night (http://wiki.cakephp.org/tutorials:i18n), please either 'make that change' (Ooo, oo) or let me know, Cheers, AD7six --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Updating Packages in CakeForge
I found the relavent links, and have updated the locale package. If anyone has any comments or improvements to the tutorial I wrote last night (http://wiki.cakephp.org/tutorials:i18n), please either 'make that change' (Ooo, oo) or let me know, Cheers, AD7six --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: French who works with cake??
Salut Chris et Fab, Victor Hugo chef de service de Joseph Kessel, Impressionnant ;-) L'appli y gagnerait a intégrer le calendrier de l'admin pour les agents de collectivité. Si la demande de congé est prévue pour l'année d'après, l'utilisateur a à clicker beaucoup. @fab: va voir othauth sur les snippets de cakeforge. Olivvv PS: On devrait continuer ces discussions en francais uniquement le groupe francais, non ? chrisE wrote: > Bonjour, > Je suis responsable de projets à l'Adullact (= logiciels libres par et > pour les collectivités locales, http://www.adullact.org ) et j'ai > choisi d'utiliser cakephp en décembre dernier pour développer une > application de gestion du temps et des demandes d'absence. Nous avons > donc une petite expérience du framework. > > Comme d'autres personnes probablement, je trouvais qu'il serait très > intéressant de créer un groupe français et ... tylerfab lui l'a > fait. Super ! J'espère que le groupe s'étoffera rapidement pour que > nous échangions nos expériences respectives. De notre côté, on se > régale d'utiliser cakephp, même si nous ne maitrisons pas encore > tout. On utilise tout ce qui est disponible en ligne, documentation, > API, le groupe anglais et, chaque fois que c'est nécessaire, je pose > directement mes question sur le canal IRC, les principaux contributeurs > étant très souvent connectés. > > Vous pouvez jeter un oeil la première version de notre application à > l'adresse suivante : > http://gtt.demonstrations.adullact.org/ > Trois niveaux de droits : > - agent de collectivité (login/pwd = jkessel/jkessel) > - chef de service (login/pwd = vhugo/vhugo) > - admin de l'appli (login/pwd = admin/admin) > > Chris > > > > > > --~--~-~--~~~---~--~~ Vous avez reçu ce message, car vous êtes abonné au groupe Groupes Google "Cake PHP" groupe. Pour envoyer des messages à ce groupe, envoyer un e-mail à cake-php@googlegroups.com Pour résilier votre abonnement à ce groupe, envoyez un courrier électronique à l'adresse [EMAIL PROTECTED] Pour plus d'options, veuillez visiter le groupe à http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Saving components values with add method
Hi Nate, thanks for your answer, but doesn't work, maybe I don't explain the case correctly. First of all I made a controller that returns a unique timestamp: Then, in my UserController I call it with: $this->set('uniqueID', $this->Time->uniqueTimeStamp()); and in my add.thtml view I can use it with: At this point everything is all right. In my UserController I have the add method: function add() { $this->set('uniqueID', $this->Time->uniqueTimeStamp()); if (empty($this->params['data'])) { $this->render(); } else { if ($this->User->save($this->params['data'])) { $this->flash('User has been saved.','/users'); } } } The add methods save the input data entered by the user on the input textboxes: Ex: input('User/username', array('size' => '20', 'maxlength'=>'20'))?> input('User/password', array('size' => '15', 'maxlength'=>'15'))?> But the returned $uniqueId is not saved with them. How can I make this? --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with Model access in AppController
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 blog_tutorial_2 again (back to basics, folks). And, lo and behold, I found a workaround in the recent post element! Components can be referenced from the app_controller with no problems. So I created a component to build my menu, then referenced it from within the beforeRender function in my app_controller. Another possibility that I have yet to test is whether you can do the following in app_controller itself rather than in a component:$Post = new Post;$data = "">I'd say that should work, but try before quoting me... Regards! - Toby --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: DISTINCT Query
Right - that makes sense - but it still doesn't work. print_r($this->NewsItem->findAll(null, 'DISTINCT NewsItem.source_name')); doesn't print anything out. Neither does $feeds have any data in it. This SQL code works though (tested in phpMyAdmin): SELECT DISTINCT source_name FROM istudios_news_items So I'm not really sure what's going on. This is all the relevant code: Controller: function index() { $this->pageTitle = ", Front Page"; $this->set('feeds',$this->NewsItem->findAll(null, 'DISTINCT source_name')); print('test'); print_r($this->NewsItem->findAll(null, 'DISTINCT source_name')); $this->set('newsitems', $this->NewsItem->findAll('','','story_date desc',10)); } Layout: $newsformatter->printFeedSelector($feeds); Helper: function printFeedSelector($feeds) { foreach ($feeds as $raw) { $feed = $raw['NewsItem']; print $this->Html->link($feed['source_name'], 'source/' . $feed['source_name']); } } I'd really appreciate any help here - it's really perlexing me! --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How I change the layout of the home.thml
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 4/10/06, Wasenbr <[EMAIL PROTECTED]> wrote: The question is: how I change the layout of the any view of thePagesController without change the pages_controller.php page ofcake/libs/controller dir? --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How I change the layout of the home.thml
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" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How I change the layout of the home.thml
You might want to read the contents of your default home page. Especially this line: To change its layout, create: /app/views/layouts/default.thtml. ;o) AD7six Looking for CakePHP info? Find it faster here: http://www.cakephp.org/search/ --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How I change the layout of the home.thml
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, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: error handling in Cake
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 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
The MySQL UTF8 Issue
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, and serach on the internet. I think there is something wrong with the mysql connections setting in cake. In my controller I query the MySQL connection setting by do this ... $msg = $this->MyModel->findBySql("Show VARIABLES LIKE '%CHARACTER_SET%';"); // Then set the result varable $msg to display in views $this->set('msg',$msg); In view: ... debug($msg); ... Then I got this result: Array ( [0] => Array ( [VARIABLES] => Array ( [Variable_name] => character_set_client [Value] => latin1 ) ) [1] => Array ( [VARIABLES] => Array ( [Variable_name] => character_set_connection [Value] => latin1 ) ) [2] => Array ( [VARIABLES] => Array ( [Variable_name] => character_set_database [Value] => utf8 ) ) [3] => Array ( [VARIABLES] => Array ( [Variable_name] => character_set_results [Value] => latin1 ) ) [4] => Array ( [VARIABLES] => Array ( [Variable_name] => character_set_server [Value] => utf8 ) ) [5] => Array ( [VARIABLES] => Array ( [Variable_name] => character_set_system [Value] => utf8 ) ) [6] => Array ( [VARIABLES] => Array ( [Variable_name] => character_sets_dir [Value] => D:\Program Files\MySQL\MySQL Server 5.0\share\charsets\ ) ) ) The character_set_client,character_set_results,character_set_connection is Laten1, and the other is utf8. I think the problem is here. So I continue the test: When I query the data in the utf8 table by convert the field to laten1 encoding, I can get the right chinese string. The SQL is: SELECT CONVERT(myField USING utf8) from myUtf8Table; How can I change the database connection setting to solve this problem? Should I modify the core code? --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: DISTINCT Query
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 group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with extends - no access to parents var?
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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Problem with extends - no access to parents var?
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 User($this->Session->read('User')); } And for your group: debug ('currentUser=' . $currentUser->getId()); should be debug ('currentUser=' . $this->currentUser->getId()); Cheers, AD7six Looking for CakePHP info? Find it faster here: http://www.cakephp.org/search/ --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
DISTINCT Query
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? $this->set('feeds',$this->NewsItem->query('SELECT DISTINCT `NewsItem`.source_name` AS `source_name`')); Regards, Mike --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
error handling in Cake
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 false. --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
How I change the layout of the home.thml
Hello!! How I change the layout template of the pages/home.thtml ? Cleiton Wasen --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Problem with extends - no access to parents var?
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 c:\sites\cake\app\controllers\groups_controller.php Fatal error: Call to a member function getId() on a non-object in c:\sites\cake\app\controllers\groups_controller.php class AppController extends Controller { var $components = array ('Acl'); public $currentUser = null; function beforeFilter () { debug ('AppController__beforeFilter'); $currentUser = new User($this->Session->read('User')); debug ('AppController::currentUser=' . $currentUser->getId()); } } class GroupsController extends AppController { var $name = 'Groups'; var $scaffold; function beforeFilter () { debug ('GroupsController__beforeFilter'); parent::beforeFilter(); //debug ('GroupsController::currentUser=' . $this->currentUser->getId()); //debug ('GroupsController::currentUser=' . $currentUser->getId()); } function test() { debug ('currentUser=' . $currentUser->getId()); } } --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: French who works with cake??
Bonjour Chris! Vraiment impressionnant l'application qui est montré en demo. Impressionne par le design simple et efficace. C'est un design comme ca que je recherche pour mon application. Tu l'as fait de A à Z ou tu as utilises des css deja existant. Je vois aussi qu'il ya differents niveaux de droits. Comment tu as fait?? Je suis en train de creer une application de gestion de stage et ca me serait tres utilie. Si tu as des conseils ca me serait tres utilie Merci Fab --~--~-~--~~~---~--~~ Vous avez reçu ce message, car vous êtes abonné au groupe Groupes Google "Cake PHP" groupe. Pour envoyer des messages à ce groupe, envoyer un e-mail à cake-php@googlegroups.com Pour résilier votre abonnement à ce groupe, envoyez un courrier électronique à l'adresse [EMAIL PROTECTED] Pour plus d'options, veuillez visiter le groupe à http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How to send to browser JavaScript code for execution? (AJAX request)
If I change my view index.thtml to link('JS TEST', '/tests/test_one', array('update'=>'dummy')); ?> it works fine. So question is: do I really need this dummy div as target for update, or there is some clean CakePHP way how to achieve this without this dummy div? Or some JavaScript solution with Prototype? You know, as I want to execute JavaScript only, it looks strange to me generate some (even hidden) div in page. --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Backend/Frontend
HI there, I've pasted the code I use, it's a rework of rdAuth for a single level of admin: - http://cakephp.org/pastes/show/44ba4a5b6dbac7a2896906bc689f32d0 but I fully intend to use ACL in the future. -- Andy W --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: How to send to browser JavaScript code for execution? (AJAX request)
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'); var $helpers = array('Html','Javascript','Ajax'); var $uses = null; var $layout = 'tests'; function index() { } function test_one() { } } LAYOUT tests.thtml TESTS charset('UTF-8')?> link('prototype')?> VIEW tests/index.thtml link('JS TEST', '/tests/test_one'); ?> VIEW tests/test_one.thtml codeBlock("alert('OK');"); ?> My problem is: this JavaScript code is not executed in browser - I see right response content in Firefox debug extension, I see 'evalScripts:true' in source code of tests/index page, but I'm probably doing some stupid thing by wrong way. I'm trying it with CakePHP 0.10.9.2378_final and prototype 1.5.0_rc0 (from scriptaculous 1.6.1) and I did only one change in app/config/core.php - set DEBUG to 0. What I'm doing wrong? Any help is highly appreciated. --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Backend/Frontend
@Zis The short answer is probably that most developers will use ACL to restrict access to their inbuilt admin functions. The actual answer depends on the client/user requirements - the admin interface could be a completely different system (i.e. talks to the database, but isn´t a web page etc.). @Spacedz You can change the URL for your admin routes; see core.php. Re ACL the short answer is to run a check in your beforeFilter (assuming you are asking for a Cake solution) and redirect unauthorised users. For more details (concepts apply to all ACL solutions) this tutorial is a reasonable place to start: http://wiki.cakephp.org/docs:acl:introduction?s=acl And a quick explenation, as it´s a common question: Can (I) do (THIS) to (THAT) means Can (ARO) do (AXO) to (ACO) Cheers, AD7six Looking for CakePHP info? Find it faster here: http://www.cakephp.org/search/ --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Backend/Frontend
I'd expect it's the latter (limit access) because of the OO nature, but I've not had a chance to build a full app with Cake yet. One could argue it's safer to make an admin controller as the name (and url) of this can be unknown to all visitors, as domain.com/reviews/delete/14 it slightly too predictable and is more open to hacking. Maybe just give the functions hard to guess names. On a related note, does anyone know a good tutorial on using ACL with a basic login page to restrict access to certain functions? --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: controller-callbacks with scaffolding
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 unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Backend/Frontend
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 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: French who works with cake??
Bonjour, Je suis responsable de projets à l'Adullact (= logiciels libres par et pour les collectivités locales, http://www.adullact.org ) et j'ai choisi d'utiliser cakephp en décembre dernier pour développer une application de gestion du temps et des demandes d'absence. Nous avons donc une petite expérience du framework. Comme d'autres personnes probablement, je trouvais qu'il serait très intéressant de créer un groupe français et ... tylerfab lui l'a fait. Super ! J'espère que le groupe s'étoffera rapidement pour que nous échangions nos expériences respectives. De notre côté, on se régale d'utiliser cakephp, même si nous ne maitrisons pas encore tout. On utilise tout ce qui est disponible en ligne, documentation, API, le groupe anglais et, chaque fois que c'est nécessaire, je pose directement mes question sur le canal IRC, les principaux contributeurs étant très souvent connectés. Vous pouvez jeter un oeil la première version de notre application à l'adresse suivante : http://gtt.demonstrations.adullact.org/ Trois niveaux de droits : - agent de collectivité (login/pwd = jkessel/jkessel) - chef de service (login/pwd = vhugo/vhugo) - admin de l'appli (login/pwd = admin/admin) Chris --~--~-~--~~~---~--~~ Vous avez reçu ce message, car vous êtes abonné au groupe Groupes Google "Cake PHP" groupe. Pour envoyer des messages à ce groupe, envoyer un e-mail à cake-php@googlegroups.com Pour résilier votre abonnement à ce groupe, envoyez un courrier électronique à l'adresse [EMAIL PROTECTED] Pour plus d'options, veuillez visiter le groupe à http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
How to send to browser JavaScript code for execution? (AJAX request)
Hi all, I am still thinking about necessity xajax in my CakePHP kitchen - Schmidt.Troy and Nate: thank You for Your ideas in thread 'Xajax in Cake'. So, I'm trying to play with Ajax helper, unfortunately I'm not able to find solution for one simple task (but I'm pretty stupid man, so no surprises for me). Basic example (what I want to achieve): - view with one Ajax link, which points to some controller action - controller action (with related view) sends to browser JavaScript code "alert('OK');" by way this code could be (and will be) executed in browser I'm just not able make this simple thing works, as I don't want to update any DOM element etc. Could anyone help me, please? I have some interesting Cakeforge package on the road, but I do not want to use xajax in it, because CakePHP was marriaged with Prototype. Thanks! --~--~-~--~~~---~--~~ 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] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---