Mutually exclusive associations
Hi all, Is there a way to tell Cake that any model A belongsTo model B OR model C, but NOT to B and C at the same time? (consider an Address which can only belong to a Person or an Organization). Regards, Martin -- Martin Schapendonk, [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: Re: Re: Debian Etch / Apache2 / PHP5 / + CakePHP
I agree broken down by server and hosts Sam D On 10/4/06, John Zimmerman <[EMAIL PROTECTED]> wrote: > On 10/4/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > > > As a public notice, Mac OS X is usually configured the same way out of the > box > > > > Sam D > > > > This would explain some of the problems OS X users have been posting with > mod_rewrite not working. > > I think we need to start a mod_rewrite FAQ section in the Cake Manual with > specific solutions for systems/configurations. These questions seem to come > up a lot. > > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ 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: Re: Debian Etch / Apache2 / PHP5 / + CakePHP
On 10/4/06, Samuel DeVore <[EMAIL PROTECTED]> wrote: As a public notice, Mac OS X is usually configured the same way out of the boxSam DThis would explain some of the problems OS X users have been posting with mod_rewrite not working. I think we need to start a mod_rewrite FAQ section in the Cake Manual with specific solutions for systems/configurations. These questions seem to come up 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 -~--~~~~--~~--~--~---
Re: Re: Debian Etch / Apache2 / PHP5 / + CakePHP
As a public notice, Mac OS X is usually configured the same way out of the box Sam D On 10/4/06, John Zimmerman <[EMAIL PROTECTED]> wrote: > On 9/29/06, John Zimmerman <[EMAIL PROTECTED]> wrote: > > Does anyone have mod_rewrite working properly under Debian Etch Testing? > > > > I fixed the problem the other day if anyone is interested. > > In debian the default virtual host is configured with "AllowOverride None", > which means my .htaccess files were not being processed even though > mod_rewrite was enabled as a module. > > Changing the value to "AllowOverride All" for the appropriate > entries in the virtual host file lets the .htaccess file adjust the rewrite > rules and now cake works :-) > > Hope this is helpful for someone. > > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
deleting multiple records in a one to many association.
I have a table called Groups which is associated on a "one to many" with another table called Users. Is there an efficient way of deleting records in the Users table that are link to the one record being deleted in the Groups table? I couldn't find a model->delete('condition') in the API. I think this should be a common situation, and I just wonder how you guys accomplish it. Thanks in advance for your response. --~--~-~--~~~---~--~~ 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: Sharing view between controllers..
Thanks guys for all your response and suggestions. John, now that you mentioned it, I tend to agree with you that it's best to follow the convention, keeping a clean solution. At the same I wanted to know how it could be done. And thanks for showing me. It gives me a better understanding on specifying paths in this case. --~--~-~--~~~---~--~~ 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: Controllers organized in different directories
Great. I'm not sure how I missed this while reading the documentation, but it helps me organize things. Thanks a lot John. -MI From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John ZimmermanSent: Thursday, October 05, 2006 1:50 AMTo: cake-php@googlegroups.comSubject: Re: Controllers organized in different directories http://manual.cakephp.org/chapter/configurationCheckout section 4 regarding admin routes. I believe that information can help you solve your problem. No extra coding needed.--No virus found in this incoming message.Checked by AVG Free Edition.Version: 7.1.407 / Virus Database: 268.12.13/463 - Release Date: 10/4/2006 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~--- -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.407 / Virus Database: 268.12.13/463 - Release Date: 10/4/2006
Re: Controllers organized in different directories
http://manual.cakephp.org/chapter/configuration Checkout section 4 regarding admin routes. I believe that information can help you solve your problem. No extra coding needed. --~--~-~--~~~---~--~~ 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: Debian Etch / Apache2 / PHP5 / + CakePHP
On 9/29/06, John Zimmerman <[EMAIL PROTECTED]> wrote: Does anyone have mod_rewrite working properly under Debian Etch Testing? I fixed the problem the other day if anyone is interested. In debian the default virtual host is configured with "AllowOverride None", which means my .htaccess files were not being processed even though mod_rewrite was enabled as a module. Changing the value to "AllowOverride All" for the appropriate entries in the virtual host file lets the .htaccess file adjust the rewrite rules and now cake works :-) Hope this is helpful for someone. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
validates bug ?
File: models/user.php class User extends AppModel { var $name = 'User'; var $validate = array( 'login' => '/[a-z0-9\_\-]{3,}$/i', ); } File: controllers/users_controller.php class UsersController extends AppController { var $name = 'Users'; function index() { $this->set('users', $this->User->findAll()); } function join() { if (!empty($this->data)) { if ($this->User->save($this->data)) { $this->flash('Done', '/users'); } } } } File: views/users/join.thtml Join my club login: input('User/login') ?> tagErrorMsg('User/login', 'login incorrect:') ?> submit('加入') ?> then, open browser and input \aaa in the login input field the problem is coming, i did't set \ character in my validates array, why cakephp let it pass ? --~--~-~--~~~---~--~~ 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: Re: Recreating Model Cache
assuming that the permissions on the folder are permissive enough :) On 10/4/06, nate <[EMAIL PROTECTED]> wrote: > > They are recreated automatically if they do not exist. > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ 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: Recreating Model Cache
They are recreated automatically if they do not exist. --~--~-~--~~~---~--~~ 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: Can Model access user id from othAuth
hi, Thanks..now its working Regards, Ritesh --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Postgres problem
I was using mysql as database up to now and had no problem. The problem is that now I have to move to postgresql and cakephp doesn't seem to cooperate. I changed the settings in database.php and I get Your database configuration file is present. Cake is able to connect to the database. in the main page but whenever I try to access a controller (and the according view) I get Warning: pg_query(): Query failed: ERROR: Namespace "information_schema" does not exist . in /home/mgovadmin/cake/libs/model/dbo/dbo_postgres.php on line 111 My settings in database.php are var $default = array('driver'=> 'postgres', 'connect' => 'pg_connect', 'host' => 'localhost', 'login'=> 'login', 'password' => 'password', 'database' => 'database', '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: How to tell which element triggered an ajax call?
I make it a part of the request path and go from there On 10/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I plan on having many observeFields in a form, but I don't want to code > a function for each one. I would rather just have one function that > responds to all the obervers. But within the function, I need to know > which form field was the caller. Is there any way to do this? I know > you can pass a 'with' attribute but I don't understand the syntax in > the documentation. > > Thanks for any help. > > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you --~--~-~--~~~---~--~~ 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 urls
Actually now I am using postgres whereas before I was using mysql. The problem I get is Warning: pg_query(): Query failed: ERROR: Namespace "information_schema" does not exist . in /home/mgovadmin/cake/libs/model/dbo/dbo_postgres.php on line 111 What more do I have to do in postgres than mysql so that I can work with the tables? --~--~-~--~~~---~--~~ 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 to tell which element triggered an ajax call?
I plan on having many observeFields in a form, but I don't want to code a function for each one. I would rather just have one function that responds to all the obervers. But within the function, I need to know which form field was the caller. Is there any way to do this? I know you can pass a 'with' attribute but I don't understand the syntax in the documentation. Thanks for any help. --~--~-~--~~~---~--~~ 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: Can Model access user id from othAuth
> 'conditions' => 'user_id = ' . {$this->othAuth->user('id')}, > > Any suggestions > Regards add that in controler exp findAll($this->othAuth->user('id')); --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Recreating Model Cache
I deleted the contents of app/tmp/cache/models and I think that might have been a mistake. How do I recreate the cache? --~--~-~--~~~---~--~~ 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: Sharing view between controllers..
Although I do not recommend doing what you want to do just because it is not a clean solution, the following will work to render a view in the users controller from the groups view directory (notice all lower case, and the dots to go to previous directory). $this->render('../groups/view'); --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
delete rows on session experation
Is it posible to delete database rows whenever the session expires? -- Nathan Garza AshLeaf Media | Owner _ www.ashleafmedia.com | [EMAIL PROTECTED] | 832.514.5726 --~--~-~--~~~---~--~~ 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 urls
There could be a number of issues. Put the DEBUG to 2 in your app/core.php and try again, it should give you details on the problem. --~--~-~--~~~---~--~~ 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: corrupted files
I believe the same, but I think Asbjørn made it clear on the blog post he linked why he was storing files on the DB. Asbjørn, I see on your code that you have: // app/controllers/files_controller.php class FilesController extends AppController { function add() { if (!empty($this->params['form']) && is_uploaded_file($this->params['form']['File']['tmp_name'])) { $fileData = fread(fopen($this->params['form']['File']['tmp_name'], "r"), $this->params['form']['File']['size']); $this->params['form']['File']['data'] = $fileData; $this->File->save($this->params['form']['File']); $this->redirect('somecontroller/someaction'); } } } Now, why don't you try first BASE 64 encoding the contents of the file? Eventhough you would be requiring far more storage capacity for each file, I just want to check that there's no issue with Cake retrieving BLOB fields. Change the following line: $this->params['form']['File']['data'] = $fileData; to: $this->params['form']['File']['data'] = base64_encode($fileData); Then, on your code where you download the file, that is: function download($id) { $file = $this->File->findById($id); header('Content-type: ' . $file['File']['type']); header('Content-length: ' . $file['File']['size']); header('Content-Disposition: attachment; filename='.$file['File']['name']); echo $file['File']['data']; exit(); } Change the line: echo $file['File']['data']; to: echo base64_decode($file['File']['data']); Try to see if it works. If so, then there's definitely an issue with binary data on Cake and we can debug further. --~--~-~--~~~---~--~~ 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: My Cake development environment
Hi Sonic and freedom Thanks for the feedback. The Cake community has given me so much over the last year, I am glad to be able to give something back. I will be having a look into the DB dumping today (probably using mysqldump and the exec function in the build file). I will keep you posted. Regards, Langdon Sonic Baker wrote: > Hi Langdon, > > Just wanted to say thanks for sharing this with us. I've been looking for > the ideal setup and it's great to hear how and why others are using their > chosen programs. > Please keep us informed about how you get on with your database dumping and > transferring. > > Cheers, > > Sonic -- Linden Row Pty Ltd NSW : +61 2 8215 0570 Victoria : +61 3 9013 9423 Fax : +61 2 8215 0571 Mobile : +61 416 118 037 http://www.lindenrow.com.au --- Buy fine chocolate online http://www.chocolatereview.com.au --~--~-~--~~~---~--~~ 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: ms sql server
Holy delayed-reaction-double-post Batman! --~--~-~--~~~---~--~~ 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: Multiple models, one table
I believe this is what you're looking for: http://www.ifisgeek.com/tutorials/show/implementing_single_table_inheritance_in_cakephp --~--~-~--~~~---~--~~ 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: ms sql server
I had trouble with native cakephp because php needs a non free library so i used phpadodb with odbtp driver --~--~-~--~~~---~--~~ 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: Nested Layouts
Hey Neves - try looking under 'Elements' at http://manual.cakephp.org/chapter/views On 10/4/06, Neves <[EMAIL PROTECTED]> wrote: > Example: I have the main layout with header/footer and a top menu. > When I acces a link like /services, a menu appears on the side that > shows all services. > When I click a service like /services/web the web page will be inserted > inside the layout /services that will be inserted inside the main > layout. -- Best, Irfan Baig --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Nested Layouts
How can I handle nasted layouts? Example: I have the main layout with header/footer and a top menu. When I acces a link like /services, a menu appears on the side that shows all services. When I click a service like /services/web the web page will be inserted inside the layout /services that will be inserted inside the main layout. Was I clear? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Layout Logic
My layout that is the header/menu/footer/rightSide has many logic, with database access, etc. Where goes the layout logic? --~--~-~--~~~---~--~~ 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: Multiple models, one table
Indeed - the key point is that I want some users to have access to different levels of users. I think the key point to my question is - is it valid to use the same database (with some selection criteria) in different models? It feels as if it is a valid thing to do, and I can't see if it would cause a problem - but don't know enough about the 'cake filling' inside :-) --~--~-~--~~~---~--~~ 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: Multiple models, one table
Yes - looked at that; but given that I only want an admin to be able to manage its own users, I would be creating groups and permissions all over the place; which would only be used once. --~--~-~--~~~---~--~~ 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: corrupted files
A better bet is to store the files in the local filesystem, and save pointers to the files in a database. It's supposed to be quite a bit faster as well. --~--~-~--~~~---~--~~ 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: ms sql server
I dunno what you're running, but I use no such library. I am connecting from a Mac-based dev server to a PC (obviously)-based copy of SQL Server 2000 with no issues, but there were some odd configuration changes I had to make on the dev server side. You have to read thru the user notes on the mssql_connect man page. If you've already read them, read them again. If you've read them twice, read them a third time, you're probably missing something. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
odd problem installing Cake
I'm having an odd issue with Cake. I've extracted all the files on my server and am getting the following error. Fatal error: Cannot redeclare cache() in /home/peter/public_html/cake/cake/basics.php on line 807 I tried searching to see if anyone else had experienced the same problem, but couldn't find anything. Any idea what could be going on? --~--~-~--~~~---~--~~ 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: ms sql server
guys, it was a pain to get mssql_connect to work. on windows it needed a special dll that I wasn't able to find anywhere, so I finished up to use one provided by a colleague. now I had to move this little customized-scaffolded baby on a suse server.. I've read about freetds, but I'm not sure.. any advice here? 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 -~--~~~~--~~--~--~---
Controllers organized in different directories
Hi guys, First of all, I'm very excited to start with CakePHP. I'm in the process of building a large web application, and have been evaluating different PHP frameworks. I ended up with Cake PHP and Symfony. Eventhough Symfony it's a very attracting framework, there's something about Cake that drove me to it. I feel that with the way it's developed I'll have a better control for big applications than with Symfony. And the fact that it's NOT ONLY PHP5 also helps. Anyway, I'm looking to have a better organization of my controllers. Let's say that I want to have different controllers for each administrative task, for example: * Language administration (I'm using PEAR Translation2 package, and have already integrated it with my base controller) * User administration Now, I can go the easy route and have two controllers, be them: languages_controller.php users_controller.php But say, since I will have tons of controllers for different end-user functionality, I want to have them located under an admin/ path. So I have these choices: * Create an admin_controller and from there on handle languages() as an action, users() as an action. * Create an admin/ directory under controllers and then change dispatcher to look for a path as an alternative to looking for admin_controller if no admin_controller is found. Catch the idea? So I was wondering if there's a standard way to do this. So recapping: * I want to have several controllers for my administrative tasks, and don't have them all located under the controllers/ directory directly. * I don't want to put *all* my administrative task under a unique controller. Thanks for your help guys! -MI --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~--- -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.407 / Virus Database: 268.12.12/462 - Release Date: 10/3/2006
Re: ms sql server
I had trouble with native cakephp because php needs a non free library so i used phpadodb with odbtp driver --~--~-~--~~~---~--~~ 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: jQuery users
>> >> riddle me this: >> A. How does an Audioscrobbler / Last.fm component meet the 80/20 >> rule? > > My legal counsel has advised me not to comment on the grounds that it > may expose me as someone thinking up a project so they could learn a > framework. hehe. > >> B. How could said component possibly be more fun than a jQuery >> helper? >> > > I've seen it along this far (it got accepted into the core for ZF > provided I get everything done) so I might as well finish it. *Then* > I can work on the really fun jQuery helper. > ok, just wanted to make sure I was not missing something. --~--~-~--~~~---~--~~ 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: Validation problem
milicic.marko wrote: > I need to validte my model in that way to forbide inserting two posts > with same Title. > OK. This is not an REGEX type of validation so I suppose I must use > some callback function. > I used beforeSave() CB function and returned false if I detect that > post with that title already exists. > But, what I'm supposed to do in order to force cake to behave like it > was an regex type validation failure... > > I want to use $html->tagErrorMsg to present error message I much prefer enforcing this sort of model-integrity issue in the database by using a UNIQUE index on the column in question. This approach only works if what you're saying is true in all cases, of course. Cheers, Matt --~--~-~--~~~---~--~~ 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: FindAll with mysql views
maudite wrote: > Hi there have seen a few posts in regards to binding db views to cake > models and was wondering if this is going to be addressed in the core > in future releases. I am using cake 1.1.8 and have implemented the > code change listed in: > http://groups.google.ca/group/cake-php/browse_thread/thread/e747844d9d583bc6/0220bcf5511f5637?lnk=gst&q=findall+mysql+views&rnum=2#0220bcf5511f5637 > > which is working for me. > > Just wondering as binding the db view to a model is definitely the > right way to go for certain areas of my app and this would make > upgrading cake in the future easier as I do my darnedest not to > modifying core cake code. A (large) web application I'm currently building only uses views. I don't do anything fancy to make them work with MySQL but I do declare and define all of my relationships in the models. No problems here... Matt --~--~-~--~~~---~--~~ 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: jQuery users
On 10/4/06, gwoo <[EMAIL PROTECTED]> wrote: > > riddle me this: > A. How does an Audioscrobbler / Last.fm component meet the 80/20 rule? My legal counsel has advised me not to comment on the grounds that it may expose me as someone thinking up a project so they could learn a framework. > B. How could said component possibly be more fun than a jQuery helper? > I've seen it along this far (it got accepted into the core for ZF provided I get everything done) so I might as well finish it. *Then* I can work on the really fun jQuery helper. -- Chris Hartjes "The greatest inefficiencies come from solving problems you will never have." -- Rasmus Lerdorf @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: ADMIN route and password-protection with http authentification
$this->params["styre"] should of course be $this->params["admin"] (or whichever admin route prefix you use). --~--~-~--~~~---~--~~ 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: Changing the Database
Write something to the session, then check it in AppController::beforeFilter. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
corrupted files
Help me please. My images get's corrupted when I download them from my database. Data type is longblob. And the add function uses addslashes. http://cakebaker.wordpress.com/2006/04/15/file-upload-with-cakephp/ Best regards. Asbjørn Morell --~--~-~--~~~---~--~~ 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: ADMIN route and password-protection with http authentification
$this->params["styre"] should of course be $this->params["admin"] (or whichever admin route prefix you use). On Oct 4, 9:52 pm, "twinkletoes" <[EMAIL PROTECTED]> wrote: > Thanks for a pointer in the right direction, nate :) > > I got error messages when trying your solution, but they were fixed > easily by doing a few additions: > > public function beforeFilter () > { > if (isset($this->params["styre"])) > { > $this->Security->requireLogin( > '*', > array( > 'users' => array( > "risdriv" => "phey3oi"), > 'type' => 'basic')); > } > > } // end of function beforeFilterOn Sep 14, 11:04 pm, "nate" <[EMAIL > PROTECTED]> wrote: > [...]>You can activate it by doing the following: > > > class AppController extends Controller { > > var $components = array("Security"); > > > function beforeFilter( ) { > > if ($this->params["admin"]) { > > $this->Security->requireLogin("*", array('users' => > > array("admin" => "password"))); > > } > > }[...] --~--~-~--~~~---~--~~ 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: HTML helper error messages output
ahhh i knew there must be a better way. thanks gwoo. On 05/10/06, gwoo <[EMAIL PROTECTED]> wrote: > > you could also create you own tags.ini.php and drop it in /app/config > and that will override the cake core file. > > > > --~--~-~--~~~---~--~~ 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: ADMIN route and password-protection with http authentification
Thanks for a pointer in the right direction, nate :) I got error messages when trying your solution, but they were fixed easily by doing a few additions: public function beforeFilter () { if (isset($this->params["styre"])) { $this->Security->requireLogin( '*', array( 'users' => array( "risdriv" => "phey3oi"), 'type' => 'basic')); } } // end of function beforeFilter On Sep 14, 11:04 pm, "nate" <[EMAIL PROTECTED]> wrote: [...] >You can activate it by doing the following: > > class AppController extends Controller { > var $components = array("Security"); > > function beforeFilter( ) { > if ($this->params["admin"]) { > $this->Security->requireLogin("*", array('users' => > array("admin" => "password"))); > } > } [...] --~--~-~--~~~---~--~~ 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: HTML helper error messages output
you could also create you own tags.ini.php and drop it in /app/config and that will override the cake core file. --~--~-~--~~~---~--~~ 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: Sharing view between controllers..
How about moving the content to an element file (in the views/elements folder) and then create a view for each controller that contains 'echo $this->renderElement('elementName');' --~--~-~--~~~---~--~~ 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: My Cake development environment
hear hear. i've printed out your setup notes and am going to make it the weekend project to attempt to emulate. thanks heaps for sharing! cheers, freedom On 05/10/06, Sonic Baker <[EMAIL PROTECTED]> wrote: > Hi Langdon, > > Just wanted to say thanks for sharing this with us. I've been looking for > the ideal setup and it's great to hear how and why others are using their > chosen programs. > Please keep us informed about how you get on with your database dumping and > transferring. > > Cheers, > > Sonic > > > > > --~--~-~--~~~---~--~~ 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: HTML helper error messages output
morning mate, i'm pretty sure you can access the HTML the HtmlHelper uses in the following file: /cake/config/tags.ini.php actually, looking at it, tagErrorMsg is one of the only functions that doesn't refer to this file at all. in the HtmlHelper: /cake/libs/views/helpers/html.php you can see that it returns the following: return sprintf('%s', is_array($text) ? (empty($text[$error - 1]) ? 'Error in field' : $text[$error - 1]) : $text); you *could* change it here but it's not recommended as next time you update your Cake version you'll overwrite this. what you could do instead is write your own helper that includes a similar function. this could be a wrapper that removes the DIV or a function very similar to this one. If you have a look at the function you can see what it's doing and replicate it. HTH freedom On 05/10/06, Christiaan Ottow <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm running into a minor problem with cake. I use the > $html->tagErrorMsg function to show error messages in user input. This > function prints a with class error_message. It seems like this > output is hardcoded into the HTML helper. > The problem is this: I want to mark errorous fields with a *, right > behind the input box. Using $html->tagErrorMsg, the * will be on a new > line since it prints a first. Of course I could try solving this > with the float:left CSS property or other hacks, but it would be better > to fix this at the source. > > So, is there a way to set the error output strings without changing the > source of cake (and having to patch it everytime from then)? Or should > this be a feature request / bug report? > > Best regards, > > Chris > > > > > --~--~-~--~~~---~--~~ 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: OT: AJAX help
Troy Schmidt wrote: > You will call a function that will then run an AJAX call, get the > result, and manipulate it. Based on the result you will create > childNodes no innerHTML or replacing. Actual DOM methods. It is > probably programming level advanced, which is below expert. Personally > I would recommend using jQuery if you aren't too deep in Rico. Easier > to write custom code with jQuery. The difference is like coding PHP in > CakePHP versus doing it in raw PHP. OK, I understand what you're saying, though I was hoping not to invest too much time in this. I'm not married to rico -- and have been checking out jQuery, actually. It was very easy to get rico to update multiple div's -- I'm not finding good doc's on jQuery's ajax methods yet, or none that I've been able to decipher! > So, search for add table row script and you should find one that > doesn't use innerHTML or cloneNode. > > var tblBody = document.getElementById(tblId).tBodies[0]; > var newNode = tblBody.rows[0].cloneNode(true); > tblBody.appendChild(newNode); > > So, instead of using the cloneNode you would have a whole drawn out > process to manually create the node based on your AJAX results. That's what I was afraid of... I really don't want to do a lot of low-level DOM manipulation, but it looks like that's the only way. crap. -Scott --~--~-~--~~~---~--~~ 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: Is this normal behaviour?
I just confirmed that since upgraded to latest 1.1.8 it now has the same problem regardless of PHP version or my development environments. So, I am most certain it is a bug and have submitted to trac. 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 -~--~~~~--~~--~--~---
Re: OT: AJAX help
You will call a function that will then run an AJAX call, get the result, and manipulate it. Based on the result you will create childNodes no innerHTML or replacing. Actual DOM methods. It is probably programming level advanced, which is below expert. Personally I would recommend using jQuery if you aren't too deep in Rico. Easier to write custom code with jQuery. The difference is like coding PHP in CakePHP versus doing it in raw PHP. So, search for add table row script and you should find one that doesn't use innerHTML or cloneNode. var tblBody = document.getElementById(tblId).tBodies[0]; var newNode = tblBody.rows[0].cloneNode(true); tblBody.appendChild(newNode); So, instead of using the cloneNode you would have a whole drawn out process to manually create the node based on your AJAX results. --~--~-~--~~~---~--~~ 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: jQuery users
riddle me this: A. How does an Audioscrobbler / Last.fm component meet the 80/20 rule? B. How could said component possibly be more fun than a jQuery helper? --~--~-~--~~~---~--~~ 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: Trimming posted data
First of all, $data is a local variable, so it won't change anything in invalidFields(). Second, even if you modify $this->data, it will not be used in invalidFields(). In the code below, after first if (empty($data)), there is passed data or copy of $this->data. Then at if (!empty($data)), $data is never empty because it has either passed data or copy of $this->data at the beginning, and $data won't change anyway. function invalidFields($data = array()) { if (empty($data)) { $data = $this->data; } if (!$this->beforeValidate()) { return false; } if (!isset($this->validate)) { return true; } if (!empty($data)) { $data = $data; } elseif (isset($this->data)) { $data = $this->data; } Populating $this->data is mentioned in here, but at the end, nate mentioned that "We will no longer support calling Model::validates or Model::invalidFields with parameters. You should set( ) the data, then call validates( ) or invalidFields( )." https://trac.cakephp.org/ticket/1040 So I guess we are not supposed to pass data, but set before call. Still, changes in $this->data in beforeValidate() won't affect in invalidFields(). I think the fix of using array_merge in here is still needed. It said it is fixed, but I don't see the array_merge in the fix. I believe the change in $this->data should be taken in invalidFields(), so is this a bug? I've been wondering about this code for a while, so please let me know I understand it incorrect. So back to your problem, I am not sure there is a way to get the changes from beforeValidate(). Either you do that before calling save() or invalidFields(), or apply the array_merge() fix in invalidFields(). One more thing, if you are calling parent::beforeValidate(), and if you have any validation there, I think you should check and return if it fails: if (!parent::beforeValidate()) { return false; } I really want to know about the invalidFields code, so if someone has any idea, please let me know. Sohei --~--~-~--~~~---~--~~ 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: Sharing view between controllers..
I'm just taking a guess at this, but you might be able to achieve this with scaffolds. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
OT: AJAX help
Hi All, This is not cake-specific, though I will be building it into a cake-based site. I have an "order form", that I want to "AJAXIFY" (?)... The first part, fetching the customer info from the tables when they type in their email address, is working fine. But I'm kinda stumped on exactly how to do the next part. So, I thought I'd ask for ideas... The order form should have a variable number of "line items". So, there should be a way to "add a line item". There are potentially 4 different "types" of line items, each of which will have some ajax-based database lookups (ie, they select the new line item of a given type, and it puts up some html, which might include a selection box. They select something from the selection box, and then a "color" or "size" or some other option field is filled and they can pick that, etc, etc). I'm planning to trigger most of this stuff off onChange calls (I'm not using the AJAX helper). The question is, it seems to me, that when a change is triggered, I'll replace the contents of a div with the new HTML. But I really want to "append" to the div, not replace it. Cause I don't want to remove the previous line item(s). And I think I'm gonna have to somehow autonumber the various line item controls, so that each time I add a line, the selection box is sb_1, sb_2, etc. and the option field is op_1, op_2, etc. DOES this make sense to anyone? Is there a better way to do this? I'm kinda stuck on how to make this work -- any suggestions would be most welcome. IF it matters, I'm using the Rico AjaxEngine and generating XML (or possibly javascript objects) as the ajax part. Thanks in advance for any suggestions!!! -Scott --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Sharing view between controllers..
Is there a way to share a view between different controllers? I want to avoid creating the same/similar view for each controller. So I created a view under one controller, and would like to be able to use that from another. For example, I'm in the Users Controller and want to call a view from the Groups controller. I tried $this->render('/Groups/view') but it tries to get the view from ../Users/Groups/view which of course will be missing.. I tried $this->render(null, null,'/Groups/view') and that didn't work either. Running out of ideas to try. The quick solution is to create the same view under the different controllers. That's something I like to avoid if possible. Thanks in advance for the help. --~--~-~--~~~---~--~~ 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: Changing the Database
Hi AD7six,Thanks for the link. I like your idea although I'm not sure if this would apply to my situation. Selenium calls the actual application in a Frame of it's own so no matter what URL I type into the address bar, it won't be passed to the application. If I were to use your method, I'd have to call the test URL in the application.. I think.Hmmm maybe not. There are some sparks going off in my head right now.Maybe if I open the initial test page using the test sub-domain then cake will attach all further relative URL's to this. I'll think about this some more and report back. I'm also looking into some other methods.In the meantime, thanks for the tip!Much appreciated,Sonic --~--~-~--~~~---~--~~ 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: Changing the Database
You could try adapting something like this: http://www.noswad.me.uk/MiBlog/SwitchConstants 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: Changing the Database
Hi Nate,I actually want to be able to have the database change last for multilple http requests, and then reset it back to the default after a variable series of events.To clarify, I want to be able to use a test database for my Selenium tests. In order to do this I'm trying to make a Selenium controller with two actions, setUp() and TearDown(). I want to call setUp(), which should switch to the test database and reset the database, before each test. After each test I'd then like to call the tearDown() action which will once again reset the database and switch the application back ot using the default database. Does this make sense?Sonic --~--~-~--~~~---~--~~ 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: My Cake development environment
Hi Langdon,Just wanted to say thanks for sharing this with us. I've been looking for the ideal setup and it's great to hear how and why others are using their chosen programs.Please keep us informed about how you get on with your database dumping and transferring. Cheers,Sonic --~--~-~--~~~---~--~~ 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: New Field in MySQL Table Not Showing Up
What do you mean by ping my application? I deleted the contents of app/tmp/cache/models and I think that might have been a mistake. How do I recreate the cache? nate wrote: > If you ping your application once with DEBUG set to 1 (in > app/config/core.php), all the production-mode caches will be cleared. > Then, set DEBUG back to 0. --~--~-~--~~~---~--~~ 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: ms sql server
Probably the native MS SQL driver. --~--~-~--~~~---~--~~ 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: Changing the Database
This change will last for the duration of the HTTP request (i.e. it will work across requestAction calls). And yes, just reconnect it to the existing database when done. --~--~-~--~~~---~--~~ 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: Multiple models, one table
I am working on a similar system (a shopping cart with different levels of access). I made a single table with user information but also an additional field for 'access level.' In the beginning of each controller that returns access level specific data, you can check the currently logged in user's 'access level' and return apropriate data or bounce the user to another 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 -~--~~~~--~~--~--~---
ajax->editor
Hi, Does anyone has a pointer to ajax->editor tutorial. I searched group, cakephp website, irc, bakery and, finally, google, but nothing. There is ajax tutorial on tada list. But its way to complicated for my purpose. Please let me know if you any page that explains how to implement ajax->editor. Regards, --~--~-~--~~~---~--~~ 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: Creating a Through Relationship
That's pretty much how it works. Then the ownership data would be accessible as $user_items[n]["Ownership"]. --~--~-~--~~~---~--~~ 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 Theme your cakephp apps.
What's showing in the wiki is really all there is to it. You set the theme name in the controller, and all images, JavaScript and CSS are automatically loaded from that subdirectory in webroot. (Btw, this feature has been implemented for some time now, the wiki page is old.) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
HTML helper error messages output
Hi all, I'm running into a minor problem with cake. I use the $html->tagErrorMsg function to show error messages in user input. This function prints a with class error_message. It seems like this output is hardcoded into the HTML helper. The problem is this: I want to mark errorous fields with a *, right behind the input box. Using $html->tagErrorMsg, the * will be on a new line since it prints a first. Of course I could try solving this with the float:left CSS property or other hacks, but it would be better to fix this at the source. So, is there a way to set the error output strings without changing the source of cake (and having to patch it everytime from then)? Or should this be a feature request / bug report? Best regards, Chris --~--~-~--~~~---~--~~ 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 urls
I have tried the default configuration of files in my home and it works fine. I just use the .tar.gz and place my files in folder app. For example I have a table admins i create the appropriate model,controller and view. And then I access it through /something/cake/admins. I uploaded to another server with the exact same configuration for cakephp Though I access the page /something/cake where it shows that I can connect to the database(images and stylesheets are shown) etc when I try /something/cake/admins I get a page not found? I can't access any of my controllers. Can anyone help me?What could probably be the problem? --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
ms sql server
hi guys, at this time is better to use adodb or mssql native cakephp class for sql server? 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 -~--~~~~--~~--~--~---
VALID_AMOUNT
Maybe this is already passed on the list, but if so I mess it. I use this regular expression to validate amounts in my application. define("VALID_AMOUNT","/^(-?[0-9]+)(\.[0-9]{2})?$/"); Allows numbers, with optional 2 decimal digits and may be also a negative number. If someone would like it, he can take it and if someone want to include it in the cake framework (maybe an improved form), can do it. HTH Bye Davide -- By the power of Greyskull... signature.asc Description: OpenPGP digital signature
Trimming posted data
Good morning. Cake 1.1.8.3544, php 4.4.0 and apache 2.0.54 (Win32). I've always used this steps for trimming the posted data, but actually it doesn't seems to work anymore. In the app/app_model.php I've added this function function beforeValidate(){ parent::beforeValidate(); //trimming whole data if(isset($this->data[$this->name])){ $buff = $this->data[$this->name]; foreach($buff as $index=>$elem){ if(is_string($elem)) $buff[$index] = trim($elem); } $this->data[$this->name] = $buff; } return true; } that as you can see, step through the posted data and trim them if are strings. So, when they pass to validation, if I have a VALID_NOT_EMPTY field, and the user inputed only spaces, cake automatically raise an error. A sample model is something like this function add(){ ... if(isset($this->data)){ if($this->Treasury->save($this->data)){ ... This method always worked but now, with 1.1.8 I was testing it and saw that it wont work. So putting some logs I saw that in the model::invalidFields() function at line 1308[1] made a test. Just before this line, the $data variable holds the originally posted data (not trimmed), and $this->data holds the trimmed ones. The $data is not empty, so the validation is finally made on the not trimmed data. How can I do to set also the $data variable? I've tried something like function beforeValidate(){ parent::beforeValidate(); //trimming whole data if(isset($this->data[$this->name])){ $buff = $this->data[$this->name]; foreach($buff as $index=>$elem){ if(is_string($elem)) $buff[$index] = trim($elem); } $this->data[$this->name] = $buff; $data = $this->data; } return true; } but it doesn't work. Maybe I miss something. Sorry for the long post. Thanks and bye Davide 1. http://api.cakephp.org/model__php4_8php-source.html#l01308 -- By the power of Greyskull... signature.asc Description: OpenPGP digital signature
Re: Is this normal behaviour?
copy cake/app_controller.php to app/app_controller.php, edit it and add the line var $helpers=array('Html','Javascript') Then $html and $javascript will be available to all controllers --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---