Re: CakePHP Containable on Associated Model

2012-05-07 Thread bs28723
How do you have your Models setup? Book     $hasMany = array('Log' => array('className' => 'Log', 'foreignKey' => 'book_id'));    $belongsTo = array('User' => array('className' => 'User', 'foreignKey' => 'user_id'));                                    

Re: How to avoid extra php code in views

2012-05-07 Thread bs28723
If you want to think of a website that has a lot of the same features that i am trying to implement with CakePHP, then think about Google Groups.   Lots of users, multiple groups, multiple members, roles per group, etc, etc. I agree, adding layers, adds comp

Re: Pass data between models during same request

2012-05-07 Thread Michael Stelly
Thanks for the tip. I'll check it when I get back to the office. Sincerely, Michael Stelly mobile: +1.918.978.2000 skype: mjstelly LinkedIn On Mon, May 7, 2012 at 6:11 PM, lowpass wrote: > Are these models associated with each other? If so, you can do > ev

cake-php@googlegroups.com

2012-05-07 Thread Jamie
Yup, it seems basically to be abandoned. Too bad - it had potential to be a really useful site. On May 4, 10:29 am, Xoubaman wrote: > When I found that there is such a way to ask for help, I start to use it > and answer the questions I know how to, moving my "help activity" from this > group to Q

Re: Display unescaped html elements

2012-05-07 Thread lowpass
How were they escaped? If the content has been run through htmlspecialchars() before saving to the DB then: echo htmlspecialchars_decode($data['Post']['body']); On Sat, May 5, 2012 at 12:53 PM, Matteo Landi wrote: > On May/05, Matteo Landi wrote: >> Hi everybody, >> >> Could you tell me what is

Re: i

2012-05-07 Thread lowpass
echo $data['Post']['body']; Maybe the question wasn't clear. What exactly do you mean about the "right way to display" it? On Sat, May 5, 2012 at 12:01 PM, Matteo Landi wrote: > Hi everybody, > > Could you tell me what is the right way to display html formatted content > extracted from the datab

Re: Pass data between models during same request

2012-05-07 Thread lowpass
Are these models associated with each other? If so, you can do everything from within the Invoice model. That is, if Invoice is associated with ExternalHeader, just do $this->ExternalHeader->save(...) That way, there's no need for the controller to load the other models. On Wed, May 2, 2012 at 6:

Re: JsHelper CakePHP 2.1

2012-05-07 Thread Charles Blackwell
I just wanted to know how to do a simple script. For example, do I use scriptStart and scriptEnd to enclose the domReady event? On Monday, May 7, 2012 8:20:03 AM UTC-4, manzapanza wrote: > > CakePHP 2.1 natively supports jquery > http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html > Wha

Re: How to avoid extra php code in views

2012-05-07 Thread Justin Edwards
I think you may need to question if everyone needs to be able to open edit, or if there should be more than just a generic edit. ACL takes care of that. You may need to make your controller methods smaller and have smaller pages, because overly large pages can definitely complicate and confuse us

Re: How to avoid extra php code in views

2012-05-07 Thread bs28723
Thom, Thanks for taking the time to respond. This would be a good time to fix some things in my application if needed. So, I appreciate your help and suggestions. Based on your feedback, I feel like I need take your lead and explore a few things. These are topics I have been wondering about.

Re: Input field READONLY

2012-05-07 Thread DigitalDude
Hey, a disabled field will not show up within the controller's $this->data array. To have a deactivated input that will show up within the controller, but cannot be changed by a user (but by jQuery for example) use the attribute 'readonly' => true: Example: echo $this->Form->input('Model.fiel

Re: Many database requests -> Cake is to slow

2012-05-07 Thread John Hardy
While code optimization should be done, i would be more interested in your network, database setup/tuning and your hardware specs. Test your algorithm outside of the cake framework to compare speeds On May 7, 2012 7:48 AM, "supp...@deep-coding.net" wrote: > Hey, > > I have a problem, I have to

Many database requests -> Cake is to slow

2012-05-07 Thread supp...@deep-coding.net
Hey, I have a problem, I have to handle many database requests, but it tooks to much time. The user can upload a xml file, then I am running a foreach, to create an array from the data of the xml file. Then I am saving this data with the save() method, but it tooks to much time. For testing I have

Re: Digest for cake-php@googlegroups.com - 17 Messages in 8 Topics

2012-05-07 Thread Chris Campise
-- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For m

Translate Behavior Save and Validate more languages

2012-05-07 Thread manzapanza
I'm trying to Save and Validate categories with 3 translations for the field 'name' using TranslateBehavior. I have a problem with the validation of the field with Translation. Model/Category.php public $actsAs = array('Translate' => array('name' => 'MyTranslateName')); > public $validate = ar

Re: How to avoid extra php code in views

2012-05-07 Thread Thom Seddon
Hi Bill, Not exactly sure if you just asking how to hide specific elements or restrict who can edit what. For the former, I would suggest you filter the list in the controller to create separate "editable" "viewable" arrays that you can use in the controller. This would both remove your repeat

Re: JsHelper CakePHP 2.1

2012-05-07 Thread manzapanza
CakePHP 2.1 natively supports jquery http://book.cakephp.org/2.0/en/core-libraries/helpers/js.html What you need to do with JsHelper? Il giorno giovedì 3 maggio 2012 02:11:28 UTC-3, Charles Blackwell ha scritto: > > Are there any tutorials available for the JsHelper for CakePHP 2.1 yet? -- Our

Re: Potential Database Project using Cake PHP

2012-05-07 Thread manzapanza
http://www.php.net/manual/en/getting-started.php Il giorno venerdì 4 maggio 2012 00:45:02 UTC-3, Timothy Lau ha scritto: > > I was told that I should use cakePHP for a project involving a database > for input from multiple forms. Can someone start me in the right direction > from scratch. I on

Re: Translate behaviour not working as expected

2012-05-07 Thread manzapanza
Hi, Probably you need to enter "manually" in i18n table the translations of the default language. TranslateBahavior make an INNER JOIN on i18n table to find translations Massimo Il giorno martedì 13 settembre 2011 09:16:36 UTC-3, Gabe ha scritto: > > Hi all, > > I am using translate behaviour

Use the comntact model twice but with different required fields

2012-05-07 Thread heohni
Hi, I would like to use the contact model on 2 pages. The main contact form, street, postcode and city is not a required field. And a simple order form for catalogs where those fields are required. Is that possible? To have - based on the form - additional fields which need to pass the validati