Ops sorry guys... i searched the web and I find myself the answer...
just put in my category model the line
var $displayField = "title";
and so it displays the title in the add view.
mig_akira wrote:
>
> Using associated models (categories hasMany members) I wrote in my
> membersControll
Using associated models (categories hasMany members) I wrote in my
membersController I wrote:
$this->set('categories $this->Member->Category->find('list'));
and in the add view, i just wrote:
echo $form->input('category_id');
Works beautifully, except that it only shows numbers (the ID of
It was a lot easier than I thought!
Cakephp does all that for me.
In my membersController I wrote
$this->set('categories $this->Member->Category->find('list'));
and in the add view, i just wrote:
echo $form->input('category_id');
Works like a charm =)
mig_akira wrote:
>
> Hello everyo
When I have seen others with similar session expiry issues when
serving media files, they've solved the problem with setting security
to low. Although it's not necessarily a proper solution, perhaps it
might lead to a better solution. Have you been able to track down the
reason why there are mul
thanx for the reply brian.. as u have seen in my offered_subjects, i
have a "section" field on it, means that a subject can have many
sections. thats why i cant simply place an "offered_flag" field in
subjects table..actually we already had a running enrollment web app
but is also not written usin
Well there you go, it aint containing cause your MySQL fails. Try
fixing that first.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To u
Okay - see below. No returned array because of the MySQL errors.
Thanks for your time.
$this->paginate['CourseResult'] = array(
'contain' => array(
'Course' => array(
'CourseLanguage',
What does the returned array look like, and may I also see the SQL?
Additionally, please check that the rows exist that should be linked
to it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post
How can i set alternate paths for the model/controller/views folders
so i can have them read from 1 app?
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cak
Yes.
I also have actsAs containable in my app_model, so all models should
load the behaviour.
On Sep 4, 12:58 am, Miles J wrote:
> Are the associations for Model3/4 set within Model2 and vice versa?
--~--~-~--~~~---~--~~
You received this message because you are
Are the associations for Model3/4 set within Model2 and vice versa?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from t
On Thu Aug 20 2009 15:24:53 GMT-0400 (EST) , majna
wrote:
> MainsController::view()
>
> $log = ClassRegistry::init('Log'); $log->create();
> $this->data['Log']['main_id'] = 23; $this->data['Log']['referrer'] =
> ... $log->save($this->data['Log']);
>
> But if you define in Main model hasMany Lo
Yep, your version looks like it's the same as mine, but mine doesn't
work.
Anything missing?
I've followed the manual, but it doesn't provide an example for deep
associations with paginate unfortunately.
On Sep 3, 11:20 pm, Alexandru Ciobanu wrote:
> On 9/3/2009 9:04 PM, martinp wrote:
>
> > He
That was exactly what I was looking for!
Thanks a lot!
delocalizer wrote:
>
>
> Hi;
> as long as you're happy to allow 'moveUp' in same group as one of
> c,r,u,d, you can use Auth->mapActions to do what you want:
> http://book.cakephp.org/view/813/mapActions
> Otherwise you will have to use
Hello everyone.
I have a simple question.
I have a controller ('membersController') that must use 2 models ('member'
and 'category'). A category hasMany members.
When adding a member, I must choose the category it belongs to in my Add
view. To paginate data from the Member model is simple,
Sorry for the dumb question but I am trying to get a list of Users that have
more than 5 posts. I want to query thru all posts where the any Post.user_id
appears 5 times or more
How do I add that in as a condition?
function __getTestCounts()
{
$params = array(
'fields' => arra
I have a search feature which I grab all the id's to pass to paginate which
looks like
app/controllers/posts_controller.php (line 259)
Array
(
[0] => 139ea7
[1] => 2a4370
[2] => 3fb952
[3] => 66bfb4
[4] => 8197d5
[5] => 87c28a
[6] => 97fd0f
[7] => a78629
[8]
On 9/3/2009 9:04 PM, martinp wrote:
> Hello
>
> Is this possible?
>
> $this->paginate['Model1'] = array(
> 'contain' => array(
> 'Model2' => array(
> 'Model3',
>
My 2nd paragraph (after I re-read it) seemed a bit terse. :)
On Sep 3, 10:32 am, brian wrote:
> (why do you feel like a jerk?)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group,
Hello,
Is there a way to produce _checked_ multiple checkboxes using form
helper with unique id for each. Currently I'm using this code in my
view template:
$form->input('EmployeeMailboxEmail.7.employee_mailbox_id.', array
('type'=>'select', 'multiple'=>'checkbox', 'label'=>false,
'options'=>arr
Hi Mark,
thanks for taking the time to write back. However I am not entirely
sure what you mean. I tried to pass an integer to AppModel's
constructor which is called in TriadAPI's constructor but I am still
getting the same error which is:
Fatal error: Class 'TriadApi' not found in C:\vhosts\loca
You forgot all the parameters to the model constructor.
http://api.cakephp.org/class/model#method-Model__construct
-Mark
On Sep 3, 11:00 am, RhythmicDevil wrote:
> Hi,
> I have an app. It has to get data from two different sources, a mysql
> db and an XML API
>
> For the API model I want to be
Hello
Is this possible?
$this->paginate['Model1'] = array(
'contain' => array(
'Model2' => array(
'Model3',
'Model4'
Hello,
I have been working on a CakePHP webapp with great success, and would
like to create a script that will either be run manually from the
command line or ran via crontab nightly to populate a table with data
that is dynamically obtained through other functions within the
script.
Is there a
I'm getting a syntax error on cake/libs/overloadable_php4.php when I
run my project through the PHP syntax checker:
$ php -l overloadable_php4.php
Fatal error: Method Overloadable::__call() must take exactly 2
arguments in overloadable_php4.php on line 79
Errors parsing overloadable_php4.php
An
And you are sure you are doing that using php4 and not 5?
AFAIK __call is defined in the language in php4. Only in php5 did they
add that. This is why cake has these two files. Compare them
(overloadable_php4 and overloadable_php5) and you will see that the
php5 version contains very little while
Just noticed that I forgot the mention that this appears to be a Snow
Leopard problem.
Mac OS X 10.6, the new sand-boxed plugins in Safari and the rewritten
Quicktime.
On Sep 3, 6:18 pm, Martin Westin wrote:
> Hi,
> I was wondering if anyone had a good way they use to serve video that
> works f
Alright, I searched the groups was wondering if I could get a little help with
this.
Here is the associations.
Record HABTM Product
Product HABTM Status
I know the format for saving HABTM data is [Model][HABTM][HABTM] that is for
Record to Product the format would be:
$this->data
{
['Record
I'm not sure. But, if it's just a question of the default header, that
can be anything you want (or not there at all). It's just Cake's
default layout for scaffolding.
On Thu, Sep 3, 2009 at 11:49 AM, McScreech wrote:
>
> Thank you Brian,
>
> Is there any existing mechanism to do such a substitut
yeah, I think I'll do just that.
Cheers
On Sep 3, 3:26 pm, Rick wrote:
> Can you try it with 3 tables, pages, links_to and links_from? That
> may simplify things a bit.
>
> Rick
>
> On Sep 1, 5:13 am, Larking wrote:
>
> > Hi,
>
> > I am not quite sure how to search for how to tackle this prob
i see
i guess the php file storage is way faster than the DB one
especially if your session has already a lot of information stored
but if i can't come up with a better solution i will try the DB
sessions
On 3 Sep., 15:47, Martin Westin wrote:
> Just a few suggestions. These are not definiti
If you hardcoded the column names, then yes you would have to change
them manually.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To un
Because your doing it wrong. Should be done like so:
English version:
en/errors.po
msgid "fileExtRestricted"
msgstr "The submitted file extension is not permitted, only %s
permitted."
Foreign versions:
sp/errors.po
msgid "fileExtRestricted"
msgstr "L'estensione del file caricato non è permessa
Hi,
I was wondering if anyone had a good way they use to serve video that
works for Quicktime inside Safari on a Mac?
Sound simple, right? Just use Media view.
Problem is that after much checking Charles (debug proxy) clued me in
on the fact that when you serve the file, the browser first loads i
On 3 Sep., 18:00, "marco.rizze...@gmail.com"
wrote:
> Hi
> I try to use the localization of Cake.
> I have se in my errors.po:
>
> msgid "The submitted file extension is not permitted, only %s
> permitted."
> msgstr "L'estensione del file caricato non è permessa, solo %s sono
> permesse."
>
> But
Hi
I try to use the localization of Cake.
I have se in my errors.po:
msgid "The submitted file extension is not permitted, only %s
permitted."
msgstr "L'estensione del file caricato non è permessa, solo %s sono
permesse."
But in my code when I have this __d('errors',''The submitted file
extensio
Can i pass parameters to a script I execute via Cake Console?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this gr
Can i pass parameters to a script I execute via Cake Console?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this gr
Thank you Brian,
Is there any existing mechanism to do such a substitution for labeling
automatically, i.e., change 'pops' (the table name) to 'populations'
automatically for presentation. Something along the lines of the
$displayField variable in the model?
On Sep 3, 11:02 am, brian wrote:
> O
... and added a fixture for the HABTM relationship between messages
and tags:
array('type'=>'integer', 'null' => false,
'length'
=> 10),
'tag_id' => array('type'=>'integer', 'null' => false, 'length'
=>
10)
);
var $records = array(array(
'message
Solved in a way. I added all fixtures to the Model Test Cases like
this:
var $fixtures = array('app.message', 'app.tag', 'app.user');
Marco
On 3 Sep., 14:55, Marco wrote:
> Hi guys,
>
> I set up a really basic cake 1.2.4 project to verify a behaviour I
> observed.
>
> This is my datab
That's not really a validation thing, though. You might be checking
for a valid address, etc. but adding this other data doesn't fit with
validation. You could put that functionality in beforeSave(). Or write
a behavior to do it. Better yet, you could create a component that
modifies the controlle
Ha, scratch that - tried again and it worked! Must be my useless
sausage fingers.
On Sep 3, 4:18 pm, toby1kenobi wrote:
> Hi there,
>
> I feel like I'm missing something obvious...
>
> I'm using
>
> $form->input('field_name', array('type' => 'select', 'multiple' =>
> true));
>
> to output
Hi there,
I feel like I'm missing something obvious...
I'm using
$form->input('field_name', array('type' => 'select', 'multiple' =>
true));
to output HTML selects with 'multiple' attributes, and that's all
great. I can't figure out how to specify which options are selected
though? The mo
Maybe $paginator->url()? I think that's what you want.
http://api.cakephp.org/class/paginator-helper#method-PaginatorHelperurl
On Thu, Sep 3, 2009 at 8:57 AM, Cosmin Paul wrote:
>
> I have buttons that are a little complicated, like this :
>
> foreach( arr with buttons ){
>
>
>
On Thu, Sep 3, 2009 at 10:51 AM, McScreech wrote:
>
> Hello,
>
> What does the double underscore represent in the following code from
> the head of the index.ctp file for the users view?
>
>
__() is a function in basics.php that is used to translate strings
using the I18n class. If there'
Hi,
I have an app. It has to get data from two different sources, a mysql
db and an XML API
For the API model I want to be able to do the following:
TriadAPI - extends AppModel contains generic query and connection info
Subscriber - extends TriadAPI and contains subscriber specific queries
I am
Hello,
What does the double underscore represent in the following code from
the head of the index.ctp file for the users view?
I can see the results in the rendered page, but the reason I ask is
that I would like to change this output without mucking up something
else unintentionally.
Can you try it with 3 tables, pages, links_to and links_from? That
may simplify things a bit.
Rick
On Sep 1, 5:13 am, Larking wrote:
> Hi,
>
> I am not quite sure how to search for how to tackle this problem so
> aplogies - perhaps someone could send me in the direction of a
> relevant post?
Cool, thanks for posting that.
(why do you feel like a jerk?)
On Thu, Sep 3, 2009 at 9:52 AM, Brendon Kozlowski
(Realm) wrote:
>
> Hmm, well now I feel like a jerk. Aanyways, for a helpful CakePHP
> CLI tool to run through all of your files for whitespace issues, you
> might want to take a
Please post your successful results.
Rick
On Sep 2, 6:04 pm, "Brendon Kozlowski (Realm)"
wrote:
> Random thought - I'll be trying this tomorrow or sometime next week,
> but... Would the autoload file be able to be called as a vendor
> include as well? So long as I call it first, I'm wonderin
I think the proper port for Gmail is 995.
Rick
On Sep 2, 8:53 pm, bunwich wrote:
> Hi,
>
> I changed the port to 465 and tried 'smtp.gmail.com' for the host.
>
> Also used the host 'ssl://smtp.gmail.com'
>
> The email works fine with sendmail.
>
> Anyone know if tsl/ssl is supported?
--~--~--
Hmm, well now I feel like a jerk. Aanyways, for a helpful CakePHP
CLI tool to run through all of your files for whitespace issues, you
might want to take a look at this little snippet (gem) of code that
David Persson has shared with us all. It iterates over the entire
cake app directory stru
Hi,
I would just like to know if it's possible to make this kind of
mapping.
Example : if I change the name of a column in my database. Must do I
change also ALL the name of this column in all my php code ?...
I know that in the model's file we can make a mapping with "usetable"
for the real ta
Just a few suggestions. These are not definitive answers.
Some PHP installations have a session garbage collection that is a bit
hyperactive. If you were to chage to cake session storage that would
eliminate that source.
I have noticed that when outputting some files to the browser (small
video)
This is the official textmate bundle: http://thechaw.com/cakephp_tmbundle
(the one you link to is a fork of the official one on github).
The one currently in the textmate subversion repository was
unofficial, and was for a much earlier version of CakePHP.
-jperras.
On Sep 3, 12:39 am, mikeotting
Hi guys,
I set up a really basic cake 1.2.4 project to verify a behaviour I
observed.
This is my database layout:
CREATE TABLE `messages` (
`id` int(10) unsigned NOT NULL auto_increment,
`text` text NOT NULL,
`user_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAU
Hi,
I am having problem with making up some unit testing / integration
testing of my cakephp ajax websites.
Is there any guideline that i can follow ?
Regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePH
I'm struggling with translate too but I'll try to help.
Every line in the i18n table it should have the model, the locale, the
foreign key to the model item id and the translated content.
If you want to translate only one field per item only one row should
be added to the i18n table so what I se
I have buttons that are a little complicated, like this :
foreach( arr with buttons ){
}
echo $javascript->event("mortgage_filter_p_{$name}", 'click',
'simulateRadio(' {$URL WITH PAGINATION SORTING} ')');
http://groups.google.com/group/cake-php?hl=en
-~
Has anyone had the same experience?
If I set Configure::write('Session.timeout', 'X'); down to
1 (with level low), i will be locked out after 10 seconds (which
works!)
But if i want the session to be alive > 20 hours and set it to 300
(level medium) the page throws me out after not more than 1 h
the tree structure can be build with html first (tree helper function)
so that the markup is available in both cases
js should only make the non-active branches invisible until clicked or
whatever
this way there is a working (although not very beautiful) fallback for
non-js browsers
On 3 Sep.,
HI,
I'm using the ACL behaviour, but I can't get the group/user inherit
mechanism to work.
I have one group, the USERS group and it has enabled the action
'fooaction'. The user 'PIPPO' is a member of the USERS group, but I
did not set any permission, because I want the ACL to take into
account t
Not 100% sure it works when you go directly to html->select but I know
it works for input.
There is the manual way:
$form->input('Modelname.fieldname', array(
'type'=>'select',
'options'=>$list,
'value'=>$your_selected_value
));
But the magic of Cake can do for you is w
Hi;
as long as you're happy to allow 'moveUp' in same group as one of
c,r,u,d, you can use Auth->mapActions to do what you want:
http://book.cakephp.org/view/813/mapActions
Otherwise you will have to use Auth->authorize='actions' and recreate
your acos and aros_acos.
On Sep 3, 1:02 pm, mig_akira
The url is what tells cake what to do. If you "hide" the id you remove
the id and Cake will have not idea what id you want. The url must
contain some kind of unique identifier...but not specifically the
numeric id from the database.
You need to alter your action so it can use the make and model n
You need to manage your character encoding a bit more than that, I
think.
You have a lot of variables that all should be in sync with each-other
for the best results.
-Your editor (Textmate, Eclipse, Notepad...)
-Your documents (created before now) should be checked and converted.
-Your CakePHP a
Hi, I have content that's written in German on my Cake and the same
content on a static HTML website. On the static, the unique German
characters displays fine. However on Cake, whenever a German
character is used, it displays as a little block/missing character. I
tried setting the encoding to
I have a hyperlink defined as:
echo $html->link(__('Discuss', true), array('controller' => 'cars',
'action'=>'view', $car['Car']['id'], $car['Car']['make'],
$car['Car']['model']));
How can I define a route that changes the url from
'/cars/view/14/nissan/maxima' to '/cars/nissan/maxima'??
I did
Hello ! ! !
I need your help please :)
I try to load a list into a select option control by doing to
[ Controller ]
function edit()
{
$this->set('list',$this->Modelname->getlist
(null,'id',null,'{n}.id','{n}.name');
}
[ View ]
$form->select('Modelname.fieldname',$list);
now how can I ad
Thank you for responding.
You're right. Very simple solution :)
I thought, because it's a hasOne relationship cake gets this id
automagically...
On 3 Sep., 11:19, WebbedIT wrote:
> If you want both models to update then you need the primary id of each
> model in the form, if you pass no id f
I have a problem that i have to show a tree structure of an
application ,if i make use of j-query it seems to be possible. But i
can't use that , because if in the browser the end user disables the
javascript, the display will not work.Can anyone help me how can this
problem be solved using CakePH
Sorry to go on about this, but what is your reason to not use the
conventions when naming the fields? Simply changing
echo $form->input("Blogurl.url.$i", array('label' => 'URL'));
to
echo $form->input("Blogurl.".$i.".url", array('label' => 'URL'));
Would allow you to use saveAll() and aut
Thanks.
On Wed, Sep 2, 2009 at 10:53 PM, wrote:
> Configure::write('debug',2);
>
> Schreck
>
>
> From: Michael Gaiser
> Date: Wed, 2 Sep 2009 22:08:42 +0200
> To:
> Subject: Debugging SQL's
> How do I view the sql generated by my controller's add() function? I n
Cool. Thanks.
On Thu, Sep 3, 2009 at 4:17 AM, Miles J wrote:
>
> A few things your doing wrong and should change immediately.
>
> Do not call error(), text() (or the other variants, select(), radio
> ()).
>
> The following code:
>
> label('Devotion.name', 'Name of Devotion'); ?
>>
>
If you want both models to update then you need the primary id of each
model in the form, if you pass no id for the model it logically
assumes it's an INSERT
echo $form->create('Address');
echo $form->input('Address.id');
echo $form->input('Address.title');
echo $form-
Interesting, I'll have to check myself then if javascript in $html-
>link works in the latest cake version too.
I'm using revision 7296. I know it is quite an old one. I could not
find (or didn't know where to look for) info about this issue for the
revision I use.
On Sep 3, 4:46 am, "Dr. Lob
DELOCALIZER YOU ARE THE GOD!!
IT WORKS, IT FU**ING WORKS!!
THANK YOU SO MUCH!!
On 2 Set, 05:23, delocalizer wrote:
> You can specify 'id' directly in input method like this:
> $form->input('User.SecurityAccess.'.$aco_id, array(
> 'id'=>"UserSecurityAccess$aco_id",
> )
> );
> But t
I'd say that what is best depends on how many preferences you
anticipate in your application.
One field per preference in the user's table works fine for a very few
but can start looking messy after a while.
I have seen e-commerce applications with 50+ fields in the products
table (is_hardware,
The only difference would be that I have mine in my user Library and
not the computer's Library.
My permissions look the same (files owned by me and has the groups
"staff").
Well, you got the other one working so all is well I guess.
/Martin
On Sep 3, 6:39 am, mikeottinger wrote:
> Hi All,
>
>
80 matches
Mail list logo