Re: Newbie: Is there a manual for Bake?

2007-08-16 Thread Aaron Roberson
Thanks Citrus -Aaron On Aug 16, 11:03 pm, citrus <[EMAIL PROTECTED]> wrote: > Have a look at these helpful articles: > > http://cakebaker.42dh.com/results?cx=001708348340724185334%3Ajyhafixs... --~--~-~--~~~---~--~~ You received this message because you are subs

How to i use method in View in Cakephp 1.2

2007-08-16 Thread seefai
Hi, i have a view display result from Model, i have another method in controller and it will display the String value from the result. Let say , if database result is 'M', the method will convert to 'Male' In CakPHP 1.1 i can simply use $this->ConvertSex($user['User'] ['username']); but in CakeP

Re: Newbie: Is there a manual for Bake?

2007-08-16 Thread citrus
Have a look at these helpful articles: http://cakebaker.42dh.com/results?cx=001708348340724185334%3Ajyhafixs7hu&q=bake&sa=search+this+site&cof=FORID%3A9#936 On Aug 17, 9:52 am, Aaron Roberson <[EMAIL PROTECTED]> wrote: > Yes, I've looked the cheatsheet over. I am looking at it now in fact > but

Re: Trouble with the translate function "__()"

2007-08-16 Thread citrus
I have the same problem while trying to use __() in my validation message. --~--~-~--~~~---~--~~ 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 unsubsc

Trouble with the translate function "__()"

2007-08-16 Thread Aaron Shafovaloff
I'm using the latest svn update of CakePHP "freakin awesome" 1.2. This works: $temp = __("Username",true); echo $form->input('username',array('label' => $temp)); This doesn't, and I get an "internal server error" echo $form->input('username',array('label' => __("Usernam

Re: Newbie: Is there a manual for Bake?

2007-08-16 Thread Aaron Roberson
Yes, I've looked the cheatsheet over. I am looking at it now in fact but I don't see anything saying how to use Bake to generated my models and controllers. I see methods a properties galore which is very helpful, but nothing at all about Bake or how to bake models and controllers. What is the sy

Elements Question from a newbie

2007-08-16 Thread Neffo
Hello all, sorry if this is a beginners question but then im a beginner with cake and was hoping someone could point me in the right direction. I have an element which is small form that I would like to include on most pages and I want this element to be at the top of the left col of my layout. W

Re: so many memory used when runing CAKEPHP

2007-08-16 Thread Chris Hartjes
On 8/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > hi > > thanks for you reply. > > but it do not happend in the other PHP application. > There is nothing inherent in CakePHP that causes it to use up all sorts of web server memory. So, again, not a CakePHP issue. Most likely an issue

Seeking eCommerce Module Developers

2007-08-16 Thread savagekabbage
I'm in the process of creating an API for Selling Made Simple for modules (plugins). I'm looking for both developers of modules, and people to request eCommerce modules. If you guys could tell me what functionality would be nice in module development, I could start creating a basic API within Ca

Re: so many memory used when runing CAKEPHP

2007-08-16 Thread [EMAIL PROTECTED]
hi thanks for you reply. but it do not happend in the other PHP application. Chris Hartjes 写道: > On 8/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > hi all > > > > here is Apaceh + Mysql + Cakephp in windows platform, > > Apache started with 23M memory, > > > > but when launch my

Re: Having to redeclare conditions in generateList()

2007-08-16 Thread cdomigan
Thanks Grant, that makes sense. Is there any way then to define the Model such that it has it's own built-in conditions? i.e. not reliant on an association? Eg: class Designer extends AppModel { var $name = 'Designer'; var $useTable = 'employees'; var $condition = 'Employee.is_designer =

Re: Having to redeclare conditions in generateList()

2007-08-16 Thread Grant Cox
Because the conditions on your association are only on the association - so only used when Cake automatically retrieves associated records. When you call $this->Job->Designer you are accessing a Designer model instance - you are NOT accessing an "associated" Designer model instance. It's just a

Having to redeclare conditions in generateList()

2007-08-16 Thread cdomigan
Hi there. I have an association defined in a model with a condition set. Eg in my Job model: var $belongsTo = array( 'Designer' => array( 'className' => 'Employee', 'foreignKey' => 'designer_id', 'conditions' => 'Employee.is_designer = 1' ) ); However when I ac

css menu helper

2007-08-16 Thread rtanz
hi i am trying to implement http://bakery.cakephp.org/articles/view/css-menu-helper into my project. I would like to have 2 versions of this menu, one available in the front end of the site and another version for admin use. I am using cake's admin routing for my admin section. I would like som

Re: newbie question about model visibility

2007-08-16 Thread Grant Cox
var $uses = array('User',"Status') then you can use $this->Status. Or, just use $this->User->Status (the Status instance will be created on the User because of the association). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

newbie question about model visibility

2007-08-16 Thread bill2520
Sorry to ask such a simple question, but I can't find where it is explained. I have two models: User belongsTo Status Status hasMany User When I create a new user, I want to generate a select box to choose the status. users_controller.php: class UsersController extends AppController { var $n

Re: Newbie: Is there a manual for Bake?

2007-08-16 Thread dakine
Have you checked the cheatsheet on cakephp.org?? On Aug 17, 8:29 am, Aaron Roberson <[EMAIL PROTECTED]> wrote: > I've searched this discussion list and the CakePHP website but I can't > find much of anything about Bake. I have gotten as far as doing the > following: > > # cd C:\wwwroot\cake\scrip

Re: How to make a good use of Elements and DRY principe ?

2007-08-16 Thread Christophe C.
up :( Any suggestions ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED

Re: Many to Many relations - How to?

2007-08-16 Thread Samuel DeVore
and if you add 'nate' to the search you will find just what you are looking for ;) On 8/16/07, Samuel DeVore <[EMAIL PROTECTED]> wrote: > search the group for hasAndBelongsToMany and I bet you find a ton of help > > >

Re: Many to Many relations - How to?

2007-08-16 Thread Olexandr Melnyk
Create a separate model for the relationship table, and use hasMany + belongsTo instead of hasAndBelongsToMany, for example: User hasMany UserGroup UserGroup belongsTo Group 2007/8/17, Andrea <[EMAIL PROTECTED]>: > > > Hello to everybody! I have a problem: I want to implement a many to > many rel

Re: Many to Many relations - How to?

2007-08-16 Thread Samuel DeVore
search the group for hasAndBelongsToMany and I bet you find a ton of help On 8/16/07, Andrea <[EMAIL PROTECTED]> wrote: > > Hello to everybody! I have a problem: I want to implement a many to > many relation with a c

Many to Many relations - How to?

2007-08-16 Thread Andrea
Hello to everybody! I have a problem: I want to implement a many to many relation with a cross table that has other fields. I explain better with an example: Users -id -name -surname Groups -id -name Users_Groups -id -user_id -group-id -join_date -kind As you can see the entity Users_Groups is

Newbie: Is there a manual for Bake?

2007-08-16 Thread Aaron Roberson
I've searched this discussion list and the CakePHP website but I can't find much of anything about Bake. I have gotten as far as doing the following: # cd C:\wwwroot\cake\scripts # php bake.php C:\wwwroot\cake\cakeApp\ That allows me to generate a site template and I believe it spits out a defau

Re: Problem by upload a file

2007-08-16 Thread [EMAIL PROTECTED]
Why i'm getting this error? : Notice: Undefined index: DSC00767.JPG in C:\wamp\www\inz_cake\app \controllers\language_controller.php on line 48 DSC00767.JPG - this is a uploaded filename from submitted form view: file('Language/picture'); ?> . Controller: function add() { if (!

Re: Error after add models and controller

2007-08-16 Thread Aurelijus Valeiša
Hi, check if your apache is loaded with module mod_rewrite. It seems that you have a problem with rewriting url. Read section 5 http://manual.cakephp.org/chapter/installing On 8/16/07, AdiCB <[EMAIL PROTECTED]> wrote: > > today I tried to follow tutorial > http://www.sitepoint.com/article/applica

Error after add models and controller

2007-08-16 Thread AdiCB
today I tried to follow tutorial http://www.sitepoint.com/article/application-development-cakephp but I always got error : Not Found The requested URL /cake/notes/ was not found on this server. Apache/2.2.3 (Win32) PHP/5.1.6 Server at localhost Port 80 Whats wrong.. I am sure that I follw the

Re: Problem by upload a file

2007-08-16 Thread [EMAIL PROTECTED]
$fileData this is the first parameter of my function : saveAs($fileData, $fileName, $folder) . I want to use this function in "add" action by pass in this function three parameters: ( "'imageFile', $imgId, WWW_ROOT . 'folder/subfolder/' ) Where 'imageFile' is the name of the file field. I wan

Re: HTTPSocket Basic Auth

2007-08-16 Thread francky06l
Maybe give a try with CURL ? On Aug 16, 2:48 pm, Preloader <[EMAIL PROTECTED]> wrote: > Hi Felix, > > thank you for your quick answer. > > ...> Authentication / SSL are unfortunately not implemented in HttpSocket > > yet. > > ... > > I was afraid of this :-) > > Regards, Christoph --~--~--

Re: Problem by upload a file

2007-08-16 Thread francky06l
What is your problem ? What I can see quickly : $fileData, what is it ? Maybe i am wrong but seems that $fileData is "unknown" ... On Aug 16, 8:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I want to upload a file in the folder 'images' and give him a name > like this: id_from_dat

Problem by upload a file

2007-08-16 Thread [EMAIL PROTECTED]
I want to upload a file in the folder 'images' and give him a name like this: id_from_database.jpg and insert the filename in my database table 'languages'. Please help Stanley Controller: function add() { if (!empty($this->data)) { if ($this->Language->save($this->dat

Re: Lots of disk activity, caching gone mad?

2007-08-16 Thread Marcus
Maybe excessive logging with $this->log()? Or is the kernel swapping to/from disk? Take a look at the fs_usage(1) tool, it's used to monitor the file system's activity - so you can identify the process which is causing the heavy I/O. Marcus On Aug 16, 6:27 pm, "[EMAIL PROTECTED]" <[EMAIL PROTE

Lots of disk activity, caching gone mad?

2007-08-16 Thread [EMAIL PROTECTED]
Hi We are running a website on cake on Mac OS X 10.4.10 Server with MySQL on a second server. On the cake webserver we are seeing a lot of disk activity, a constant 2 to 4 MB/sec (with occasional peaks up to 8MB/sec) and the site is running very slowly. I'm trying to pin down where this is all

Re: How can I updated table using checkboxes and button

2007-08-16 Thread Chris Hartjes
On 8/16/07, bbuchs <[EMAIL PROTECTED]> wrote: > > Jerk. > Well, there are three potential "jerks" 1) the original poster for expecting people to simply provide them with code 2) the responder who told them to go read the manual 3) the person who called the responder in #2 a "jerk" Personally, I

Discussion on cake-apps-sites-in-the-wild

2007-08-16 Thread Reggie Mason
Mozilla Addons Site Implemented in CakePHP - Subversion http://svn.mozilla.org/addons/trunk/site/ --~--~-~--~~~---~--~~ 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@goog

Re: How can I updated table using checkboxes and button

2007-08-16 Thread bbuchs
Jerk. On Aug 16, 10:40 am, MrTufty <[EMAIL PROTECTED]> wrote: > Or, not. > > You should be able to figure this one out for yourself with minimal > work. What, you want us to write your code for you now? > > Steve > > On Aug 16, 9:02 am, nirmal <[EMAIL PROTECTED]> wrote: > > > Please give me an e

Re: Practical effect of Mambo going with CakePHP?

2007-08-16 Thread Mech7
> The new version of Joomla is using an MVC design pattern, haven't > looked at it yet, but doubtful they used CakePHP (otherwise it > would've been posted all over the cake site/bakery I assume). Joomla has been working on their own framework which is now in 1.5 --~--~-~--~~---

Re: How can I updated table using checkboxes and button

2007-08-16 Thread MrTufty
Or, not. You should be able to figure this one out for yourself with minimal work. What, you want us to write your code for you now? Steve On Aug 16, 9:02 am, nirmal <[EMAIL PROTECTED]> wrote: > Please give me an example with code. > :) > > On Aug 14, 11:20 pm, Ketan Patel <[EMAIL PROTECTED]> w

Re: Problems in validating an checkbox

2007-08-16 Thread [EMAIL PROTECTED]
Please help me out to sovle this problem. On Aug 16, 11:14 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello Friends, > > I am having some problems in validationg an checkbox. > > I am using this code in my view :- > > checkbox("modelname/checkname") ?> > > in my model i am using this :-

Re: $form->file() renders: Array to string conversion [COREcakelibs/view/helper.php, line 296]

2007-08-16 Thread brammeleman
I'm getting the same error with cake 1.2 5427. I'm not doing any validation / upload behaviors or what so ever. This is my code: controller action: function add_picture() { if (!empty($this->data)) { $this->Post->create(); i

Discussion on cake-apps-sites-in-the-wild

2007-08-16 Thread luke BAKING barker
seems to be a Cake app running the new Mozilla Joey project for mobiles! Looks sweet! https://joey.labs.mozilla.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Re: problem in default.thtml

2007-08-16 Thread [EMAIL PROTECTED]
Thanks Alan, I will review my code as you have mentioned and will let you know. On Aug 16, 7:24 pm, alan <[EMAIL PROTECTED]> wrote: > You're code is not valid... i find it hard to believe it's working in > the index page even. > > I recommend you either: > > generate your menu in app_controller.

Re: problem in default.thtml

2007-08-16 Thread alan
You're code is not valid... i find it hard to believe it's working in the index page even. I recommend you either: generate your menu in app_controller.php (in the app root folder) in the beforeRender() method generate your menu in a special action called makeMenu() and then requestAction it.

Re: Best Practices - "Modular Blocks & Actions"

2007-08-16 Thread alan
You might consider initially loading all of your content serverside instead of AJAX. Just put all the components together on one page using $this->requestAction() to get all the content elements. You can then update and move them around with AJAX as your planning... but you'll see better perform

Re: Practical effect of Mambo going with CakePHP?

2007-08-16 Thread Tom.Maiaroto
Yea, I'm also a bit puzzled...I didn't realize Mambo was still under active developmentor maybe it wasn't and now will be. The new version of Joomla is using an MVC design pattern, haven't looked at it yet, but doubtful they used CakePHP (otherwise it would've been posted all over the cake si

Re: Practical effect of Mambo going with CakePHP?

2007-08-16 Thread RichardAtHome
The interesting part for me is that once Mambo is powered by PHP it should be a heck of a lot easier to develop websites that require CMS functionality. Most of the websites I develop at the moment have CMS elements (allowing the site owners to add new content, change content etc.) with some cust

Re: where to put independent functions

2007-08-16 Thread rtanz
yep i understood perfectly, managed to implement it 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 gr

Re: Practical effect of Mambo going with CakePHP?

2007-08-16 Thread Jon Bennett
> I'm sure that mambo going with cake is great from a feel good point of > view. > > But, what practical benefit is there for cakephp developers? Will it > be easier for cake developers to develop mambo modules? Will mambo > modules be valuable for cake developers? I'd say a major bonus would be

Re: Practical effect of Mambo going with CakePHP?

2007-08-16 Thread Mike Green
I have wondered about this, and what the overall outcome will be, since the original mambo devs went on to do joomla, who are the mambo developers? and of those people who originally used mambo, how many did not upgrade to joomla?? Also, what version of cake is mambo going to use? I will certain

Practical effect of Mambo going with CakePHP?

2007-08-16 Thread walterbyrd
I'm sure that mambo going with cake is great from a feel good point of view. But, what practical benefit is there for cakephp developers? Will it be easier for cake developers to develop mambo modules? Will mambo modules be valuable for cake developers? --~--~-~--~~~

Re: Validation based on actions?

2007-08-16 Thread francky06l
hummm strange because this works for me .. Where did you implement the beforeValidate ? In app_model or user_model ? Mail me your view and model for the user ..I will check On Aug 16, 11:56 am, Charlie <[EMAIL PROTECTED]> wrote: > Unfortunatly I didn't manage to get this working. > It doesn't rem

Re: HTTPSocket Basic Auth

2007-08-16 Thread Preloader
Hi Felix, thank you for your quick answer. ... > Authentication / SSL are unfortunately not implemented in HttpSocket > yet. ... I was afraid of this :-) Regards, Christoph --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: where to put independent functions

2007-08-16 Thread djiize
If you want to access by http://mysite.com/uploadfile, you'll need to wrap it in an controller's action let's say: controller: UploadController action: uploadfile and write a route that redirect /uploadfile to /upload/uploadfile If you want a function and its view, in Cake words, it's a control

Re: where to put independent functions

2007-08-16 Thread rtanz
in my case i wouldnt want to call any particular controller, but just the upload function directly, therefore i would need just the function and its view, and i would want to call it from mysite.com/uploadfile should i use the bootstrap to do this? thanks --~--~-~--~~~--

How to make a good use of Elements and DRY principe ?

2007-08-16 Thread Christophe C.
Hello, After reading the manual and other search results, i still didnt find the way to make a good use of Elements when using Ajax. Let's say i have a model "User" and in my controller, a method called "index" that list my registered users. Since I'll re-use this user list in my application, i

Re: HTTPSocket Basic Auth

2007-08-16 Thread Felix Geisendörfer
Authentication / SSL are unfortunately not implemented in HttpSocket yet. However, both have very high priority in terms of being implemented soon. file_get_contents() uses PHPs built-in support for streams and authentication. -- Felix -- My Blog: http://www.thinkingphp

Re: One controller action and multiple views

2007-08-16 Thread Grant Cox
Certainly, if you call $this->render() in your controller action you can specify whichever view file / layout you want. On Aug 16, 8:41 pm, nitifixis <[EMAIL PROTECTED]> wrote: > Hi! > > Just one question, can one controller action have multiple views and > select any of them depending on a sett

Re: Acl question

2007-08-16 Thread Langdon Stevenson
Hi Nina > However, what I'd like is a simple command to find all pictures that a > given user has access to. I realize that I can find all pictures and > check them one by one. However, this seems expensive to me (one query > to get all pictures and then N queries to check the permissions). > T

One controller action and multiple views

2007-08-16 Thread nitifixis
Hi! Just one question, can one controller action have multiple views and select any of them depending on a setting/parameter/whatever? Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To

HTTPSocket Basic Auth

2007-08-16 Thread Preloader
Hello Bakers, has anyone of you faced a problem with HTTPSocket and basic auth? I want to get XML data from my partners webservice, and this requires basic authentication. For some reason this seems not work with HTTPSocket. The URI is generated correctly: http://xyz:[EMAIL PROTECTED]/dispatche

Re: cake+joomla=jake, but where have the developers gone?

2007-08-16 Thread Mike Green
Hi Mariano I'd love to get jake working with the latest cake (svn). THey've changed stuff in the dispatcher to do with the urls, and now all the urls from jake are including the /joomla part (where joomla is installed) which is a pain. Could you tell me what I might have to try and change in jake

Re: where to put independent functions

2007-08-16 Thread djiize
since it's business logic, you can make a component for that (UploadComponent) and include it in your controller(s) ( var $components = array('Upload') ) in addition, for simple fonctions, you can add them in /app/config/ bootstrap.php. This file is loaded at the start of the request, and its con

Re: Validation based on actions?

2007-08-16 Thread Charlie
Unfortunatly I didn't manage to get this working. It doesn't remove the 'validate' rules which I set when I have the 'reset password' form. var $actsAs = array('ConditionalValidation' => array(array('condition' => '$data[\'User\'][\'rstpass\'] == 1', 'remove'=> array('username','password

where to put independent functions

2007-08-16 Thread rtanz
hi i am wondering where to put some functions which are independent from the models in my site. for example i have a file upload function which does not affect anything else but is just used to upload files into a folder on the server without saving anything to the database. thanks --~--~---

Acl question

2007-08-16 Thread Nina
Hello I would like some advice on how to tackle the following problem: I have a cakephp acl model where I have users and pictures. Users have access to some pictures and not to others. My aro alias is on the form User::$user_id and the aco alias for the picture is on the form Picture::$picture_i

Re: How can I updated table using checkboxes and button

2007-08-16 Thread nirmal
Please give me an example with code. :) On Aug 14, 11:20 pm, Ketan Patel <[EMAIL PROTECTED]> wrote: > Do pr($this->data) in your controller action after you post the form, > this will give you all the information about what variables you have > available tosave. Start from there. > > Cheers, > Ke

Re: how to pivot a table in a function in controller?

2007-08-16 Thread Wimg
oh, man ,, thx a lot ! On Aug 16, 3:11 pm, starkey <[EMAIL PROTECTED]> wrote: > Something like this should get you moving... > > $ii = count($a); > $arrNew = array(); > for ($jj = 0; $jj < $ii; $jj++) > { >$arrNew[] = array($a[$jj], $b[$jj]);} > > pr($arrNew); > > Good luck! > Shawn > > On Au

Re: how to pivot a table in a function in controller?

2007-08-16 Thread starkey
Something like this should get you moving... $ii = count($a); $arrNew = array(); for ($jj = 0; $jj < $ii; $jj++) { $arrNew[] = array($a[$jj], $b[$jj]); } pr($arrNew); Good luck! Shawn On Aug 15, 9:42 pm, Wimg <[EMAIL PROTECTED]> wrote: > my problem is that I store my data as > a b > 1 2 >