Re: cakephp-fr
Have you registered the domain as yours yet? I do speak french, and eventhough I am not a Cake expert, I believe that translating the docs is a doable task. I can commit myself to such a project. Still as avairet says, there needs to be leadership. Why not you? Since it's your idea... I am now waiting for you to launh the website, to make clear what are the role to play when we engage ourselves. Donc je n'attend que ton signal. On Nov 24, 10:46 am, pluriels [EMAIL PROTECTED] wrote: cakephp-fr.org will be free tomorrow ! I wanted the reuse the domain name because of the Search Engine Optimisation. It will be faster with the existing backlinks. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Share Models between applications
On Oct 11, 9:04 pm, Tulio Faria [EMAIL PROTECTED] wrote: I mean using the same model files :) On 11 out, 11:01, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: in config/database.php add var $'shared_db = array( 'driver' = 'mysql', ); In all such model add var $useDbConfig = 'shared_db'; Hi Tulio. If what you mean is: * that you'll have more than one application using the same model files, the models that are supposed to reside in your application folder, then let's consider that your models folder is at the root of you www folder (i'm using wamp and my cake install is inside a the cake folder of www. I call the cake folder ROOT from now on) : 1. case one: you are not using mod_rewrite nor .htaccess files. www | models. | ROOT | app1 | app2 | CAKE_CORE Here ROOT means the cake installation directory, which is by default cake. Then the solution is to write in app1/bootstrap.php and app2/ bootstrap.php the following line: $modelPaths = array(dirname(ROOT).DS . 'models'.DS); Now you still have a problem: in cake/index.php you define your app folder. So at any point of time using this configuration you can access only one of your application, eventhough they all use the models defined in the models folder. Thus the solution seems imcomplete. One idea would be to have as many cake install as you have applications: www | models. | ROOT1 | app1 | CAKE_CORE ROOT2 | app2 | CAKE_CORE This way you just have to write, in your browser: http://mysite/cakeApp1/controller/action and the same models will be used. Now with this config, you are using the same CAKE_CORE twice, to solve this redudancy CakePHP will let you specify a CAKE_CORE outside the ROOT directory: (line 43 of ROOT/index.php) //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; So leave this line commented and simply rewrite the line 44: define('CAKE_CORE_INCLUDE_PATH', dirname(ROOT)); So now we put the CAKE_CORE outside of ROOT so that all of your apps can use the same CAKE_CORE: www | models | CAKE_CORE | ROOT1 | app1 ROOT2 | app2 2. in case you are using mod_rewrite and .htaccess files: put your file structure as indicated in the solutoin I just mentionned: www | models | CAKE_CORE | ROOT1 | app1 ROOT2 | app2 and rewrite line 56 of app1/webroot/index.php and app2/webroot/ index.php, etc, as: define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(dirname(__FILE__); Hope this can work for you. I tried sharing the models this way and it worked. I haven't tried the CAKE_CORE sharing though ;-), but don't worry, it should work the way the CakepHP team says it will. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
sharing models between apps
I have read a post where Tulio Fara was asking help to settup many applications to use the same models. I want to share a solution for this issue and also find out if I'm doing it the cake way :-). Now I'm using wamp and I unpacked Cake inside the cake folder of the www folder of wamp (the folder from which wamp serves pages by default). *First case: no mod_rewrite nor .htaccess files: my directory structure is the following( some folders are omitted): www | cake | app | models . . | cake Now I want the models folder to reside somewhere and many apps to access it. www | models | cake | app | . . | cake I put models under the www folder, and I write this line in app/ bootstrap.php: $modelPaths = array(dirname(ROOT)); Now the thing is that only one app at a time will be able to use the models because of line 33 of www/cake/index.php: define('APP_DIR', 'app'); To solve this I will house each app in its own cake install: www | models | cakeApp1 | app1 | cake | cakeApp2 | app2 | cake To avoid the redundancy of using many CAKE_CORE folders , i mean the 'cake/cake' folder in the default Cake installation, I modify the CAKE_CORE_INCLUDE_PATH as adviced by the CakePHP team at line 44 of 'app/bootstrap.php'.: define('CAKE_CORE_INCLUDE_PATH', dirname(ROOT)); I Do this for as many apps as I have. Then I set my directory structure as such: www | models | cake | cakeApp1 | app1 | cakeApp2 | app2 Second case: mod_rewrite is enabled and .htaccess files are used: I use the same directory structure as above, I keep the same modifs to all of my apps bootstrap.php files. Then I simply change the line 56 of the webroot/index.php of each app like this: define('CAKE_CORE_INCLUDE_PATH', dirname(ROOT)); That's it. The security aspects of all this was not thought through, so can someone let me know what security implications such a config has? Or even if there is a better way to do this. Thanks again. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---