RE: Application specific configuration

2007-05-05 Thread Mariano Iglesias
Or create a file called app/config/config.php like the following: 'value1', 'setting2' => 'value2' ); ?> Then on app/config/bootstrap.php add the following: Configure::load('config'); Then whenever you need to get these settings do: $setting1 = Configure::read('app.setting1'); $setti

Accessing model functions from view?

2007-05-05 Thread Stacey
Hi All, I'm having a problem trying to access 'hasField' in a view. I have a calculated field that is only created if there is a value to put in the field. So, I need to first check if the field is available before I do something with it in my view. Is this possible? --~--~-~--~~---

Re: Application specific configuration

2007-05-05 Thread Devraj Mukherjee
Thanks! On 5/6/07, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote: > > > On May 5, 2007, at 9:36 PM, Devraj Mukherjee wrote: > > > > > Hi everyone, > > > > I wish to define a few application specific configuration variables > > like > > > > - SMTP server in use > > - Path to store imag

Re: Application specific configuration

2007-05-05 Thread John David Anderson (_psychic_)
On May 5, 2007, at 9:36 PM, Devraj Mukherjee wrote: > > Hi everyone, > > I wish to define a few application specific configuration variables > like > > - SMTP server in use > - Path to store image files > > Does Cake allow programmers to do that? /app/config/bootstrap.php or Class vars in y

Re: Simple SQL 'OR' Clause

2007-05-05 Thread Langdon Stevenson
Hi daareck Check out the Cake manual (http://manual.cakephp.org/chapter/models) and look for the section titled: Complex Find Conditions (using arrays) It has a good description of how to compose an array of conditions that will do what you want. Regards, Langdon daareck wrote: > Hello > >

Application specific configuration

2007-05-05 Thread Devraj Mukherjee
Hi everyone, I wish to define a few application specific configuration variables like - SMTP server in use - Path to store image files Does Cake allow programmers to do that? -- "I never look back darling, it distracts from the now", Edna Mode (The Incredibles) --~--~-~--~~--

Re: How do I use i18n and l10n in CakePHP 1.2?

2007-05-05 Thread Aaron Shafovaloff
I have $_SESSION['Config']['language'] set to my desired language but i18n::translate doesn't even seem to have access to $_SESSION?. I've done a pr($_SESSION) at line 114 of i18n.php and it returns blank. If I do a pr($_SESSION) in a view it works fine. Any ideas? On May 5, 6:08 am, CraZyLeGs <[

Simple SQL 'OR' Clause

2007-05-05 Thread daareck
Hello I need some help in making an OR clause in $criteria array. I'd like to have two conditions on one field. It should look like: ... WHERE((AuctionShippers.shipper_id='5' OR AuctionShippers.shipper_id='-1') AND(..[some other conditions]..)) $criteria['Auction.created'] = $this->data['Auction

Custom URLs

2007-05-05 Thread pierre.k
Hi, I am looking for a solution to the following problem: basically, I want urls in form "/controller/action/params" as well as "/en/ controller/action/params". The idea behind this is to allow for multiple languages ("/en/..." might as well be replaced with "/cs/..." and alike) and in ideal case

Update to latest version and I got Fatal Error

2007-05-05 Thread eveloper
It has been a while I have not been using CakePHP because the project I am working on now wasn't built on using CakePHP. Not even with a proper frameworks... Currently I am back using CakePHP and tried to update my version of CakePHP from 1.1.8.3544 to 1.1.14.4797. I know it is a huge leap... I e

Re: Trouble trying to print this array.

2007-05-05 Thread Stacey
I'm a newbie, but I just ran into this same issue. I believe it should be: instead of: On May 5, 12:10 pm, rockit <[EMAIL PROTECTED]> wrote: > I'm having troubles trying to print this array in the format i need. > let me explain that yes i know how to loop through a basic array. > > As you

Re: wrong with class.paths.php

2007-05-05 Thread Samuel DeVore
usually it means that your tmp folder doesn't have the right structure and that it has incorrect permissions. Very often ftp and or decompression utilities do not create empty folders, and often they do not have the right permissions. On 5/5/07, davyke <[EMAIL PROTECTED]> wrote: > > Parse error:

Trouble trying to print this array.

2007-05-05 Thread rockit
I'm having troubles trying to print this array in the format i need. let me explain that yes i know how to loop through a basic array. As you can see there are 2 models here, Inventory & Photo. The association is Inventory hasMany Photo and Photo belongs to Inventory. When i print_r($inventorie

Cake set up problem

2007-05-05 Thread cakedude
Please help. I'm trying to get cake running in an online environment but i just want cake to run in on directory and leave the rest of the site like it is. So my cake dir is www.mysite.com/cake/. However, when i do so i'm seeing the source code of my index.php file in the app/ webroot/ dir in my b

Re: Newbie, database and model relations?

2007-05-05 Thread rockit
what helped me to figure out my associations and everything was to simple bake the app. there's a screencast on how to bake apps, it saves you a lot of time in the beginning trying to figure out how to model your associations. if it doesn't work, bake it again with different settings. On May 5,

Re: About the cakephp ajax's problem, work well at firefox, but not at IE7

2007-05-05 Thread Marcus T. Jaschen
seedme wrote: > Hi, Bernardo, > Thanks for your reply. > > I set the debugging level to 0, but I cannot get any warning messages. > I don't know how to debug this problem at IE7.0. > This works as expected when I use Firefox. but not use IE7.0 Try to debug it at the client side with Fiddler HTTP

wrong with class.paths.php

2007-05-05 Thread davyke
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in / home/www/chinoisdici/www/crystal/app/tmp/cache/persistent/ class.paths.php on line 12 sometimes, i have this problem, do someone know where is the problem --~--~-~--~~~---~--~~ You received thi

RE: Newbie, database and model relations?

2007-05-05 Thread Mariano Iglesias
http://manual.cakephp.org/chapter/models There for a reason. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.Ma

Newbie, database and model relations?

2007-05-05 Thread Stacey
Hi All, I'm having a bit of trouble figuring out how to set up my models & controllers with respect to my database. Here is a general overview of what I'm trying to accomplish. I have 2 main tables: conditions & remedies. remedies can belong to several conditions, so i set up another table calle

Re: New to cakePHP

2007-05-05 Thread whidbey
Hi,I have the same problem ,I use the lasted version of bakesale ,and the backend admin operation such as category have the same problem. I think there 2 reason ,database table not very well support such as we put '' into int type. the other is the last version of stable 's cakephp's problem. did

Re: How do I use i18n and l10n in CakePHP 1.2?

2007-05-05 Thread CraZyLeGs
you probably mean $_SESSION['Config']['language'] On May 4, 2:08 pm, misho <[EMAIL PROTECTED]> wrote: > Well Yes, > I do some checks on allowed languages, but I don't have a separate > controller to deal with this. > Just scan URL into function (in app_controller.php) and then redirect. > > And t

Re: multi-page forms

2007-05-05 Thread CraZyLeGs
It's a bug in the component: initWizard has default prefix set to _Wiz function initWizard(& $ways, $prefix = "_Wiz") While clearWizard ( and the methods it calls ) has _Wizard. function clearWizard($prefix = "_Wizard") function clearStep($prefix = "_Wizard") function clearData($prefix = "_Wizard"

Re: Strange behaviour when saving data

2007-05-05 Thread ifcanduela
Thanks Cheeze, I'll try that... on Monday :) -If --~--~-~--~~~---~--~~ 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