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.
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
--~--~--
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
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(
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
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,
/**
* 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
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
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
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::
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
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
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
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 -
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
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
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.
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
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
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
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
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
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
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
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 $
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
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
for eg.
layout = 'admin';
if (! $id && empty ( $this->data )) {
$this->Session->setFlash ( __ ( 'Invalid
LikecontentSection',
true ) );
$this->redirect ( array ('action' => 'index' ) );
}
if (!empty (
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
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
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
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,
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
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
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
35 matches
Mail list logo