Tuesday, June 30, 2009

Which branch should I work on?

Hi everyboy,

I want to contribute developing cakephp. so i forked it. but I don't
know in which branch should I make changes?
I'm going to fix a bug that is actually an enhancement for cakephp 1.3
in configure class.
so which branch should I work on (master or 1.3 or 1.3-configure or
1.3-misc)?
--~--~---------~--~----~------------~-------~--~----~
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 returning array from function

Oh, and Ive set my debug to 2 and dont get any errors

The problem is not building the array, the problem is returning the
built array

On Jun 29, 9:04 pm, John Andersen <j.andersen...@gmail.com> wrote:
> Assuming you are passing anarraywith one ID, then if I understand
> your problem correctly, a parent will be read from the database and as
> it will not be 0, thefunctionwill enter the else statement.
>
> There is will add the parent ID to thearrayand then pass thisarray
> plus the parent ID via a recursive call to thefunction.
>
> In the (recursive)functiona parent will be read and it will be 0,
> thus entering into the main if statement, where thearrayis reversed,
> and returned ...
>
> ... returning to thefunction... ups, the returned (reversedarray)
> is lost in the null land, because no variable is defined to receive
> id! And the $arraywill just contain the values as before the call
> (recursive) to thefunction.
>
> And furthermore, I don't see any statement returning anything from
> hereon!
>
> Please check your code !! Turn on Debug, add debug statements and try
> again!
> Enjoy,
>    John
>
> On Jun 28, 11:53 pm, Sanfly <san...@gmail.com> wrote:
>
> > No, I dont think so.  I have no trouble building thearraybecause
> > this line:
>
> > print_r($reverse); echo "<br><br>";
>
> > does print the entire correctarray.  Its returning it from the
> >functionwhen there is more than one value in thearraythat gives me
> > a problem.
--~--~---------~--~----~------------~-------~--~----~
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 returning array from function

Im sorry, I really dont get this

> the returned (reversedarray)
> is lost in the null land, because no variable is defined to receive
> id!

If $id = 0 I dont need it to be added to the array - the array is now
complete so I want to take the array ive built to date and exit the
function

> And the $arraywill just contain the values as before the call
> (recursive) to thefunction.

Thats just what I want

> And furthermore, I don't see any statement returning anything from
> hereon!

Shouldn't return $reverse; be enough to return my array?

On Jun 29, 9:04 pm, John Andersen <j.andersen...@gmail.com> wrote:
> Assuming you are passing anarraywith one ID, then if I understand
> your problem correctly, a parent will be read from the database and as
> it will not be 0, thefunctionwill enter the else statement.
>
> There is will add the parent ID to thearrayand then pass thisarray
> plus the parent ID via a recursive call to thefunction.
>
> In the (recursive)functiona parent will be read and it will be 0,
> thus entering into the main if statement, where thearrayis reversed,
> and returned ...
>
> ... returning to thefunction... ups, the returned (reversedarray)
> is lost in the null land, because no variable is defined to receive
> id! And the $arraywill just contain the values as before the call
> (recursive) to thefunction.
>
> And furthermore, I don't see any statement returning anything from
> hereon!
>
> Please check your code !! Turn on Debug, add debug statements and try
> again!
> Enjoy,
>    John
>
> On Jun 28, 11:53 pm, Sanfly <san...@gmail.com> wrote:
>
> > No, I dont think so.  I have no trouble building thearraybecause
> > this line:
>
> > print_r($reverse); echo "<br><br>";
>
> > does print the entire correctarray.  Its returning it from the
> >functionwhen there is more than one value in thearraythat gives me
> > a problem.
--~--~---------~--~----~------------~-------~--~----~
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: SMTP - Not working

Yes... I found out the error..

I have used another smtp mailing class, and in it, there is an option
to set the authentication (TRUE or FALSE). If TRUE it will work fine
and if FALSE it will show the error message "No unauthenticated
relying permitted'.

But in cake, I have used 'auth'=>true in the smtpOptions and it's not
working.
So, the final solution in cake php will be to find out the way to set
TRUE to smtp authentication.

Anybody to help me please....?

On Jun 30, 10:16 pm, aarkerio <mmont...@gmail.com> wrote:
> This looks as a MTA issue (exim4, Postfix, Sendmail, etc). Look in the
> MTA log and try send one email using console command and mail PHP
> function (no CakePHP).
>
> On Jun 29, 11:56 pm, si-mon <sijumo...@gmail.com> wrote:
>
> > Hi all...
>
> > In my application, I need to send mails using smtp server. I have
> > given all parameters but it is not working. Then I have tracked the
> > errors in the email component. Then I got the following status
> > messages:
>
> > 503 AUTH command used when not advertised
> > 550 bosauthsmtp16: No unauthenticated relaying permitted
>
> > My mailing function is as follows:
>
> > function _sendMail()
> > {
> > $this->Email->to = 'sijumo...@gmail.com';
> > $this->Email->bcc = array();
> > $this->Email->subject = 'Test Mail';
> > $this->Email->replyTo = 'smtp username';
> > $this->Email->from = 'smtp username';
> > $this->Email->template = 'test';
> > $this->Email->sendAs = 'html';
>
> > $this->Email->smtpOptions = array( 'port'=>'25',
> > 'timeout'=>'30',
> > 'auth'=>true,
> > 'host' => 'smtp host',
> > 'username'=>'smtp username',
> > 'password'=>'smtp password'
> > );
> > $this->Email->delivery = 'smtp';
> > $this->Email->send();
>
> > }
>
> > Please help me to solve this issue...
>
> > Thank you all...
--~--~---------~--~----~------------~-------~--~----~
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: Database Table not Found for a Model I haven't Created

I only have one model called "User" and one controller called
"Sites".

And is there a way to keep CakePHP from running a query unless asked
to? Isn't that useless overhead that you don't need to have happen?


On Jun 30, 10:55 am, brian <bally.z...@gmail.com> wrote:
> Check all of your models' associations. I think you probably have a
> Site model listed somewhere.
>
> On Tue, Jun 30, 2009 at 12:25 PM, Tony<t3proje...@gmail.com> wrote:
>
> > I'm running into a problem in getting this error:
> > Error:  Database table sites for model Site was not found.
>
> > I don't have a model for Sites because I don't even have a table for
> > it.
>
> > I have a Sites controller but in the $uses array it is using the model
> > "User".
>
> > Can anyone help me here.
--~--~---------~--~----~------------~-------~--~----~
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: How to generate a hash that is valid for 48 hrs?

I know a hash-function named rolling hash. It works fine when you consider multiple user for multiple session.

On Wed, Jul 1, 2009 at 11:02 AM, brian <bally.zijn@gmail.com> wrote:

I wouldn't bother trying to include (and parse out) the date in the
hash. Create a table to store the hashes and include a "created
DATETIME DEFAULT NULL" column. This way, you can later use your DB's
date/time functions to check if it's within the 48 hours. When the
hash is used, remove it from the DB.

On Tue, Jun 30, 2009 at 7:51 PM,
DigitalDude<e.blumstengel@googlemail.com> wrote:
>
> Hey,
>
> I need a way to generate a hash code, which is valid 48 hrs. after it
> has been generated. I need this to register my users and to activate
> them.
>
> I have the problem that this code below does generate a hash for 2
> days, but this will cause problems when a user registers at 23:56, so
> the hash will only be valid for the next day because it does not hash
> correctly. I need a generation in hours, but I can't figure out how to
> do that.
>
> Here's what I got so far...:
>
> return substr(Security::hash(Configure::read('Security.salt') . $this-
>>field('created') . date('Y-m-d', strtotime("+2 days"))), 0, 20);
>
> The hash is generated by hashing the security salt, the date the user
> is created and the actual date + 2 days. It should contain 20 digits.
> When I try to put +48 hrs into the code instead of +2 days the hash
> will not be accepted anymore.
>
> Would be nice if someone could help me on this one...
> >
>




--~--~---------~--~----~------------~-------~--~----~
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: How to generate a hash that is valid for 48 hrs?

I wouldn't bother trying to include (and parse out) the date in the
hash. Create a table to store the hashes and include a "created
DATETIME DEFAULT NULL" column. This way, you can later use your DB's
date/time functions to check if it's within the 48 hours. When the
hash is used, remove it from the DB.

On Tue, Jun 30, 2009 at 7:51 PM,
DigitalDude<e.blumstengel@googlemail.com> wrote:
>
> Hey,
>
> I need a way to generate a hash code, which is valid 48 hrs. after it
> has been generated. I need this to register my users and to activate
> them.
>
> I have the problem that this code below does generate a hash for 2
> days, but this will cause problems when a user registers at 23:56, so
> the hash will only be valid for the next day because it does not hash
> correctly. I need a generation in hours, but I can't figure out how to
> do that.
>
> Here's what I got so far...:
>
> return substr(Security::hash(Configure::read('Security.salt') . $this-
>>field('created') . date('Y-m-d', strtotime("+2 days"))), 0, 20);
>
> The hash is generated by hashing the security salt, the date the user
> is created and the actual date + 2 days. It should contain 20 digits.
> When I try to put +48 hrs into the code instead of +2 days the hash
> will not be accepted anymore.
>
> Would be nice if someone could help me on this one...
> >
>

--~--~---------~--~----~------------~-------~--~----~
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: variable is undefined when I pass it from a javascript file to a php file

Dear Brain,
Thanks for the reply. I am very late. Your solution was right. I
didn't upload one file that includes the variable . That's why the
problem occurs.

By the way, thanks for the reply.
I am very late to reply. Sorry for that.

Once again, Thanks .

On Jun 16, 11:17 pm, brian <bally.z...@gmail.com> wrote:
> How is this a CakePHP question? Ensure that both versions are in sync
> (eg. use rsync). Maybe the code is on the server but some other file
> has not included it. If you view source, do you see your code?
>
> On Tue, Jun 16, 2009 at 7:51 AM,TamannaAfroze<afroz...@gmail.com> wrote:
> > Hi everybody,
> > I am new in this group.
> > The following code works well in my local machine.
>
> >         if(top.upper.securityOptions.generate_instant_message)
> >         {
>
> > securityOption=top.upper.securityOptions.generate_instant_message;
> >             securityDelete =
> > top.upper.securityOptions.delete_instant_message;
> >             alert(top.upper.securityOptions.delete_instant_message +
> > 'sjdgfjhsdgf');
> >         }
> >         //alert(securityDelete);
> >         alert(top.upper.securityOptions.delete_instant_message +
> > 'sjdgfjhsdgf');
>
> > I uploaded the file containing this code fragment to my office's server and
> > I got the securityDelete variable undefined.
>
> > can anybody help me regarding this matter?
> > Thanks in advance.
>
> > Tinni.

--~--~---------~--~----~------------~-------~--~----~
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: Auth session getting destroyed?

Set it to low and medium; no dice.

On Tue, Jun 30, 2009 at 9:17 PM, Miles J<mileswjohnson@gmail.com> wrote:
>
> Try setting your security level to medium and see what happens.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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: Noob Q: how to put a textarea at the right side of a scaffolded table

delete this post please >.<

On Jul 1, 9:06 am, keanoppy <keano0...@gmail.com> wrote:
> using the scaffold...cakephp easily generate the table and input
> textbox
> where and how to modify the code (still using the scaffold) to place a
> text area right next
> to the scaffolded table view?
--~--~---------~--~----~------------~-------~--~----~
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: Auth session getting destroyed?

Try setting your security level to medium and see what happens.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Noob Q: how to put a textarea at the right side of a scaffolded table

using the scaffold...cakephp easily generate the table and input
textbox
where and how to modify the code (still using the scaffold) to place a
text area right next
to the scaffolded table view?
--~--~---------~--~----~------------~-------~--~----~
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: Auth session getting destroyed?

On Tue, Jun 30, 2009 at 8:48 PM, GravyFace<gravyface@gmail.com> wrote:
> On Tue, Jun 30, 2009 at 8:41 PM, GravyFace<gravyface@gmail.com> wrote:
>> On Tue, Jun 30, 2009 at 8:20 PM, Miles J<mileswjohnson@gmail.com> wrote:
>>>
>>> What are your session/core/auth settings?
>> http://pastebin.com/m3cfd4150
>
> ^^^ that's my core.php.
>
> app_controller.php:
> http://pastebin.com/m444d1c56
>
> users_controller.php:
> http://pastebin.com/m41b2d9a0

Using the Developer add-on for Firefox, the session cookie is still
there (same one as well), just cannot retrieve Auth.User from the
session, only when I first authenticate (POST).

--~--~---------~--~----~------------~-------~--~----~
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: Auth session getting destroyed?

On Tue, Jun 30, 2009 at 8:41 PM, GravyFace<gravyface@gmail.com> wrote:
> On Tue, Jun 30, 2009 at 8:20 PM, Miles J<mileswjohnson@gmail.com> wrote:
>>
>> What are your session/core/auth settings?
> http://pastebin.com/m3cfd4150

^^^ that's my core.php.

app_controller.php:
http://pastebin.com/m444d1c56

users_controller.php:
http://pastebin.com/m41b2d9a0

--~--~---------~--~----~------------~-------~--~----~
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: Auth session getting destroyed?

On Tue, Jun 30, 2009 at 8:20 PM, Miles J<mileswjohnson@gmail.com> wrote:
>
> What are your session/core/auth settings?
http://pastebin.com/m3cfd4150

> May we also see your login action.

login action is empty.

Thanks for your 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: Auth session getting destroyed?

What are your session/core/auth settings?

May we also see your login action.
--~--~---------~--~----~------------~-------~--~----~
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: return true or false

Sounds good thanks once again.

Basically a user has a profile and decides if they want it public or
private.

But running into to many if statements and is a complete mess.

Options for the profile owner public or private pretty simple

But if private I have to check friendships to see if the Auth.user and the
profile they are attempting to view has allowed them

So it looks like
Check public
if not public
Check friendsships
If there is a friendship
allow
If not no access
Else it public


-----Original Message-----
From: brian [mailto:bally.zijn@gmail.com]
Sent: June-30-09 6:56 AM
To: cake-php@googlegroups.com
Subject: Re: return true or false


like so?

if ($this->Profile->checkPublic ($profile_user_id)) {
// true
}
else
{
// false
}

On Mon, Jun 29, 2009 at 4:54 PM, Dave Maharaj ::
WidePixels.com<dave@widepixels.com> wrote:
> I have a function that checks if a users profile is public or private
>
> function checkPublicAccess ($profile_user_id)
>  {
>   // check if profile is public or private
>           //0 = private 1 = public
>           $params = array(
>      'conditions' => array('Profile.user_id' => $profile_user_id,
> 'Profile.public' => '1'),
>      'contain' => false,
>      'fields' => array('Profile.public'));
>
>           $q = $this->find('first', $params);
>
>           // profile is not public so you must be logged in
>           if (empty($q)) {
>               return false;
>     }
>  }
>
> My question is how do I in the controller use the 'false' return?
>
> if ($this->Profile->checkPublic ($profile_user_id) == false)?
>
>
> 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
-~----------~----~----~----~------~----~------~--~---

How to generate a hash that is valid for 48 hrs?

Hey,

I need a way to generate a hash code, which is valid 48 hrs. after it
has been generated. I need this to register my users and to activate
them.

I have the problem that this code below does generate a hash for 2
days, but this will cause problems when a user registers at 23:56, so
the hash will only be valid for the next day because it does not hash
correctly. I need a generation in hours, but I can't figure out how to
do that.

Here's what I got so far...:

return substr(Security::hash(Configure::read('Security.salt') . $this-
>field('created') . date('Y-m-d', strtotime("+2 days"))), 0, 20);

The hash is generated by hashing the security salt, the date the user
is created and the actual date + 2 days. It should contain 20 digits.
When I try to put +48 hrs into the code instead of +2 days the hash
will not be accepted anymore.

Would be nice if someone could help me on this one...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

[cakephp] Auth session getting destroyed?

Not sure what's going on, but using Auth in it's simplest form
(login.ctp, empty login action, etc.), my Auth.User session key is
null as soon as I leave the login action (which is blank).

I have pr($session->read('Auth.User'); in my login.ctp view; after I
POST, it retrieves a record and seems to authenticate ok as the pr
statement shows the User object array with all the proper values from
the database. However, if I call the same pr on another controller's
action, or if I simply GET the login action, the Auth session key is
immediately destroyed. Tested in FF 3, IE7, Chrome 2.x.

Any ideas?

--~--~---------~--~----~------------~-------~--~----~
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: Delete current login user sessions

Your session is local and only applies to you, so the way you are
suggesting would not work.

You would have to save the session id to the database, and do a check
to see if it changed. If it changes then destroy the session.
--~--~---------~--~----~------------~-------~--~----~
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: File Upload validation in cakephp 1.2

You can use my file upload plugin, it comes bundled with validation
rules.

http://www.milesj.me/resources/script/uploader-plugin
--~--~---------~--~----~------------~-------~--~----~
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: I cannot render a chart using Open Flash Chart Helper

it´s the helper from http://svn2.assembla.com/svn/cakeopenflashchart/trunk/flash_chart.php
??
I think the problem is in this line: echo $flashChart->chart();
there is no chart function in the helper.
you have another problem in this line: echo $flashChart->begin();
you should not do an echo here because begin() function returns void.
try this:
<?php
$flashChart->begin(400, 250);
$flashChart->title('Example 4 - Pie Chart: My imaginary Browser
Stats');
$browser_data = array(
'Firefox' => array(
'value' => 30
),
'Opera' => array(
'value' => 7
),
'IE' => array(
'value' => 38
),
'Other' => array(
'value' => 25
)
);
$flashChart->pie($browser_data);
echo $flashChart->render();
?>

On 30 jun, 18:05, Frannie <demoniob...@gmail.com> wrote:
> Hello to everyone,
> I want to use  Flash Chart Helper to show some charts in my
> application.
> I downloaded all necessary files and located them into the following
> places:
>
> /app/views/helpers/flash_chart.php
> /app/views/helpers/flash.php
> /app/vendors/flashchart/open-flash-chart.php
> /app/vendors/flashchart/*37 other files at the time of this writing*
> /app/webroot/flash/open-flash-chart.swf
> /app/webroot/js/swfobject.js
> /app/webroot/js/json/json2.js
>
> I also added this line to my controller:
>
> var $helpers = array('Html', 'Form','FlashChart');
>
> and placed this example into my view
>
> <?php
>          echo $flashChart->begin();
>          $flashChart->setData(array(1,2,4,8));
>          echo $flashChart->chart();
>          echo $flashChart->render();
>      ?>
>
> <table>
> <tr><td>1</td><td>one</td></tr>
> <tr><td>1</td><td>two</td></tr>
> <tr><td>1</td><td>three</td></tr>
> <tr><td>1</td><td>four</td></tr>
> </table>
>
> but when I try to load it, the chart doesn't show.... I can only see
> the table...
> If somebody knows what is going please tell me
> I've tried several other examples (none of them seem to work)
> Thank you in advance.
>
> Francisca.
> PS: Please if you have any questions let me know, english is not my
> first language so I could have missed something in this message

--~--~---------~--~----~------------~-------~--~----~
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: Delete current login user sessions

Does anyone have any feedback or comments on this?

Much Appreciated.

G
--~--~---------~--~----~------------~-------~--~----~
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: Having problem with [A] HABTM [B]; [B] hasOne [C]

Some more debug info can be found here:
http://guy.codepad.org/oCi8ZXEU

On Jul 1, 12:33 am, Guy <g.kuizi...@gmail.com> wrote:
> I have a Thesaurus model that joins Synonym model over
> HasAndBelongsToMany and then
> I have a Property model that is joined by Synonym using hasOne, or at
> least should be joined.
> The problem is that even though I am casting
>
> 'hasOne' => array(
>     'Property' => array(
>         'className'                     => 'Property',
>         'foreignKey'                    => false,
>     )
> )
>
> foreignKey to false, I still get simple SELECT WHERE (SELECT
> `Property`.`id`, `Property`.`name`, `Property`.`description` FROM
> `properties` AS `Property`   WHERE `Property`.`property_id` = 12060)
> instead of my needed so JOIN. How to fix that?
--~--~---------~--~----~------------~-------~--~----~
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: recursive = -1

That's what I though about. But are there any unforseen problems with
this approach?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

I cannot render a chart using Open Flash Chart Helper

Hello to everyone,
I want to use Flash Chart Helper to show some charts in my
application.
I downloaded all necessary files and located them into the following
places:

/app/views/helpers/flash_chart.php
/app/views/helpers/flash.php
/app/vendors/flashchart/open-flash-chart.php
/app/vendors/flashchart/*37 other files at the time of this writing*
/app/webroot/flash/open-flash-chart.swf
/app/webroot/js/swfobject.js
/app/webroot/js/json/json2.js

I also added this line to my controller:

var $helpers = array('Html', 'Form','FlashChart');

and placed this example into my view

<?php
echo $flashChart->begin();
$flashChart->setData(array(1,2,4,8));
echo $flashChart->chart();
echo $flashChart->render();
?>

<table>
<tr><td>1</td><td>one</td></tr>
<tr><td>1</td><td>two</td></tr>
<tr><td>1</td><td>three</td></tr>
<tr><td>1</td><td>four</td></tr>
</table>

but when I try to load it, the chart doesn't show.... I can only see
the table...
If somebody knows what is going please tell me
I've tried several other examples (none of them seem to work)
Thank you in advance.

Francisca.
PS: Please if you have any questions let me know, english is not my
first language so I could have missed something in this message
--~--~---------~--~----~------------~-------~--~----~
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: Benchmarking

php profiler is your frind http://www.xdebug.org/docs/profiler
hop this helps. ros

On Jun 30, 3:22 pm, CMNAJS <cmn...@gmail.com> wrote:
> how can i perform benchmarking in cakephp. i had a library in
> codigniter to perform this but how should i do this in cakephp.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Having problem with [A] HABTM [B]; [B] hasOne [C]

I have a Thesaurus model that joins Synonym model over
HasAndBelongsToMany and then
I have a Property model that is joined by Synonym using hasOne, or at
least should be joined.
The problem is that even though I am casting

'hasOne' => array(
'Property' => array(
'className' => 'Property',
'foreignKey' => false,
)
)

foreignKey to false, I still get simple SELECT WHERE (SELECT
`Property`.`id`, `Property`.`name`, `Property`.`description` FROM
`properties` AS `Property` WHERE `Property`.`property_id` = 12060)
instead of my needed so JOIN. How to fix that?

--~--~---------~--~----~------------~-------~--~----~
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: recursive = -1

I would recommend setting it to -1 in your AppModel, and then use
Containable everywhere else.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

recursive = -1

Is it recommended to set recursive = -1 application wide and only set
it to a higher value when it is really needed?
Are there any unforseen problems?

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: Database Table not Found for a Model I haven't Created

Check all of your models' associations. I think you probably have a
Site model listed somewhere.

On Tue, Jun 30, 2009 at 12:25 PM, Tony<t3projects@gmail.com> wrote:
>
> I'm running into a problem in getting this error:
> Error:  Database table sites for model Site was not found.
>
> I don't have a model for Sites because I don't even have a table for
> it.
>
> I have a Sites controller but in the $uses array it is using the model
> "User".
>
> Can anyone help me here.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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: Inserting record with id

On Tue, Jun 30, 2009 at 12:21 PM, Roman Brunnemann<mailinglists@gmx.de> wrote:
> Hi,
>
> i have a table products with the following columns ( simplified )
>
> id
> shop_id
> name
>
> id and shop_id are the primary key.

CakePHP does not work with multi-column PKs. o you mean that shop_id
is the Foreign Key?

> Now I have some kind of importer and want to insert data preparing my array
> like
>
> $i['Product']['id'] = $id;
> $i['Product']['shop_id'] = $shop_id;
> $i['Product']['name'] = $name;
>
> App::import('Model', 'Product' );
> $Product = new Product();
> $Product->save($i);
>
> But it does not save the id, only shop_id and name. I tried to add a
> fieldList to the save function, but it didn't work.

Normally, your PK would be an auto_increment column (for MySQL; serial
for Postgres, etc.). IOW, you wouldn't explicitly set the PK when
creating a record.

Also, why are you importing Product? Normally, when saving in a loop,
you'd do something along the lines of:

$this->Product->create($data);
$this->Product->save();

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Containable behavior and dual model relationship

I'm having some trouble using Containable with the following model
relationship.


Suppose an Airplane has two EngineTypes, with the relationships
defined like this:

class Airplane extends AppModel {
$belongsTo = array(
'EngineType' => array(
'className' => 'EngineType',
'foreignKey' => 'engine_type_id',
),
'SecondEngineType' => array(
'className' => 'EngineType',
'foreignKey' => 'second_engine_type_id',
),
);
}


I can't get my Airplane model to return the associated
SecondEngineType info using Containable behavior:

$this->Airplane->find( 'all', array(
'contain' => array(
'EngineType',
'SecondEngineType',
),
);


The first EngineType shows up, but not the SecondEngineType.

When I do a normal recursive find on Airplane, I get both.

So, I'm fairly sure this is something to do with the Containable
behavior, but I can't figure it out.

Any thoughts?

--~--~---------~--~----~------------~-------~--~----~
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: File Upload validation in cakephp 1.2

I do in this way:

http://trac.chipotle-software.com/karamelo/browser/trunk/app/controllers/users_controller.php

line 236:
public function avatar()
{

I check if fil was uploaded and if is a valid file, in this case an
image:

if ( $type != 'image/jpeg' && $type != 'image/pjpeg' && $type !=
'image/png' && $type != 'image/gif'):

On Jun 30, 3:54 am, bhushan A <bhushanahir...@gmail.com> wrote:
> Hi All,
>
>  I have done with file uploading functionality in cakephp. But i want
> to apply validation (i.e. Please upload file.. ) . How to actieve
> this. I have created $validate array in model.
>  waiting for reply. Please guide 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: Pagination not respecting page numbers

Heya,

Ahh I figured out what the problem was...

I had

$data = $this->paginate('Property', $conditions, $fields, $theorder,
$resultsperpage, $page);

but the paginate function doesn't take those parameters...

I had to use:

$this->paginate = array(
'limit' => $resultsperpage,
'order' => $theorder,
'fields' => $fields,
'page' => $page
);

$data = $this->paginate('Property');

oops!

On Wed, Jun 24, 2009 at 9:16 PM, schneimi<michael.schneidt@arcor.de> wrote:
>
> Hi,
>
> I am not sure about your problem, but I also use named params and can
> tell you how to pass them to the next pages without a session
> workaround.
>
> Well, but you can also do it with the session, the only thing you have
> to do, is to pass the named parameters to the pagination functions
> with the "url" option.
>
> For not using the session, you can define the options in the
> controller with the incoming params like this
>
>    $this->set('paginationOptions', array('url' => array('title:'.
> $this->params['named']['title'],
>
> 'year:'.$this->params['named']['year'])));
>
> and then pass the options to the pagination functions that you use in
> the view, like $paginator->numbers($options),...
>
> Hope this helps,
>
> Michael
>
> On 24 Jun., 20:44, Bryan Paddock <bryanpadd...@gmail.com> wrote:
>> Hey all,
>>
>> I was using the paginator and it was working pretty well for me when I
>> was using all the search criteria as named url parameters. I
>> discovered that the paginator didn't send the parameters to the next
>> pages so implemented sessions to store the criteria.
>>
>> The arrays I create from the session (critera/order) generate fine and
>> the page number variable I take from the named url parameter.
>>
>> examples of values follow....
>>
>> $conditions = Array
>> (
>>     [sale] => 1
>> )
>>
>> $theorder = Array
>> (
>>     [created_date_time] => DESC
>> )
>>
>> $resultsperpage = 10;
>>
>> $page = 1; // or 2, 3, etc
>>
>> My paginator call is:
>>
>> $data = $this->paginate('Property', $conditions, $theorder,
>> $resultsperpage, $page);
>>
>> For some reason it respects the conditions, order and results per page
>> but NOT the page number. Anyone have any ideas why? I test the value
>> of the $page variable and it does correctly change but the data
>> received from the model remains the same.
>>
>> Am I doing something wrong here? I can't figure out what's going on....
>>
>> thanks!
>> bryan
> >
>

--~--~---------~--~----~------------~-------~--~----~
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: SMTP - Not working

This looks as a MTA issue (exim4, Postfix, Sendmail, etc). Look in the
MTA log and try send one email using console command and mail PHP
function (no CakePHP).

On Jun 29, 11:56 pm, si-mon <sijumo...@gmail.com> wrote:
> Hi all...
>
> In my application, I need to send mails using smtp server. I have
> given all parameters but it is not working. Then I have tracked the
> errors in the email component. Then I got the following status
> messages:
>
> 503 AUTH command used when not advertised
> 550 bosauthsmtp16: No unauthenticated relaying permitted
>
> My mailing function is as follows:
>
> function _sendMail()
> {
>         $this->Email->to = 'sijumo...@gmail.com';
>         $this->Email->bcc = array();
>         $this->Email->subject = 'Test Mail';
>         $this->Email->replyTo = 'smtp username';
>         $this->Email->from = 'smtp username';
>         $this->Email->template = 'test';
>         $this->Email->sendAs = 'html';
>
>         $this->Email->smtpOptions = array(  'port'=>'25',
>                                                                 'timeout'=>'30',
>                                                                 'auth'=>true,
>                                                                 'host' => 'smtp host',
>                                                                 'username'=>'smtp username',
>                                                                 'password'=>'smtp password'
>                                                              );
>        $this->Email->delivery = 'smtp';
>        $this->Email->send();
>
> }
>
> Please help me to solve this issue...
>
> Thank you all...
--~--~---------~--~----~------------~-------~--~----~
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 relationship problem

What Travis said :)

2009/6/30 Travis L <leleutd@gmail.com>

Carlos is right, but he was a little implicit in his answer.

The short answer is that the Agency belongsTo Seller means that each
agency belongs to only one seller.  It wants a seller_id field in the
agency table (which is how the relationship is linked).

From what I understand, you want the Seller to belongTo an agency (so
sellers table will need an agency_id in it), and you want the agency
model to contain a hasMany sellers relationship (necessitating an
agency_id foreign key in the sellers table).  So try the hasMany.

BTW, you only need to define the relationships both ways if you need
to access things in the opposite direction.  So, you could do a
sellers belongsTo agency, but you don't necessarily need the opposite
relationship UNLESS you want to retrieve associated sellers during a
query on the agency model.  But it's a good practice to do so, because
the database cost to crosslink the two is only one more INT field.

If you need the capability for a seller to belong to many agencies,
you'll need the HABTM.  Which will require a join table
(agencys_sellers).  And it will likely mean you'll need the
Containable behavior in some of your stuff too.

On Jun 30, 7:36 am, Carlos Gonzalez Lavin <carloslavi...@gmail.com>
wrote:
> How about:
> *Seller Model:
> *
> *belongsTo agency*
> *
> *
> *Agency Model:
> **hasMany seller*
> *
> *
> Because Agency doesn't really belong to the seller... an agency has many
> sellers (if I understand you correctly) and a seller belongs to an agency
>
> 2009/6/30 Bryan Paddock <bryanpadd...@gmail.com>
>
>
>
> > Hey JD,
>
> > Ah... I'm confused as to why I would need a HABTM and a join table for
> > a fairly simple relationship.
>
> > example of the structure:
>
> > Seller.id
> > Seller.name
> > Seller.agency_id
> > etc
>
> > and
>
> > Agency.id
> > Agency.name
> > etc
>
> > Each seller can only belong to one agency.
> > Each agency can have any number of sellers.
>
> > I've defined $hasOne and $belongsTo but cake complains that there is
> > no agency.seller_id field which is correct because that would imply
> > that each agency can only have one seller.
>
> > Hmmmmm.....
>
> > On Mon, Jun 29, 2009 at 8:25 PM, JD Daniels<j...@internetguys.ca> wrote:
> > > You need to look at hasAndBelongsToMany
>
> > >http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
>
> > > Bryan Paddock wrote:
>
> > > Argh.. I hate gmail shortcut keys.
>
> > > Anyways continuing mail:
>
> > > Heya all,
>
> > > Theres something I'm not doing right here...
>
> > > I have a User model which has one Seller model linked to it which in
> > > turn can have an Agency model linked to it.
>
> > > User Model:
> > > hasOne seller.
>
> > > Seller Model:
> > >  belongsTo user
>
> > > Agency Model:
> > > belongsTo seller
>
> > > Now when I call $this->User->find('all') it complains that there is no
> > > foreign key in the agency table. That would be impossible because then
> > > that would mean only one agency can belong to one seller.
>
> > > How do I set it up so that any number of agencies can belong to any
> > > number of sellers? I'm missing something really stupid here....
>
> > > Thanks!
>
> > > Bryan
>
> > > On Mon, Jun 29, 2009 at 7:06 PM, Bryan Paddock<bryanpadd...@gmail.com>
> > > wrote:
>
> > > Heya all,
>
> > > Theres something I'm not doing right here...
>
> > > I have a User model which has one Seller model linked to it which in
> > > turn can have an Agency model linked to it.
>
> > > User Model:
> > > hasOne seller.
> > > Seller Model: belongsTo user
> > > Agency Model: belongsTo seller



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Database Table not Found for a Model I haven't Created

I'm running into a problem in getting this error:
Error: Database table sites for model Site was not found.

I don't have a model for Sites because I don't even have a table for
it.

I have a Sites controller but in the $uses array it is using the model
"User".

Can anyone help me here.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Inserting record with id

Hi,

i have a table products with the following columns ( simplified )

id
shop_id
name

id and shop_id are the primary key.

Now I have some kind of importer and want to insert data preparing my array like

$i['Product']['id'] = $id;
$i['
Product']['shop_id'] = $shop_id;
$i['
Product']['name'] = $name;

App::import('Model', 'Product' );
$Product = new Product();
$Product->save($i);

But it does not save the id, only shop_id and name. I tried to add a fieldList to the save function, but it didn't work.

Any help? Thanks for your hints.
Roman

--~--~---------~--~----~------------~-------~--~----~
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 relationship problem

Carlos is right, but he was a little implicit in his answer.

The short answer is that the Agency belongsTo Seller means that each
agency belongs to only one seller. It wants a seller_id field in the
agency table (which is how the relationship is linked).

From what I understand, you want the Seller to belongTo an agency (so
sellers table will need an agency_id in it), and you want the agency
model to contain a hasMany sellers relationship (necessitating an
agency_id foreign key in the sellers table). So try the hasMany.

BTW, you only need to define the relationships both ways if you need
to access things in the opposite direction. So, you could do a
sellers belongsTo agency, but you don't necessarily need the opposite
relationship UNLESS you want to retrieve associated sellers during a
query on the agency model. But it's a good practice to do so, because
the database cost to crosslink the two is only one more INT field.

If you need the capability for a seller to belong to many agencies,
you'll need the HABTM. Which will require a join table
(agencys_sellers). And it will likely mean you'll need the
Containable behavior in some of your stuff too.

On Jun 30, 7:36 am, Carlos Gonzalez Lavin <carloslavi...@gmail.com>
wrote:
> How about:
> *Seller Model:
> *
> *belongsTo agency*
> *
> *
> *Agency Model:
> **hasMany seller*
> *
> *
> Because Agency doesn't really belong to the seller... an agency has many
> sellers (if I understand you correctly) and a seller belongs to an agency
>
> 2009/6/30 Bryan Paddock <bryanpadd...@gmail.com>
>
>
>
> > Hey JD,
>
> > Ah... I'm confused as to why I would need a HABTM and a join table for
> > a fairly simple relationship.
>
> > example of the structure:
>
> > Seller.id
> > Seller.name
> > Seller.agency_id
> > etc
>
> > and
>
> > Agency.id
> > Agency.name
> > etc
>
> > Each seller can only belong to one agency.
> > Each agency can have any number of sellers.
>
> > I've defined $hasOne and $belongsTo but cake complains that there is
> > no agency.seller_id field which is correct because that would imply
> > that each agency can only have one seller.
>
> > Hmmmmm.....
>
> > On Mon, Jun 29, 2009 at 8:25 PM, JD Daniels<j...@internetguys.ca> wrote:
> > > You need to look at hasAndBelongsToMany
>
> > >http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
>
> > > Bryan Paddock wrote:
>
> > > Argh.. I hate gmail shortcut keys.
>
> > > Anyways continuing mail:
>
> > > Heya all,
>
> > > Theres something I'm not doing right here...
>
> > > I have a User model which has one Seller model linked to it which in
> > > turn can have an Agency model linked to it.
>
> > > User Model:
> > > hasOne seller.
>
> > > Seller Model:
> > >  belongsTo user
>
> > > Agency Model:
> > > belongsTo seller
>
> > > Now when I call $this->User->find('all') it complains that there is no
> > > foreign key in the agency table. That would be impossible because then
> > > that would mean only one agency can belong to one seller.
>
> > > How do I set it up so that any number of agencies can belong to any
> > > number of sellers? I'm missing something really stupid here....
>
> > > Thanks!
>
> > > Bryan
>
> > > On Mon, Jun 29, 2009 at 7:06 PM, Bryan Paddock<bryanpadd...@gmail.com>
> > > wrote:
>
> > > Heya all,
>
> > > Theres something I'm not doing right here...
>
> > > I have a User model which has one Seller model linked to it which in
> > > turn can have an Agency model linked to it.
>
> > > User Model:
> > > hasOne seller.
> > > Seller Model: belongsTo user
> > > Agency Model: belongsTo seller
--~--~---------~--~----~------------~-------~--~----~
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: Fieldset Issues under IE 8

Mark,

Yeah it was strange but I figured out what the real problem was. Since
IE 6->7 likes to add padding to form elements at its own accord we had
the form nested like this "<table><form><tr>". Well IE 8 obviously
renders this differently though incorrect syntax that solution had
worked for us in ie 6+, firefox, chrome, safari, etc... until now. As
soon as the fieldset is added into that incorrect positioning all of
the items within it fail to render, though simply having a form works.

I guess i didn't read the changelog on the 1.2.x updates to see the
strict validation errors had been corrected.

Thanks,
Jared

On Jun 30, 8:31 am, mark_story <mark.st...@gmail.com> wrote:
> So no forms made with the form helper are visible in IE8?  Because I
> have not had that issue.
>
> -Mark
>
> On Jun 29, 12:15 pm, j-rod <jarmstr...@omnispear.com> wrote:
>
>
>
> > Does anyone know if there is a change coming in the 1.2.x or 1.3.x
> > versions that have different handling for the fieldset with $form->create than the display: none. It just came to my attention that IE 8
>
> > running normally (not in capatability mode) is now hiding the entire
> > form contents with this set.I just checked and I had the Strict XHTML
> > DTD in place. Perhaps a 0 border/padding/margin option withing a CSS
> > class would work better than display:none inline ?
--~--~---------~--~----~------------~-------~--~----~
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: Web Installer

I wrote a web installer for a CakePHP CMS, but I took the quick way
out: I didn't actually write it as part of Cake, just as a standalone
install script. It took me all of 5 minutes this way. Here's what it
does:

- Asks the user for database parameters (dbname, user, pass)
- Copies a zip file from a central place on the server containing the /
app directory and the root index.php and .htaccess (the core Cake
files are shared between many different sites so they're in a
different place)
- Unzips the zip file
- Opens up app/config/database.php with fopen and replaces DB
placeholders (%dbuser%, %dbpass%, %dbname%) with the info from the
install form
- Deletes the zip file and install script

And that's it! Cake is up and running. It also does sanity checks at
each step to make sure nothing crazy happens. But basically, I thought
that a standalone install script would be much faster to write (I was
right), and, more importantly, it would make installing the CMS easier
for the non-programmers (i.e. designers) in our company.

Hope that helps...

- Jamie

On Jun 29, 5:13 pm, aarkerio <mmont...@gmail.com> wrote:
> Hi! I am trying to code a Web Installer for my APP. The installer show
> a form with typical fields: database_name, user, password, etc. This
> information will be used to create database.php file so
> "installers_controller.php" must run without database configuration,
> ¿there is a way to do this?
--~--~---------~--~----~------------~-------~--~----~
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 relationship problem

How about:

Seller Model:
belongsTo agency

Agency Model:
hasMany seller

Because Agency doesn't really belong to the seller... an agency has many sellers (if I understand you correctly) and a seller belongs to an agency


2009/6/30 Bryan Paddock <bryanpaddock@gmail.com>

Hey JD,

Ah... I'm confused as to why I would need a HABTM and a join table for
a fairly simple relationship.

example of the structure:

Seller.id
Seller.name
Seller.agency_id
etc

and

Agency.id
Agency.name
etc

Each seller can only belong to one agency.
Each agency can have any number of sellers.

I've defined $hasOne and $belongsTo but cake complains that there is
no agency.seller_id field which is correct because that would imply
that each agency can only have one seller.

Hmmmmm.....

On Mon, Jun 29, 2009 at 8:25 PM, JD Daniels<jd@internetguys.ca> wrote:
> You need to look at hasAndBelongsToMany
>
> http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
>
> Bryan Paddock wrote:
>
> Argh.. I hate gmail shortcut keys.
>
> Anyways continuing mail:
>
> Heya all,
>
> Theres something I'm not doing right here...
>
> I have a User model which has one Seller model linked to it which in
> turn can have an Agency model linked to it.
>
> User Model:
> hasOne seller.
>
> Seller Model:
>  belongsTo user
>
> Agency Model:
> belongsTo seller
>
> Now when I call $this->User->find('all') it complains that there is no
> foreign key in the agency table. That would be impossible because then
> that would mean only one agency can belong to one seller.
>
> How do I set it up so that any number of agencies can belong to any
> number of sellers? I'm missing something really stupid here....
>
> Thanks!
>
> Bryan
>
>
>
>
>
>
> On Mon, Jun 29, 2009 at 7:06 PM, Bryan Paddock<bryanpaddock@gmail.com>
> wrote:
>
>
> Heya all,
>
> Theres something I'm not doing right here...
>
> I have a User model which has one Seller model linked to it which in
> turn can have an Agency model linked to it.
>
> User Model:
> hasOne seller.
> Seller Model: belongsTo user
> Agency Model: belongsTo seller
>
>
>
>
>
> >
>




--~--~---------~--~----~------------~-------~--~----~
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 relationship problem

Hey JD,

Ah... I'm confused as to why I would need a HABTM and a join table for
a fairly simple relationship.

example of the structure:

Seller.id
Seller.name
Seller.agency_id
etc

and

Agency.id
Agency.name
etc

Each seller can only belong to one agency.
Each agency can have any number of sellers.

I've defined $hasOne and $belongsTo but cake complains that there is
no agency.seller_id field which is correct because that would imply
that each agency can only have one seller.

Hmmmmm.....

On Mon, Jun 29, 2009 at 8:25 PM, JD Daniels<jd@internetguys.ca> wrote:
> You need to look at hasAndBelongsToMany
>
> http://book.cakephp.org/view/83/hasAndBelongsToMany-HABTM
>
> Bryan Paddock wrote:
>
> Argh.. I hate gmail shortcut keys.
>
> Anyways continuing mail:
>
> Heya all,
>
> Theres something I'm not doing right here...
>
> I have a User model which has one Seller model linked to it which in
> turn can have an Agency model linked to it.
>
> User Model:
> hasOne seller.
>
> Seller Model:
> belongsTo user
>
> Agency Model:
> belongsTo seller
>
> Now when I call $this->User->find('all') it complains that there is no
> foreign key in the agency table. That would be impossible because then
> that would mean only one agency can belong to one seller.
>
> How do I set it up so that any number of agencies can belong to any
> number of sellers? I'm missing something really stupid here....
>
> Thanks!
>
> Bryan
>
>
>
>
>
>
> On Mon, Jun 29, 2009 at 7:06 PM, Bryan Paddock<bryanpaddock@gmail.com>
> wrote:
>
>
> Heya all,
>
> Theres something I'm not doing right here...
>
> I have a User model which has one Seller model linked to it which in
> turn can have an Agency model linked to it.
>
> User Model:
> hasOne seller.
> Seller Model: belongsTo user
> Agency Model: belongsTo seller
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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: Benchmarking

You can use DebugKit to do benchmarking and various other debugging
related tasks.

http://thechaw.com/debug_kit

You can either clone the git repo or download a tar file from the
"versions" tab.

-Mark

On Jun 30, 8:22 am, CMNAJS <cmn...@gmail.com> wrote:
> how can i perform benchmarking in cakephp. i had a library in
> codigniter to perform this but how should i do this in cakephp.

--~--~---------~--~----~------------~-------~--~----~
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: Fieldset Issues under IE 8

So no forms made with the form helper are visible in IE8? Because I
have not had that issue.

-Mark

On Jun 29, 12:15 pm, j-rod <jarmstr...@omnispear.com> wrote:
> Does anyone know if there is a change coming in the 1.2.x or 1.3.x
> versions that have different handling for the fieldset with $form->create than the display: none. It just came to my attention that IE 8
>
> running normally (not in capatability mode) is now hiding the entire
> form contents with this set.I just checked and I had the Strict XHTML
> DTD in place. Perhaps a 0 border/padding/margin option withing a CSS
> class would work better than display:none inline ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Benchmarking

how can i perform benchmarking in cakephp. i had a library in
codigniter to perform this but how should i do this in cakephp.
--~--~---------~--~----~------------~-------~--~----~
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: multilingual app

Hi!

I know this behavior, but I'm currently not sure, if I maybe will
create the site so, that their isn't a list of specific languages, but
that everyone can wirte in every language he prefers.

So this won't work :-(

Best Regards, Sebastian
--~--~---------~--~----~------------~-------~--~----~
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: SMTP - Not working

Hi Brian,

Thanks for your suggestion.
I have removed the username and password from the options, but the
second error message still exists:

550 bosauthsmtp16: No unauthenticated relaying permitted

On Jun 30, 2:42 pm, brian <bally.z...@gmail.com> wrote:
> Try removing the username & password from the options.
>
> On Tue, Jun 30, 2009 at 12:56 AM, si-mon<sijumo...@gmail.com> wrote:
>
> > Hi all...
>
> > In my application, I need to send mails using smtp server. I have
> > given all parameters but it is not working. Then I have tracked the
> > errors in the email component. Then I got the following status
> > messages:
>
> > 503 AUTH command used when not advertised
> > 550 bosauthsmtp16: No unauthenticated relaying permitted
>
> > My mailing function is as follows:
>
> > function _sendMail()
> > {
> > $this->Email->to = 'sijumo...@gmail.com';
> > $this->Email->bcc = array();
> > $this->Email->subject = 'Test Mail';
> > $this->Email->replyTo = 'smtp username';
> > $this->Email->from = 'smtp username';
> > $this->Email->template = 'test';
> > $this->Email->sendAs = 'html';
>
> > $this->Email->smtpOptions = array( 'port'=>'25',
> > 'timeout'=>'30',
> > 'auth'=>true,
> > 'host' => 'smtp host',
> > 'username'=>'smtp username',
> > 'password'=>'smtp password'
> > );
> > $this->Email->delivery = 'smtp';
> > $this->Email->send();
> > }
>
> > Please help me to solve this issue...
>
> > Thank you all...
--~--~---------~--~----~------------~-------~--~----~
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: Read-Only app

and don't call $this->Model->save()

;-)
--~--~---------~--~----~------------~-------~--~----~
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: multilingual app

hi

i use this one:
http://www.palivoda.eu/2008/04/i18n-in-cakephp-12-database-content-translation-part-2/

and it's very straight and simple to use.
to save all data in all languages i disable the behaviour for the save
action and everything works fine.

On Jun 28, 7:52 pm, floorball92 <kont...@sebastian-bechtel.info>
wrote:
> I think I've found a good solution. It's not the best implimentation I
> think, but it should work:
>
> http://pastebin.com/m6eed9aa2
>
> Currently, I 've got the problem, that my language field won't be
> saved. It's in the $this->data array array, I've dumped it in
> beforeSave() and afterSave().
>
> It would be cool, if someone of you knows the solution because on IRC
> we didn't get through it :-(
>
> Best regards, Sebastian
--~--~---------~--~----~------------~-------~--~----~
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: Read-Only app

?
what the heck?

just dont have any add/edit actions (methods in the controller)...

On 30 Jun., 11:36, Ernesto <e.fanz...@gmail.com> wrote:
> Hello
>
> i'm baking a read-only app. This app shouldn't save any kind of data.
>
> here's my bet
>
> <?php
>
> class AppModel extends Model {
>         function beforeSave ($options = array()) {
>                 return false
>         }
>
> }
>
> ?>
>
> is there any faster/cleaner/better/safer way?
--~--~---------~--~----~------------~-------~--~----~
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: SMTP - Not working

Try removing the username & password from the options.

On Tue, Jun 30, 2009 at 12:56 AM, si-mon<sijumonap@gmail.com> wrote:
>
> Hi all...
>
> In my application, I need to send mails using smtp server. I have
> given all parameters but it is not working. Then I have tracked the
> errors in the email component. Then I got the following status
> messages:
>
> 503 AUTH command used when not advertised
> 550 bosauthsmtp16: No unauthenticated relaying permitted
>
> My mailing function is as follows:
>
> function _sendMail()
> {
>        $this->Email->to = 'sijumonap@gmail.com';
>        $this->Email->bcc = array();
>        $this->Email->subject = 'Test Mail';
>        $this->Email->replyTo = 'smtp username';
>        $this->Email->from = 'smtp username';
>        $this->Email->template = 'test';
>        $this->Email->sendAs = 'html';
>
>        $this->Email->smtpOptions = array(  'port'=>'25',
>                                                                'timeout'=>'30',
>                                                                'auth'=>true,
>                                                                'host' => 'smtp host',
>                                                                'username'=>'smtp username',
>                                                                'password'=>'smtp password'
>                                                             );
>       $this->Email->delivery = 'smtp';
>       $this->Email->send();
> }
>
> Please help me to solve this issue...
>
> Thank you all...
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---