Wednesday, September 30, 2009

AD7six's MiMedia plugin

Hi,

I'm trying to use AD7six's MiMedia plugin that I found here:
http://www.assembla.com/wiki/show/mi for uploading images.

Does anyone know how to use it or where I can find documentation?

Thanks,

Claire

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

RE: Help with an array() - SOLVED

Sorry to post...i figured it out.

Dave

-----Original Message-----
From: Dave Maharaj :: WidePixels.com [mailto:dave@widepixels.com]
Sent: September-30-09 3:23 PM
To: cake-php@googlegroups.com
Subject: Help with an array()


I have a merged array which produces

$new = array_merge($newSelections[$model_table],$additional_options);

Array
(
[0] => Array
(
[id] => 9
[name] => Confident
[UsersOption] => Array
(
[id] => 222
[user_id] => 4a5d323f-b9e8-416d-b34c-11cf4adcd75b
[option_id] => 9
)

)

[0] thru [9] same as above structure........

[10] => ghjghjghj
[11] => tet
)

How can I make it so

[10] => Array
(
[name] => ghjghjghj
)

So I can loop thru all the results in a foreach ['name'] Thanks

Dave


--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Paginate fat models

That's what I thought.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Help with an array()

I have a merged array which produces

$new = array_merge($newSelections[$model_table],$additional_options);

Array
(
[0] => Array
(
[id] => 9
[name] => Confident
[UsersOption] => Array
(
[id] => 222
[user_id] => 4a5d323f-b9e8-416d-b34c-11cf4adcd75b
[option_id] => 9
)

)

[0] thru [9] same as above structure........

[10] => ghjghjghj
[11] => tet
)

How can I make it so

[10] => Array
(
[name] => ghjghjghj
)

So I can loop thru all the results in a foreach ['name']
Thanks

Dave


--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: sample examples not working

Make sure the files you download are supported by the version of Cake
you are using.

On Sep 30, 1:46 am, boobalan <boobal...@gmail.com> wrote:
> Hi All,
>      i've downloaded usermgmt SNO.- 24 sample project but its not
> working properly linkhttp://cakeforge.org/top/mostactive.php
>
> some of them i downloaded and installed there is no use.
> anybody give some solutions
> Note: please upload sample projects with some docs.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: A Query from CakePHP Beginner

Long? I read the whole cookbook in like 5 hours -_-

Your best bet is to start alongside the cookbook. Say you start
reading about controllers, open up and create a controller and test it
out. Then gradually move piece by piece.

On Sep 30, 8:55 am, Kamran Hameed <camran.ham...@gmail.com> wrote:
> thanks any ways for your reply
>
> On Wed, Sep 30, 2009 at 8:55 AM, Kamran Hameed <camran.ham...@gmail.com>wrote:
>
>
>
> > i think its quite obvious..
>
> > On Wed, Sep 30, 2009 at 8:52 AM, Marcelo Andrade <mfandr...@gmail.com>wrote:
>
> >> On Wed, Sep 30, 2009 at 8:58 AM, Kamran Hameed <camran.ham...@gmail.com>
> >> wrote:
>
> >> > Folks, i am new to CakePHP. I know about PHP and want to learn Cake
> >> > now.
>
> >> > I first started with the standard manual. However, i feel that there
> >> > is 'too much' to digest in it. I mean can i get some resource,
> >> > tutorial or book which covers each topic systematically .. i mean i am
> >> > not saying that the manual is not systematic.. What i am saying is
> >> > that it is too damn long and by the time i cover every topic till 4th
> >> > chap, i have mostly forgotten most of the previous stuff. Is there any
> >> > book that covers one topic followed by a hands on example or some kind
> >> > of tutorial...
>
> >> The blog tutorial it's entirely hands on.
> >> The very best place to getting started.
>
> >>http://book.cakephp.org/view/219/Blog
>
> >> > please dont misunderstand me.. i want to code and learn rather learn
> >> > and code...
>
> >> Huh... What's the difference?
>
> >> Best regards.
>
> >> --
> >> MARCELO DE F. ANDRADE
> >> Belem, PA, Amazonia, Brazil
> >> Linux User #221105
>
> > --
> > Kamran Hameed
>
> > hpc.niit.edu.pk/~kamran <http://hpc.niit.edu.pk/%7Ekamran>
>
> --
> Kamran Hameed
>
> hpc.niit.edu.pk/~kamran
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Search-Engine: Extend results with random records if there are no 'real' results

you are right, it doesn't make "sense", but we've to do it that it
looks better. it's a search-engine for a specific sector so every
result will statisfy the user (a little bit).
therefore i wanted to do it like that.
does anyone know how? (with pagination)
thank you!

On 27 Sep., 18:45, brian <bally.z...@gmail.com> wrote:
> On Sun, Sep 27, 2009 at 7:52 AM, braaan <martin.platt...@gmail.com> wrote:
>
> > On 25 Sep., 20:28, brian <bally.z...@gmail.com> wrote:
> >> On Fri, Sep 25, 2009 at 8:47 AM, braaan <martin.platt...@gmail.com> wrote:
>
> >> > i can't use ORDER BY RAND() on every page because
> >> > then the user would get different results on every refresh.
>
> >> Well, it wouldn't be very random, otherwise, would it?
>
> > you are right, i meant not a new ORDER BY RAND() query on every result-
> > page. example: results on page 1 will change when i change the page to
> > 2 and then back to 1 again. that's not what i want.
>
> >> > i thought about doing the data-fetching myself (andextendif there
> >> > are to less results) and give it to the pagination manually, is this
> >> > possible?
>
> >> What do you mean by "doing the data-fetching myself " and "manually"?
>
> > what i want to do:
> > 1) search for the users string myself
> > 2) if result-count < X, then add some random results.
> > 3) use this resultset (real results + applicable random results) and
> > do pagination with exactly this result-set. (not doing a RAND()-query
> > on every page-change.)
>
> > do you know what i mean?
>
> Yes, that makes sense. I suppose you could save the query in the session.
>
> But, why do you want to show random results in the first place? Is
> this just for testing? If so, it would be simpler to use dummy data
> for now. It doesn't seem tome that showing random results in
> production would be useful. If a search query comes up empty, it's
> empty.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: javascript link in default.ctp

ok, i'm going to try.
thanks a lot!

On Sep 30, 5:46 pm, brian <bally.z...@gmail.com> wrote:
> On Wed, Sep 30, 2009 at 11:01 AM, lorenx <lor...@gmail.com> wrote:
>
> > do i have to create it or to copy cake/libs/controller/
> > app_controller.php so that cakephp will read mine from now on?
>
> Yeah, copy the one in cake/libs/controller to your app dir (not
> app/controllers/). Then edit that with whatever code you want all
> controllers to inherit. Same goes for AppModel, AppHelper.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Javascript libraries with images/css inside Cake Plugins

How are you linking the css files? You should only need to preface the
file name with 'plugin_name/css/', eg.
$html->css('/plugin_name/css/css_filename');

On Tue, Sep 29, 2009 at 6:32 PM, Elte Hupkes <ellutu@gmail.com> wrote:
>
> I'm trying to develop a small backend cms-plugin, which contains some
> Javascript libraries like jQuery, jQuery-ui and TinyMCE. Doing this I
> stumbled upon a problem I cannot seem to solve in a good way.
> jQuery-ui and TinyMCE come bundled with themes, consisting of images
> and css files. CakePHP doesn't seem to serve any other file than *.js
> from the vendors/js folder inside my plugin though (as opposed to
> everything in the /webroot/ folder), forcing me to create additional
> folders for images and css in both the /img/ and /css/ folders. For
> jquery-ui this is inconvenient, for TinyMCE it's a giant pain, and for
> libraries like SwfUploader (or Uploadify in my case), this is simply
> impossible because the swf-files don't get served from any of the
> three (img, css, js) folders inside myplugin/webroot/.
>
> So how do I bundle these libraries with my plugin without breaking
> them? Is it even possible?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Problem with saving id's

Oracle uses triggers to implement "auto increment" functionality. Cake
deals with that but I think it expects the sequence name to be
"pk_$table_name". Is that what you have?

Hmm ... looking at the source, it appears that you can set the
sequence name in the model: $model->sequence.

On Wed, Sep 30, 2009 at 5:35 AM, Xanax <mammeri69@gmail.com> wrote:
>
> Hi everyone,
>
> I've got a little problem with my cake app'.
>
> My database is Oracle. Every data saving handled by cake engine works
> fine.
> The problem is with a 'manual' saving :
>
> $this->User->Planification->create($data_planification);
>
>                                $data_planification["Planification"]["user_id"] = $_POST
> ['user_id'];
>                                $data_planification["Planification"]["projet_id"] = $_POST
> ['projet_id'];
>
>
>                                $this->User->Planification->save($data_planification);
>
> This code doesn't work with my Oracle database while it used to work
> with MySQL database.
> When i add this line at the begining :
>                                $data_planification["Planification"]["id"] = 5678;
> It works, so i guess i've got a problem with my id. I thought that
> cake generate automatically id's and then save them in the database.
> I've created sequences, maybe i must retrieve the current sequence ?
> Or is there a thing that i've missed ?
>
> Thanks for any help.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: A Query from CakePHP Beginner

thanks any ways for your reply

On Wed, Sep 30, 2009 at 8:55 AM, Kamran Hameed <camran.hameed@gmail.com> wrote:
i think its quite obvious..



On Wed, Sep 30, 2009 at 8:52 AM, Marcelo Andrade <mfandrade@gmail.com> wrote:

On Wed, Sep 30, 2009 at 8:58 AM, Kamran Hameed <camran.hameed@gmail.com> wrote:
>
> Folks, i am new to CakePHP. I know about PHP and want to learn Cake
> now.
>
> I first started with the standard manual. However, i feel that there
> is 'too much' to digest in it. I mean can i get some resource,
> tutorial or book which covers each topic systematically .. i mean i am
> not saying that the manual is not systematic.. What i am saying is
> that it is too damn long and by the time i cover every topic till 4th
> chap, i have mostly forgotten most of the previous stuff. Is there any
> book that covers one topic followed by a hands on example or some kind
> of tutorial...

The blog tutorial it's entirely hands on.
The very best place to getting started.

http://book.cakephp.org/view/219/Blog

> please dont misunderstand me.. i want to code and learn rather learn
> and code...

Huh... What's the difference?

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105





--
Kamran Hameed

hpc.niit.edu.pk/~kamran




--
Kamran Hameed

hpc.niit.edu.pk/~kamran


--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: A Query from CakePHP Beginner

i think its quite obvious..



On Wed, Sep 30, 2009 at 8:52 AM, Marcelo Andrade <mfandrade@gmail.com> wrote:

On Wed, Sep 30, 2009 at 8:58 AM, Kamran Hameed <camran.hameed@gmail.com> wrote:
>
> Folks, i am new to CakePHP. I know about PHP and want to learn Cake
> now.
>
> I first started with the standard manual. However, i feel that there
> is 'too much' to digest in it. I mean can i get some resource,
> tutorial or book which covers each topic systematically .. i mean i am
> not saying that the manual is not systematic.. What i am saying is
> that it is too damn long and by the time i cover every topic till 4th
> chap, i have mostly forgotten most of the previous stuff. Is there any
> book that covers one topic followed by a hands on example or some kind
> of tutorial...

The blog tutorial it's entirely hands on.
The very best place to getting started.

http://book.cakephp.org/view/219/Blog

> please dont misunderstand me.. i want to code and learn rather learn
> and code...

Huh... What's the difference?

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105





--
Kamran Hameed

hpc.niit.edu.pk/~kamran


--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: A Query from CakePHP Beginner

On Wed, Sep 30, 2009 at 8:58 AM, Kamran Hameed <camran.hameed@gmail.com> wrote:
>
> Folks, i am new to CakePHP. I know about PHP and want to learn Cake
> now.
>
> I first started with the standard manual. However, i feel that there
> is 'too much' to digest in it. I mean can i get some resource,
> tutorial or book which covers each topic systematically .. i mean i am
> not saying that the manual is not systematic.. What i am saying is
> that it is too damn long and by the time i cover every topic till 4th
> chap, i have mostly forgotten most of the previous stuff. Is there any
> book that covers one topic followed by a hands on example or some kind
> of tutorial...

The blog tutorial it's entirely hands on.
The very best place to getting started.

http://book.cakephp.org/view/219/Blog

> please dont misunderstand me.. i want to code and learn rather learn
> and code...

Huh... What's the difference?

Best regards.

--
MARCELO DE F. ANDRADE
Belem, PA, Amazonia, Brazil
Linux User #221105

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: javascript link in default.ctp

On Wed, Sep 30, 2009 at 11:01 AM, lorenx <lorenx@gmail.com> wrote:
>
> do i have to create it or to copy cake/libs/controller/
> app_controller.php so that cakephp will read mine from now on?

Yeah, copy the one in cake/libs/controller to your app dir (not
app/controllers/). Then edit that with whatever code you want all
controllers to inherit. Same goes for AppModel, AppHelper.

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Paginate fat models

Pagination is a control issue.

On Wed, Sep 30, 2009 at 5:12 AM, Braindead <markus.henke@gmail.com> wrote:
>
> I'm currently reworking one of my early Cake applications and I want
> to follow the "fat models - skinny controllers" principle. What I
> don't understand is how to paginate a fat model. Is it true, that I
> have to use pagination in the controller? Or is there another way?
>
> Thanks,
> Markus
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Method access problem

Did you give it the "private" keyword? What does the code look like?

On Wed, Sep 30, 2009 at 6:50 AM, swati <swatitomar1@gmail.com> wrote:
>
> Hi,
> I am getting the following error:
>
> Private Method in NominationsController
>
> Error: NominationsController::admin_add() cannot be accessed directly.
>
> Notice: If you want to customize this error message, create content/
> views/errors/private_action.ctp
>
> Can you tell me how can i use this "admin_add()" function?
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Model association validation

Hi, I'm sorry if this is a silly question, but I just wanted to check
this to make sure I get it right from the start.

I've just finished building the tables that I'm going to use for my
project and am about to use Bake to build the models. Some of the
Models have BelongTo associations, i.e. I've got a User model and a
Chapter model, with the Chapter model featuring a user_id property
used to associate it with the User model.

When baking that model, before I can set-up the associations it's
asking me to provide the validation criteria. The default for the
Chapter->id is 29 (no validation), but when it gets to Chapter-
>user_id, the default becomes 21 (numeric).

What I wanted to check to see is if these should be set to numeric, no
validation, something else, or maybe if it's not even important?

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: javascript link in default.ctp

do i have to create it or to copy cake/libs/controller/
app_controller.php so that cakephp will read mine from now on?


On Sep 30, 4:41 pm, m lundvall <mrlundv...@gmail.com> wrote:
> You have to create "app_controller.php" in app/
>
> Don't mess with cake/ directory unless you know what you are doing.
>
> // lundvall
>
> On 30 Sep, 13:16, lorenx <lor...@gmail.com> wrote:
>
> > mmm,
> > i have just these two:
>
> > cake/libs/controller/app_controller.php
> > cake/console/libs/templates/skel/app_controller.php
>
> > On Sep 30, 11:41 am, "Richard@Home" <richardath...@gmail.com> wrote:
>
> > > AppController doesn't go in the cake/ folder, it goes in your app
> > > folder:
>
> > > /app/app_controller.php
>
> > > class AppController extends Controller {
>
> > >     var $helpers = array("Html", "Form", "Javascript");
>
> > > }
>
> > > On Sep 30, 9:17 am, lorenx <lor...@gmail.com> wrote:
>
> > > > m, ok...
> > > > i raised the issue just because the cookbook says "not to edit files
> > > > in cake/ folder"...
>
> > > > thanks.
>
> > > > On Sep 30, 2:12 am, brian <bally.z...@gmail.com> wrote:
>
> > > > > On Tue, Sep 29, 2009 at 5:07 PM, lorenx <lor...@gmail.com> wrote:
>
> > > > > > sure but...
> > > > > > is there a way to do it in the app/ area?
>
> > > > > Do you mean in individual controllers? Yes, but you'd have to add it
> > > > > to all of them, so there's not much point. Besides, if you then ran
> > > > > into a "missing controller" error or similar, you'd run into a fatal
> > > > > error because of the$javascript call in the layout.
>
> > > > > Short answer: Save yourself some grief and load it into AppController.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Associating model aliases

Ok, I think I found another bit of the puzzle...

Problem was wrong: model aliases do retain the associations of
the original models, after all.

But (thank you John for pointing in that direction) the default value
of Model recursive property seems to be 1.

If I set it to 2

<?php
class Message extends AppModel {
...
var $recursive = 2;
...
}
?>

then I get also the Profile data for each Sender and Recipient.

But, and is another BIG but:
* I get as well a lot of unwanted data (that can be contained /
unbound)
* data are obtained with a recursion of queries, each Profile found
with one query...

So up to now the "ad hoc" join (thank you Brian) is to me the more
efficient solution, everything with the same query with 2 additional
LEFT JOINs.

I look forward to your comments.

Best,

Mario

On Sep 30, 2:17 am, brian <bally.z...@gmail.com> wrote:
> On Tue, Sep 29, 2009 at 5:21 PM, Mario <mario.calli...@gmail.com> wrote:
>
> > But to me the BIG question is:
> > isn't there a simpler and more elegant way in Cake to reach the same
> > result?
>
> > I feel there should be; because the kind of problem, if I understood
> > it correctly (that is: model alias does not retain the associations of
> > the original model), seems to me quite broad and frequent.
>
> > I wonder if, for example, if (in this specific case) declaring the
> > Sender and Receiver models, therefore having the model/sender.php and
> > model/receiver.php files, could be a possible solution to be explored.
>
> > I look forward to your comments.
>
> I actually think it is pretty elegant. But, if you're doing this a
> lot, I suppose it would just be tedious. It seems like something that
> a Behavior would do very well. There may already be such a thing at
> the Bakery.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: javascript link in default.ctp

You have to create "app_controller.php" in app/

Don't mess with cake/ directory unless you know what you are doing.

// lundvall

On 30 Sep, 13:16, lorenx <lor...@gmail.com> wrote:
> mmm,
> i have just these two:
>
> cake/libs/controller/app_controller.php
> cake/console/libs/templates/skel/app_controller.php
>
> On Sep 30, 11:41 am, "Richard@Home" <richardath...@gmail.com> wrote:
>
> > AppController doesn't go in the cake/ folder, it goes in your app
> > folder:
>
> > /app/app_controller.php
>
> > class AppController extends Controller {
>
> >     var $helpers = array("Html", "Form", "Javascript");
>
> > }
>
> > On Sep 30, 9:17 am, lorenx <lor...@gmail.com> wrote:
>
> > > m, ok...
> > > i raised the issue just because the cookbook says "not to edit files
> > > in cake/ folder"...
>
> > > thanks.
>
> > > On Sep 30, 2:12 am, brian <bally.z...@gmail.com> wrote:
>
> > > > On Tue, Sep 29, 2009 at 5:07 PM, lorenx <lor...@gmail.com> wrote:
>
> > > > > sure but...
> > > > > is there a way to do it in the app/ area?
>
> > > > Do you mean in individual controllers? Yes, but you'd have to add it
> > > > to all of them, so there's not much point. Besides, if you then ran
> > > > into a "missing controller" error or similar, you'd run into a fatal
> > > > error because of the$javascript call in the layout.
>
> > > > Short answer: Save yourself some grief and load it into AppController.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

ACL Tutorial Problem

We are going through the "Simple Acl controlled Application Tutorial"
in the manual.

Everything is going fine until we try and run the "Automated tool for
creating ACOs" in this section;

http://book.cakephp.org/view/647/An-Automated-tool-for-creating-ACOs

When we run this method we get the follwing Fatal Error;

Fatal error: Call to undefined method App::objects()

The line causing the error is;

$Controllers = App::Objects('controller');

I seem to remember doing this tutorial in an earlier version of cake
without problems

Anyone have any ideas whats going on? Is this a latest version bug?

Thanks

Rob
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Using Pretty URLs on Windows

I'm not sure if this is the answer you are looking for, but I highly
recommend Isapi Rewrite if you are using IIS on windows:
http://www.helicontech.com/isapi_rewrite/ Version 3
supports .htaccess on Windows nearly identical to Apache. Version 2
can work using the instructions here, see comments too:
http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite-on-iis.
I've found the free versions to be more work than purchasing the full
edition of version 3.

If this doesn't answer your question, search around for Isapi rewrite
modules.


On Sep 30, 7:32 am, Kamran Hameed <camran.ham...@gmail.com> wrote:
> Folks i am new to CakePHP. I am going through the manual which assumes
> that the user is on Linux Or Unix System. I want to ask one question
>
> http://book.cakephp.org/view/782/Lighttpd-and-mod_magnetLINK says
> that in order to use Pretty URLs in cakephp, place this lua script in /
> etc/lighttpd/cake.
>
> /// Script
>
> Where am i supposed to place it on windows... ??
>
> P:S: I have installed it under c:\wamp\www\cake...
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

earn money through Home based internet jobs

HI FRIENDS


If you want to earn Rs.200($5) to Rs.1200($30) per hour, starting
today from the Internet without
any Investment. Just give your 3 minutes to read on & see how it can
change your life.
Dear Internet Friend,
Nice to meet you. We have designed this website exclusively for the
people,
who want to earn money through Home based internet jobs without any
investment,
just by spending few hours on Internet, in a day.
Benefits and Advantages
1. Work part time.
2. Earn unlimited income from Internet, by just working 1-2 flexible
hours daily.
3. Work from anywhere - Home/Cyber Cafe/Office
4. No extra qualification required. Just basic Internet browsing
knowledge is enough.
5. Absolutely NO investment AND NO registration fee .
A.W.Surveys The New Survey ExperienceMake money from taking online
surveys with AWSurveys!
You get paid for each survey, the longer the survey the more you get
paid! AWSurveys is the New Survey ...
Clik this link and sign up there.

****************************************************

http://www.sumathsa.com

http://www.bigmoneyptc.com/index.php?ref=sathish ramya


****************************************************

click this and earn yourself friends trust me
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

earn money through Home based internet jobs

HI FRIENDS


If you want to earn Rs.200($5) to Rs.1200($30) per hour, starting
today from the Internet without
any Investment. Just give your 3 minutes to read on & see how it can
change your life.
Dear Internet Friend,
Nice to meet you. We have designed this website exclusively for the
people,
who want to earn money through Home based internet jobs without any
investment,
just by spending few hours on Internet, in a day.
Benefits and Advantages
1. Work part time.
2. Earn unlimited income from Internet, by just working 1-2 flexible
hours daily.
3. Work from anywhere - Home/Cyber Cafe/Office
4. No extra qualification required. Just basic Internet browsing
knowledge is enough.
5. Absolutely NO investment AND NO registration fee .
A.W.Surveys The New Survey ExperienceMake money from taking online
surveys with AWSurveys!
You get paid for each survey, the longer the survey the more you get
paid! AWSurveys is the New Survey ...
Clik this link and sign up there.

****************************************************

http://www.sumathsa.com

http://www.bigmoneyptc.com/index.php?ref=sathish ramya


****************************************************

click this and earn yourself friends trust me
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Conditions $quoteValues

Thanks VERY much for your reply, John.

$releases_ids was actually a string so all I had to do was replace
'array($release_ids)' with 'explode(",", $release_ids)'.

Again, thanks for the tip!
Cheers

On Sep 30, 1:38 pm, John Andersen <j.andersen...@gmail.com> wrote:
> Ok, if I remember correctly, then you just need to change:
>
>         'Release.id' => array($release_ids)
>
> into
>
>         'Release.id' => $release_ids
>
> as $release_id is already an array!
> Enjoy,
>    John
>
> On Sep 30, 3:14 pm, seanislegend <boredofm...@googlemail.com> wrote:
>
> > OK, that actually doesn't work by the looks of it :(
>
> > On Sep 30, 1:00 pm, seanislegend <boredofm...@googlemail.com> wrote:
>
> > > Nevermind, got it!
>
> > > All you need to do is simply put your conditions outside of the find
> > > array in $this->conditions.
>
> > > Ch33rz!
>
> > > On Sep 30, 12:56 pm, seanislegend <boredofm...@googlemail.com> wrote:
>
> > > > Hi,
>
> > > > I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
> > > > dbo-source/#line-1745), but I cannot get it working at all.
>
> > > > My finder query looks like this (trimmed down):
>
> > > > $this->find('all', array(
> > > >     'conditions' => array(
> > > >         'Release.id' => array($release_ids)
> > > >     )
> > > > ));
>
> > > > $release_ids is a string of ids, such as: '1,2,3,4,5'.
>
> > > > The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
> > > > and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"
>
> > > > Can anyone help, please?
> > > > Cheers!
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Conditions $quoteValues

Ok, if I remember correctly, then you just need to change:

'Release.id' => array($release_ids)

into

'Release.id' => $release_ids

as $release_id is already an array!
Enjoy,
John

On Sep 30, 3:14 pm, seanislegend <boredofm...@googlemail.com> wrote:
> OK, that actually doesn't work by the looks of it :(
>
> On Sep 30, 1:00 pm, seanislegend <boredofm...@googlemail.com> wrote:
>
> > Nevermind, got it!
>
> > All you need to do is simply put your conditions outside of the find
> > array in $this->conditions.
>
> > Ch33rz!
>
> > On Sep 30, 12:56 pm, seanislegend <boredofm...@googlemail.com> wrote:
>
> > > Hi,
>
> > > I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
> > > dbo-source/#line-1745), but I cannot get it working at all.
>
> > > My finder query looks like this (trimmed down):
>
> > > $this->find('all', array(
> > >     'conditions' => array(
> > >         'Release.id' => array($release_ids)
> > >     )
> > > ));
>
> > > $release_ids is a string of ids, such as: '1,2,3,4,5'.
>
> > > The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
> > > and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"
>
> > > Can anyone help, please?
> > > Cheers!
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Release: CakePHP 1.2.5

http://bakery.cakephp.org/articles/rss/news

On Sep 18, 3:33 pm, Henrik Gemal <henrikge...@gmail.com> wrote:
> Is there a way to get notified about new CakePHP releases? Like a
> CakePHP announe malinglist?
>
> On Sep 9, 5:54 pm, mark_story <mark.st...@gmail.com> wrote:
>
> > The CakePHP development team is happy to announce CakePHP 1.2.5[1].
> > 1.2.5 is a bug fix release of the latest stable branch. Check the
> > changelog[2] for all the changes.
>
> > CakePHP 1.2.5 Includes almost 40 commits and more than 20 fixes.
> > Furthermore, due to popular demand CakePHP 1.2.5 is compatible with
> > PHP 5.3 and includes fixes to suppress the deprecation messages. See
> > the changelog[2] for a complete list of changes and bugs fixed.
>
> > The 1.3 branch has seen continued progress and there will be another
> > development release sometime soon. If you would like to contribute to
> > the development of 1.3 and hasten its arrival, there is a more
> > detailed summary of things to do[3]
>
> > And as always, thank you for helping us make a great framework.
>
> > [1]http://cakeforge.org/frs/?group_id=23&release_id=449
> > [2]http://code.cakephp.org/wiki/changelog/1_2_x_x
> > [3]http://code.cakephp.org/wiki/RFCs/1-3-todo-list

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Conditions $quoteValues

OK, that actually doesn't work by the looks of it :(

On Sep 30, 1:00 pm, seanislegend <boredofm...@googlemail.com> wrote:
> Nevermind, got it!
>
> All you need to do is simply put your conditions outside of the find
> array in $this->conditions.
>
> Ch33rz!
>
> On Sep 30, 12:56 pm, seanislegend <boredofm...@googlemail.com> wrote:
>
> > Hi,
>
> > I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
> > dbo-source/#line-1745), but I cannot get it working at all.
>
> > My finder query looks like this (trimmed down):
>
> > $this->find('all', array(
> >     'conditions' => array(
> >         'Release.id' => array($release_ids)
> >     )
> > ));
>
> > $release_ids is a string of ids, such as: '1,2,3,4,5'.
>
> > The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
> > and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"
>
> > Can anyone help, please?
> > Cheers!
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Conditions $quoteValues

Nevermind, got it!

All you need to do is simply put your conditions outside of the find
array in $this->conditions.

Ch33rz!

On Sep 30, 12:56 pm, seanislegend <boredofm...@googlemail.com> wrote:
> Hi,
>
> I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
> dbo-source/#line-1745), but I cannot get it working at all.
>
> My finder query looks like this (trimmed down):
>
> $this->find('all', array(
>     'conditions' => array(
>         'Release.id' => array($release_ids)
>     )
> ));
>
> $release_ids is a string of ids, such as: '1,2,3,4,5'.
>
> The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
> and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"
>
> Can anyone help, please?
> Cheers!
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

A Query from CakePHP Beginner

Folks, i am new to CakePHP. I know about PHP and want to learn Cake
now.

I first started with the standard manual. However, i feel that there
is 'too much' to digest in it. I mean can i get some resource,
tutorial or book which covers each topic systematically .. i mean i am
not saying that the manual is not systematic.. What i am saying is
that it is too damn long and by the time i cover every topic till 4th
chap, i have mostly forgotten most of the previous stuff. Is there any
book that covers one topic followed by a hands on example or some kind
of tutorial...

please dont misunderstand me.. i want to code and learn rather learn
and code...


--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Simple Acl controlled application

i want the source of this tutorial. my aplication return the follow erros:

Warning (512): AclNode::node() - Couldn't find Aro node identified by "Array
(
[Aro0.model] => User
[Aro0.foreign_key] => 3
)
" [CORE\cake\libs\model\db_acl.php, line 191]

Code | Context

$ref = array(
"Aro0.model" => "User",
"Aro0.foreign_key" => "3"
)
$this = Aro
Aro::$name = "Aro"
Aro::$hasAndBelongsToMany = array
Aro::$cacheQueries = false
Aro::$actsAs = array
Aro::$useDbConfig = "default"
Aro::$useTable = "aros"
Aro::$displayField = "id"
Aro::$id = false
Aro::$data = array
Aro::$table = "aros"
Aro::$primaryKey = "id"
Aro::$_schema = array
Aro::$validate = array
Aro::$validationErrors = array
Aro::$tablePrefix = ""
Aro::$alias = "Aro"
Aro::$tableToModel = array
Aro::$logTransactions = false
Aro::$transactional = false
Aro::$belongsTo = array
Aro::$hasOne = array
Aro::$hasMany = array
Aro::$Behaviors = BehaviorCollection object
Aro::$whitelist = array
Aro::$cacheSources = true
Aro::$findQueryType = NULL
Aro::$recursive = 1
Aro::$order = NULL
Aro::$__exists = NULL
Aro::$__associationKeys = array
Aro::$__associations = array
Aro::$__backAssociation = array
Aro::$__insertID = NULL
Aro::$__numRows = NULL
Aro::$__affectedRows = NULL
Aro::$_findMethods = array
Aro::$_log = NULL
Aro::$Aco = Aco object
Aro::$Permission = Permission object
$db = DboMysql
DboMysql::$description = "MySQL DBO Driver"
DboMysql::$_baseConfig = array
DboMysql::$startQuote = "`"
DboMysql::$endQuote = "`"
DboMysql::$_useAlias = true
DboMysql::$_commands = array
DboMysql::$columns = array
DboMysql::$index = array
DboMysql::$alias = "AS "
DboMysql::$fieldCache = array
DboMysql::$__bypass = true
DboMysql::$__sqlOps = array
DboMysql::$connected = true
DboMysql::$fullDebug = true
DboMysql::$error = NULL
DboMysql::$affected = 0
DboMysql::$numRows = 0
DboMysql::$took = 1
DboMysql::$_result = resource
DboMysql::$_queriesCnt = 1
DboMysql::$_queriesTime = 1
DboMysql::$_queriesLog = array
DboMysql::$_queriesLogMax = 200
DboMysql::$_queryCache = array
DboMysql::$__descriptions = array
DboMysql::$_sources = array
DboMysql::$connection = resource
DboMysql::$config = array
DboMysql::$configKeyName = "default"
DboMysql::$_transactionStarted = false
DboMysql::$cacheSources = true
DboMysql::$_log = NULL
DboMysql::$__booleans = array
DboMysql::$results = resource
DboMysql::$map = array
$type = "Aro"
$result = array()
$table = "aros"
$name = "User"
$model = User
User::$name = "User"
User::$validate = array
User::$belongsTo = array
User::$hasMany = array
User::$useDbConfig = "default"
User::$useTable = "users"
User::$displayField = "id"
User::$id = false
User::$data = array
User::$table = "users"
User::$primaryKey = "id"
User::$_schema = array
User::$validationErrors = array
User::$tablePrefix = ""
User::$alias = "User"
User::$tableToModel = array
User::$logTransactions = false
User::$transactional = false
User::$cacheQueries = false
User::$hasOne = array
User::$hasAndBelongsToMany = array
User::$actsAs = NULL
User::$Behaviors = BehaviorCollection object
User::$whitelist = array
User::$cacheSources = true
User::$findQueryType = NULL
User::$recursive = 1
User::$order = NULL
User::$__exists = NULL
User::$__associationKeys = array
User::$__associations = array
User::$__backAssociation = array
User::$__insertID = NULL
User::$__numRows = NULL
User::$__affectedRows = NULL
User::$_findMethods = array
User::$_log = NULL
User::$Group = Group object
User::$Post = Post object
$tmpRef = null
$val = "3"
$key = "foreign_key"
$queryData = array(
"conditions" => array(
"Aro0.model" => "User",
"Aro0.foreign_key" => "3"
),
"fields" => array(
"id",
"parent_id",
"model",
"foreign_key",
"alias"
),
"joins" => array(
array()
),
"order" => "`Aro`.`lft` DESC"
)


if (!$result) {
trigger_error("AclNode::node() - Couldn't find {$type}
node identified by \"" . print_r($ref, true) . "\"", E_USER_WARNING);

AclNode::node() - CORE\cake\libs\model\db_acl.php, line 191
DbAcl::check() - CORE\cake\libs\controller\components\acl.php, line 235
AclComponent::check() - CORE\cake\libs\controller\components\acl.php, line 89
AuthComponent::isAuthorized() -
CORE\cake\libs\controller\components\auth.php, line 480
AuthComponent::startup() -
CORE\cake\libs\controller\components\auth.php, line 402
Component::startup() - CORE\cake\libs\controller\component.php, line 112
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 210
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
[main] - APP\webroot\index.php, line 88

Warning (512): DbAcl::check() - Failed ARO/ACO node lookup in
permissions check. Node references:
Aro: Array
(
[User] => Array
(
[id] => 3
[username] => heat
[group_id] => 1
[created] => 2009-09-29 17:36:20
[modified] => 2009-09-29 17:36:20
)

)

Aco: controllers/Pages/display
[CORE\cake\libs\controller\components\acl.php, line 239]

Code | Context

$aro = array(
"User" => array(
"id" => "3",
"username" => "heat",
"group_id" => "1",
"created" => "2009-09-29 17:36:20",
"modified" => "2009-09-29 17:36:20"
)
)
$aco = "controllers/Pages/display"
$action = "*"
$permKeys = array(
"_create",
"_read",
"_update",
"_delete"
)
$aroPath = array()
$acoPath = false


if (empty($aroPath) || empty($acoPath)) {
trigger_error("DbAcl::check() - Failed ARO/ACO node lookup
in permissions check. Node references:\nAro: " . print_r($aro, true)
. "\nAco: " . print_r($aco, true), E_USER_WARNING);

DbAcl::check() - CORE\cake\libs\controller\components\acl.php, line 239
AclComponent::check() - CORE\cake\libs\controller\components\acl.php, line 89
AuthComponent::isAuthorized() -
CORE\cake\libs\controller\components\auth.php, line 480
AuthComponent::startup() -
CORE\cake\libs\controller\components\auth.php, line 402
Component::startup() - CORE\cake\libs\controller\component.php, line 112
Dispatcher::_invoke() - CORE\cake\dispatcher.php, line 210
Dispatcher::dispatch() - CORE\cake\dispatcher.php, line 194
[main] - APP\webroot\index.php, line 88

Warning (2): Cannot modify header information - headers already sent
by (output started at C:\xampp\htdocs\cake\cake\basics.php:109)
[CORE\cake\libs\controller\controller.php, line 644]


2009/9/22 Chippo <mathew.chapman@gmail.com>:
>
> Hi
>
> I was wondering if any of you could help me, I have been trying to
> follow the tutorial in the book...
> http://book.cakephp.org/view/641/Simple-Acl-controlled-Application
>
> But I've run into some problems and its pecking my head lol. Is there
> any chance one of you has a working copy of the source I can download
> to see where Im going wrong?
>
> Any response is greatly appreciated.
>
> Chippo
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Conditions $quoteValues

Hi,

I'm trying to disable $quoteValues (http://api.cakephp.org/view_source/
dbo-source/#line-1745
), but I cannot get it working at all.

My finder query looks like this (trimmed down):

$this->find('all', array(
'conditions' => array(
'Release.id' => array($release_ids)
)
));

$release_ids is a string of ids, such as: '1,2,3,4,5'.

The resulting conditions is: "WHERE `Release`.`id` = ('1,2,3,4,5')",
and what I need is: "WHERE `Release`.`id` IN (1,2,3,4,5)"

Can anyone help, please?
Cheers!
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Using Pretty URLs on Windows

Folks i am new to CakePHP. I am going through the manual which assumes
that the user is on Linux Or Unix System. I want to ask one question


http://book.cakephp.org/view/782/Lighttpd-and-mod_magnet LINK says
that in order to use Pretty URLs in cakephp, place this lua script in /
etc/lighttpd/cake.

/// Script


Where am i supposed to place it on windows... ??


P:S: I have installed it under c:\wamp\www\cake...


--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Method access problem

Hey..........

Baking is good practice to impliment admin methods for CRUD operations.
It gives you directly admin_add,admin_edit, admin_view & admin_delete methods with completly code.
You can it.
--
Thanks & Regards
Amol
amol@weboniselab.com

--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: javascript link in default.ctp

mmm,
i have just these two:

cake/libs/controller/app_controller.php
cake/console/libs/templates/skel/app_controller.php


On Sep 30, 11:41 am, "Richard@Home" <richardath...@gmail.com> wrote:
> AppController doesn't go in the cake/ folder, it goes in your app
> folder:
>
> /app/app_controller.php
>
> class AppController extends Controller {
>
>     var $helpers = array("Html", "Form", "Javascript");
>
> }
>
> On Sep 30, 9:17 am, lorenx <lor...@gmail.com> wrote:
>
>
>
> > m, ok...
> > i raised the issue just because the cookbook says "not to edit files
> > in cake/ folder"...
>
> > thanks.
>
> > On Sep 30, 2:12 am, brian <bally.z...@gmail.com> wrote:
>
> > > On Tue, Sep 29, 2009 at 5:07 PM, lorenx <lor...@gmail.com> wrote:
>
> > > > sure but...
> > > > is there a way to do it in the app/ area?
>
> > > Do you mean in individual controllers? Yes, but you'd have to add it
> > > to all of them, so there's not much point. Besides, if you then ran
> > > into a "missing controller" error or similar, you'd run into a fatal
> > > error because of the$javascript call in the layout.
>
> > > Short answer: Save yourself some grief and load it into AppController.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Method access problem

Hi,
I am getting the following error:

Private Method in NominationsController

Error: NominationsController::admin_add() cannot be accessed directly.

Notice: If you want to customize this error message, create content/
views/errors/private_action.ctp

Can you tell me how can i use this "admin_add()" function?
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Problem with saving id's

I am not sure, but as far as I know, you have to get the new ID from
the sequence yourself.
Whether you can persuade CakePHP to do it (don't know how, maybe "id =
your_seq.NEXTVAL") or maybe add a before insert trigger to get the new
ID from the sequence (if it can be done!).
Enjoy,
John

On Sep 30, 12:35 pm, Xanax <mammer...@gmail.com> wrote:
> Hi everyone,
>
> I've got a little problem with my cake app'.
>
> My database is Oracle. Every data saving handled by cake engine works
> fine.
> The problem is with a 'manual' saving :
>
> $this->User->Planification->create($data_planification);
>
>                                 $data_planification["Planification"]["user_id"] = $_POST
> ['user_id'];
>                                 $data_planification["Planification"]["projet_id"] = $_POST
> ['projet_id'];
>
>                                 $this->User->Planification->save($data_planification);
>
> This code doesn't work with my Oracle database while it used to work
> with MySQL database.
> When i add this line at the begining :
>                                 $data_planification["Planification"]["id"] = 5678;
> It works, so i guess i've got a problem with my id. I thought that
> cake generate automatically id's and then save them in the database.
> I've created sequences, maybe i must retrieve the current sequence ?
> Or is there a thing that i've missed ?
>
> Thanks for any help.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Doubt in cake php

On the other hand, to answer your question, you can always use:

ClassRegistry::init('ModelName')->find(...)

to read data from a model in a view.

I often use this approach in cached elements, that display things like
"yesterdays stats" where the read access is needed but only once per
day then cached. In an instance like that it is "helpful" to
encapsulate the whole data finding and displaying in one piece of
code.

Of course this goes against Cakes MVC approach, but it's your app and
if it works for you then great!

On Sep 29, 4:58 pm, Travis L <lele...@gmail.com> wrote:
> I don't see it as making the controller "fat", really.  It's where
> this call belongs.  I usually think of fat controllers as doing some
> of the models' heavy lifting for them.
>
> But in this case, putting the code in your controller is clearly the
> right thing to do, by Cake's MVC principles.
>
> Don't worry too much about following some abstract, arbitrary
> guidelines like "skinny controllers".  It's just a general rule of
> thumb; to me, it means to put as much data handling and managing as
> possible in the models. Use the controllers to wrangle data around and
> to handle requests (which includes access control, for most of my
> work).  The views should be limited to displaying stuff.
>
> In certain situations you might want to put more logic in the views,
> but this doesn't sound like one of them.
>
> On Sep 28, 3:15 am, John Andersen <j.andersen...@gmail.com> wrote:
>
>
>
> > It will not be much more fat, as the only thing each function used by
> > a requestAction should be doing, is to call the model and return the
> > models data.
> > Enjoy,
> >    John
>
> > On Sep 28, 12:46 pm, hunny <saurabh85maha...@gmail.com> wrote:
>
> > > On Sep 25, 10:27 am, John Andersen <j.andersen...@gmail.com> wrote:
>
> > > > Look into the controllers method "requestAction", which allows you to
> > > > retrieve the list of clubs in a view!
> > > > Enjoy,
> > > >    John
>
> > > > On Sep 24, 11:59 am, hunny <saurabh85maha...@gmail.com> wrote:
> > [snip]
> > > Hi All,
>
> > > Thanks for your help. I was just reluctant to put the code in the
> > > controller because it makes your controller fat.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: javascript link in default.ctp

AppController doesn't go in the cake/ folder, it goes in your app
folder:

/app/app_controller.php

class AppController extends Controller {

var $helpers = array("Html", "Form", "Javascript");

}


On Sep 30, 9:17 am, lorenx <lor...@gmail.com> wrote:
> m, ok...
> i raised the issue just because the cookbook says "not to edit files
> in cake/ folder"...
>
> thanks.
>
> On Sep 30, 2:12 am, brian <bally.z...@gmail.com> wrote:
>
>
>
> > On Tue, Sep 29, 2009 at 5:07 PM, lorenx <lor...@gmail.com> wrote:
>
> > > sure but...
> > > is there a way to do it in the app/ area?
>
> > Do you mean in individual controllers? Yes, but you'd have to add it
> > to all of them, so there's not much point. Besides, if you then ran
> > into a "missing controller" error or similar, you'd run into a fatal
> > error because of the$javascript call in the layout.
>
> > Short answer: Save yourself some grief and load it into AppController.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Problem with saving id's

Hi everyone,

I've got a little problem with my cake app'.

My database is Oracle. Every data saving handled by cake engine works
fine.
The problem is with a 'manual' saving :

$this->User->Planification->create($data_planification);

$data_planification["Planification"]["user_id"] = $_POST
['user_id'];
$data_planification["Planification"]["projet_id"] = $_POST
['projet_id'];


$this->User->Planification->save($data_planification);

This code doesn't work with my Oracle database while it used to work
with MySQL database.
When i add this line at the begining :
$data_planification["Planification"]["id"] = 5678;
It works, so i guess i've got a problem with my id. I thought that
cake generate automatically id's and then save them in the database.
I've created sequences, maybe i must retrieve the current sequence ?
Or is there a thing that i've missed ?

Thanks for any help.


--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: remove authorization from Cakephp form

In the beforeFilter event of your controller you have to use

$this->Auth->allow('action_of_your_form');

http://book.cakephp.org/view/563/Setting-Auth-Component-Variables
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Paginate fat models

I'm currently reworking one of my early Cake applications and I want
to follow the "fat models - skinny controllers" principle. What I
don't understand is how to paginate a fat model. Is it true, that I
have to use pagination in the controller? Or is there another way?

Thanks,
Markus
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: CPAMF plugin, Auth and Encryption - anyone got any experience?

Guess thats a no then... LOL!

If I have any success I'll try and write something for the bakery.

t.

On Sep 29, 12:11 pm, "designv...@gmail.com" <designv...@gmail.com>
wrote:
> Hi there,
>
> I'm looking at starting a new project that is going to need to use the
> CPAMF plugin, CakePHP Auth and Encryption (for communicating between
> Flash and CakePHP).
>
> Has anyone had any experience if this sort of project?
>
> I have got CPAMF all set up and have some dummy controller methods in
> CakePHP working for sending and recieving info via the CPAMF browser
> so thats all cool.
>
> Just wondered how I'm going to be able to integrate with Auth
> Component and also make sure the communication is encrypted...
>
> I also found the rc4crypt class for PHP and got that working as a
> vendor, apparently there is the same for Flash, so maybe that is the
> way forward?
>
> Any thoughts, advice, words of warning would be gratefully recieved!
>
> TIA,
>
> toby.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

sample examples not working

Hi All,
i've downloaded usermgmt SNO.- 24 sample project but its not
working properly link
http://cakeforge.org/top/mostactive.php

some of them i downloaded and installed there is no use.
anybody give some solutions
Note: please upload sample projects with some docs.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: javascript link in default.ctp

m, ok...
i raised the issue just because the cookbook says "not to edit files
in cake/ folder"...

thanks.

On Sep 30, 2:12 am, brian <bally.z...@gmail.com> wrote:
> On Tue, Sep 29, 2009 at 5:07 PM, lorenx <lor...@gmail.com> wrote:
>
> > sure but...
> > is there a way to do it in the app/ area?
>
> Do you mean in individual controllers? Yes, but you'd have to add it
> to all of them, so there's not much point. Besides, if you then ran
> into a "missing controller" error or similar, you'd run into a fatal
> error because of the$javascript call in the layout.
>
> Short answer: Save yourself some grief and load it into AppController.
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Change Password

I think the 'password' only gets automatically hashed if there is a
'username' field set as well (and I regularly forget this). So you
tend tend to run into problems when you have a view just to update a
password.

When I remember I use a bit of code like this and has the new password
manually:

if(($this->data['User']['password'] == $this->data['User']
['confirm_password'])) {

$this->User->validate = $this->User->validate_password;

$this->data['User']['password'] = Security::hash
(Configure::read('Security.salt') . $this->data['User']['password']);

if ($this->User->save($this->data)) {

$this->Session->setFlash('You have successfully updated
this password.');

$this->redirect(array('controller' => 'users',
'action'=>'index'), null, true);

} else {

$this->Session->setFlash('Sorry unable to update
password.');
}
}


John

On Sep 30, 12:27 am, brian <bally.z...@gmail.com> wrote:
> I kept running into issues with passwords so I removed the validation
> from the model and created a component to handle it. For a "new
> password" scenario, the fields are 'password_1' and 'password_2',, so
> Auth keeps its mitts off them.
>
> You can see it here, with a "new password" example:
>
> http://bin.cakephp.org/view/1339211759
>
> Comments/criticisms welcome.
>
> On Tue, Sep 29, 2009 at 2:44 PM, Dave Maharaj :: WidePixels.com
>
> <d...@widepixels.com> wrote:
>
> > Here is the controller function
>
> > Maybe someone can see where I am going wrong?
>
> > function changePassword() {
> >          $id = $this->Auth->user('id');
>
> >          $this->User->unbindValidation('keep', array('password',
> > 'confirm'), true);
> >          if (!empty($this->data)) {
>
> >                  $this->data['User']['confirm'] =
> > $this->Auth->password($this->data['User']['confirm']);
> >              //debug confirm and get gf456dg5rtert132erwr string
> >              $this->User->set($this->data);
> >              if ($this->User->validates()) {
> >                        $this->User->id = $id;
> >                        $white = array('password');
> >                        $this->User->save($this->data, true,
> > array_intersect(array_keys($this->User->schema()), $white));
> >                  $this->Session->setFlash(__('Passwords Matched and saved',
> > true));
>
> >              } else {
> >                  $this->Session->setFlash(__('Passwords Do not Match',
> > true));
> >                           $this->data = null;
> >              }
> >          }
> > }
>
> > User Model
> > Validation rules:
>
> > ...
> > 'password' => array(
> >                        'pass-notempty' => array(
> >                                'rule' => array('notempty'),
> >                                'required' => true,
> >                                'allowEmpty' => false,
> >                                'message' => 'Password cannot be empty.',
> >                                'last' => true),
>
> >                        'pass-length' => array(
> >                                'rule' => array('minLength', 8),
> >                                'message' => 'Password must be minimim 8
> > characters.',
> >                                'last' => true),
>
> >                        'pass-Similar' => array(
> >                                'rule' => 'checkPasswords',
> >                                'message' => 'Different password entered.',
> >                                'last' => true)
> >                        ),
>
> >                'confirm' => array(
> >                        'confirm-notempty' => array(
> >                                'rule' => array('notempty'),
> >                                'required' => true,
> >                                'allowEmpty' => false,
> >                                'message' => 'Pleae confirm your password.')
> >                        ),
>
> > ...
>
> > function checkPasswords()
> >        {
> >                  if($this->data['User']['password'] ==
> > $this->data['User']['confirm'])
> >                {
> >                          // Passwords match
> >                          return true;
> >                }
> >        }
>
> > -----Original Message-----
> > From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com]
> > Sent: September-29-09 3:46 PM
> > To: cake-php@googlegroups.com
> > Subject: RE: Change Password
>
> > Ok cool will give it a try.
>
> > Dave
> > -----Original Message-----
> > From: Miles J [mailto:mileswjohn...@gmail.com]
> > Sent: September-29-09 3:40 PM
> > To: CakePHP
> > Subject: Re: Change Password
>
> > I dont think hash() adds the security salt, you must use Auth->password ().
>
>
--~--~---------~--~----~------------~-------~--~----~
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 group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---