Re: Field Naming conventions and hasmany records

2009-10-04 Thread vekija
You'll have to save the topic first and then fetch it's id. From the cookbook: "If neither of the associated model records exists in the system yet (for example, you want to save a new User and their related Profile records at the same time), you'll need to first save the primary, or parent model.

Re: Multiple controller for 1 layout

2009-10-04 Thread vekija
You could use requestAction http://book.cakephp.org/view/434/requestAction but beware of the performance impact it might have On Oct 4, 9:39 pm, f m wrote: > I'd like to know how to display in a single layout, the result of 2 or > more controllers ? > > Thanks for your help > Franck --~--~--

Javascript cant find XML view data

2009-10-04 Thread bRuNuShky
Hi, I really need help to understand something...( also finish it) I was reading some notes from http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/ . about web service So after read this I work my own test... I created controller function

sorting records with order by and group by

2009-10-04 Thread vekija
Hi, I'm having a problem with sorting the recordset with order by and group by statements. Would appreciate any help. There are 2 models, Team and Vote (Team has many Votes) and I want to order teams based on the number of votes they got. Here's the find call: $teams = $this->find('all', array(

Re: Cross-site element with AJAX ? ? ? How can I ? ? ?

2009-10-04 Thread DatacenterHellas
Is a reqular AJAX request that start working when my page is loaded. Because all the JavaScript is too long I will show you only the line that create the request. $.ajax( { type: "GET", url: '/Countries/getCountries', // <--- This is the line that descri

Re: XAMPP & CakePHP > Running in a sub-directory

2009-10-04 Thread Dr. Loboto
You did not provide any code so I cannot say anything more. As you have problems with views, post that parts of your views that generate wrong links. If you have hardcoded links there, first read about cake helpers and change hardcoded links/paths/etc by helpers-generated ones. On Oct 4, 7:18 pm,

Re: Moving webroot outside of the app folder..

2009-10-04 Thread Dr. Loboto
/** * Editing below this line should NOT be necessary. * Change at your own risk. * */ if (!defined('WEBROOT_DIR')) { define('WEBROOT_DIR', DS.'site'.DS.'webroot'); } On Oct 5, 1:26 am, number9 wrote: > I submitted a thread about this a week ago, but have bee

Re: Cross-site element with AJAX ? ? ? How can I ? ? ?

2009-10-04 Thread Dr. Loboto
Post line where you generate AJAX link/form/what you have there. On Oct 5, 2:19 am, DatacenterHellas wrote: > Hello all. > > I need your help please ! ! ! > > I have create an element that hold a form and I use it in the default > layout file of my application. This form consistes from several s

Re: Using a page outside of CakePHP

2009-10-04 Thread Josh K
I would actually like to include these cake form pages in my cms which reads php code and resides outside of the cake document root. What code would accomplish this? I can't use rewrite because I need to embed my cakephp form pages in my cms. Here's a deprecated example: http://debuggable.com/po

AJAX layout again

2009-10-04 Thread Cергей Inhbgkbyu
Hello 2all! I'm stuck with simple ajax request. First of all, I've tried this solution: http://groups.google.com/group/cake-php/browse_thread/thread/869eb34c8af9ad56?hl=en Works nothing. Google leads to the same solution. Controller code: 1 RequestHandler->isAjax()){ 17 Configure::

Re: Multiple forms in the same view not working

2009-10-04 Thread Hicham EL KADIRI
Hi there. Well i need some help in there for my first cakephp tasks. For a community website i am working on, i have a login form included in views on top of all pages as an element.Then i have a specific page wich you all know, the register page for adding new members to Mysql Database ("Users" t

Multiple controller for 1 layout

2009-10-04 Thread f m
I'd like to know how to display in a single layout, the result of 2 or more controllers ? Thanks for your help Franck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send emai

Field Naming conventions and hasmany records

2009-10-04 Thread #2Will
Hi, I want to add a "comment" to a new 'Topic' when adding topics. Sort of like a first post of a new forum category. To do this, i was hoping that adding a field like this: echo $form->input('ForumComment.comment'); to my form would create a text area and add the comment in. instead it makes

schema for multiple database connections

2009-10-04 Thread iFeghali
Hello All, I have two connections defined "default" and "auth". Some models belongs to one of them and others to the other one. This brings only the tables for model in the default connection : $ cake schema generate Schema file: schema.php generated While that fails: $ cake schema generate -

Re: Uploader Plugin now does Model attachments

2009-10-04 Thread brian
On Sun, Oct 4, 2009 at 8:29 PM, Miles J wrote: > > Many have asked for a way to attach files to a Model to do automatic > file uploading and database saving, within my Uploader Plugin. Well > now you can, its really easy! > > http://www.milesj.me/resources/script/uploader-plugin#Attaching-Files-T

Uploader Plugin now does Model attachments

2009-10-04 Thread Miles J
Many have asked for a way to attach files to a Model to do automatic file uploading and database saving, within my Uploader Plugin. Well now you can, its really easy! http://www.milesj.me/resources/script/uploader-plugin#Attaching-Files-To-Models-Auto-Upload Let me know if you run into any probl

WEBHOST limitation installation problems

2009-10-04 Thread Matias_castro
Hi weveryone, I'm trying to deploy an already built application to a webhost with no success. The main problem is that I'm not allowed to enable mod_rewrite. At first that wasn't a problem since I changed everything to work with the alternative configuration (uncommenting Configure::write ('App.

Re: JS/CSS automatic concatenation and compression

2009-10-04 Thread robust solution
Dear mark, You are highlighting the main problem of concatenation. but even a selective concatenation is not very easy. let us take the example of prototype and scriptacuouls, sometimes we need -only prototype -prototype with some scriptaculous files as when building an autocomplete through aja

Cross-site element with AJAX ? ? ? How can I ? ? ?

2009-10-04 Thread DatacenterHellas
Hello all. I need your help please ! ! ! I have create an element that hold a form and I use it in the default layout file of my application. This form consistes from several select html elements that each one load it's values with AJAX by using the JQuery. Now for debuging I'm using the Firebu

How using XPath-JPath in CakePHP

2009-10-04 Thread Paulos23
Hi people, In last days i am studing about XPath-JPath,the first is for Xml the second for JSON,and how they are work.After understanding their functionality i was wondering if it is possible and in what way I can use Xpath/Jpath in Cake.In particular both are used for output data of a xml or JSON

Moving webroot outside of the app folder..

2009-10-04 Thread number9
I submitted a thread about this a week ago, but have been unwell so I thought I would start a new thread with updated information. I have setup my files like the following: /etc/cake - cake folder /etc/app - app folder /site/webroot - webroot folder It appears to be working OK (I've just modifi

Re: Session / Security

2009-10-04 Thread mark_story
You also should read up on Session Fixation, Session hijacking, and http://en.wikipedia.org/wiki/Session_fixation http://en.wikipedia.org/wiki/Session_hijacking Which kind of reference each other but you get the idea. -Mark On Oct 3, 5:39 pm, Bert Van den Brande wrote: > You might want to rea

RE: showEmpty?

2009-10-04 Thread Dave Maharaj :: WidePixels.com
Thanks, Will give it a try. Dave -Original Message- From: brian [mailto:bally.z...@gmail.com] Sent: October-04-09 1:29 PM To: cake-php@googlegroups.com Subject: Re: showEmpty? I believe it's 'empty => 'Select your State'. If the param is false, null, or the empty string, Cake output

Re: JS/CSS automatic concatenation and compression

2009-10-04 Thread mark_story
Concatenating all JS files into one file is not ideal or optimal. Say for example that you are using jQuery + all of jQuery UI + page specific Javascript. Since you are gluing all the files together, on each new page users will need to redownload all of the library code in addition to the page s

Re: showEmpty?

2009-10-04 Thread brian
I believe it's 'empty => 'Select your State'. If the param is false, null, or the empty string, Cake outputs an empty option. On Sun, Oct 4, 2009 at 8:13 AM, Dave Maharaj :: WidePixels.com wrote: > > I had a same / similar question for input selects which is related to this. > > I have my echo $

Re: Excluding a node from a tree, and adding a parent node

2009-10-04 Thread brian
On Sat, Oct 3, 2009 at 10:44 PM, Rawna wrote: > > Hi, I'm using Cake's Tree bhavior and I got a couple of questions: > > 1. How do I exclude a node when generating a a tree list? (i.e. using > generatetreelist()) ? I'm going to use it when editing a category. > > 2. When adding a new category, it

Re: showEmpty?

2009-10-04 Thread John Andersen
Use array_unshift( $states, $selected) to insert an element at the beginning of the $states array. Enjoy, John On Oct 4, 3:13 pm, "Dave Maharaj :: WidePixels.com" wrote: > I had a same / similar question for input selects which is related to this. > > I have my echo $form->input('State'); whi

Re: cakephp don't execute model trigger plugin's

2009-10-04 Thread AgBorkowski
for eg. layout = 'admin'; if (! $id && empty ( $this->data )) { $this->Session->setFlash ( __ ( 'Invalid LikecontentSection', true ) ); $this->redirect ( array ('action' => 'index' ) ); } if (!empty (

Re: XAMPP & CakePHP > Running in a sub-directory

2009-10-04 Thread IamJim
Again, I thank-you for the reply(very much) As for when you say>> [quote] Cake works "out of the box" on any domain/subdir/subsubdir without problems if you use cake helpers to output anything about paths. [/quote] Without a single mod to any files? Or any type of extra coding need

RE: showEmpty?

2009-10-04 Thread Dave Maharaj :: WidePixels.com
I had a same / similar question for input selects which is related to this. I have my echo $form->input('State'); which is populated by a find list...so I have all my States. How can I add so first option to be "Select your State" with no value? Right now Alabama shows up first and if a user does

Re: JS/CSS automatic concatenation and compression

2009-10-04 Thread j0n4s.h4rtm...@googlemail.com
Hello, my design idea would be like sql transaction control. This is how you "hack" helpers for additional features: http://cakebaker.42dh.com/2008/11/07/an-idea-for-hacking-core-helpers/ Now the result would look something like this: Before: css('cake.generic')?> css('app.gener

SSL Proxy breaks relative URLs

2009-10-04 Thread joux
Hi, this seems a bit lengthy for IRC, so I thought I'd join the Group.. I'm using an SSL proxy service as my webhoster doesn't offer real https access for any domain. It works like this: You prepend the proxy url to your domain: https://sslproxy.com/mydomain.com/myapp/controller/action But now,

Re: showEmpty?

2009-10-04 Thread Miles J
You should only be using input(). echo $form->input('State', array('options' => array('NJ' => New Jersey', 'NY' => 'New York'), 'empty' => false)); On Oct 3, 7:33 pm, Gonzalo Servat wrote: > On Sun, Oct 4, 2009 at 7:21 AM, > gimperdan...@gmail.com wrote: > > [..snip..] > > > This is what I hav

Re: Advanced set up install

2009-10-04 Thread Miles J
Personally I would put the cake folder in the root: /public_html/cake/ /public_html/domain4/app/ Or even better put it below public_html so it cant be accessed. Once you do that, you would just need to alter the webroot/index.php. On Oct 3, 6:42 pm, "Dave Maharaj :: WidePixels.com" wrote: > I

Re: JS/CSS automatic concatenation and compression

2009-10-04 Thread robust solution
Dear Miles, your post in your blog is he best as a starting point. But, really I prefer to follow the firebug advices where they prefer to minimize the number of style sheets and the number of javascript files, and they also prefer to make gzipped whenever possible (currently most of the browsers