Re: I can't get ACL-Auth to work

2010-02-19 Thread mattyh88
No, not yet. As i haven't made any groups (aros) yet.
Should i first fully disable auth-acl so i van make my groups / fill
up my aros_acos table?

On 19 feb, 23:37, MST  wrote:
> Do you have any records in your aros_acos table?
>
> On Feb 19, 2:00 pm, mattyh88  wrote:
>
>
>
> > I started with the ACL tutorial on the cakephp website. But I can't
> > get it to work properly.
>
> > Things I did:
>
> > 1. Set up the 5 tables (aros, acos, aros_acos, groups, users)
>
> > 2. Baked the models (User, Group) - Edited them so they act as
> > requester .. (followed the tutorial for the right code)
> > 3. Baked the controllers (users_controller, groups_controller)
> > 4. Baked the views for User & Group
>
> > 5. Added a login view in the users folder + added login & logout
> > actions to the users controller
> > 6. Added the app_controller file with beforeFilter function
> > 7. Fill up the acos table
> > 8. Added the actionpath thingie..
>
> > Now when I try to go to .../app/groups/add, it says: ( -- translated
> > from Dutch -- )
>
> > "This page doesn't redirect the right way, Firefox concluded that, the
> > server redirects the request for this address on a way that will never
> > end"
>
> > I really haven't got a clue on what I'm doing wrong here :(
>
> > Thank you in advance,
> > matty

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Extending Component. Error

2010-02-19 Thread John Andersen
Thanks :)
Please show the code/function around line 20, where the error was
found!
   John

On Feb 20, 12:18 am, dtirer  wrote:
> Sure here it is:
>
> // components/borrow_email.php
>
> 
>         App::import('Component', 'Email');
>
>         class BorrowEmailComponent extends EmailComponent
>         {
>                    // functions
>         }
> ?>
>
> --
>
> 
> class AppController extends Controller
> {
>         var $components = array('Auth', 'PasswordHelper', 'BorrowEmail');
>         var $helpers = array('Html', 'Form', 'Javascript', 'Time');
>
>         function beforeFilter()
>         {
>                 $this->Auth->allow('*');
>                 $this->Auth->fields = array('username' => 'email', 'password' 
> =>
> 'password');
>                 $this->Auth->loginAction = array('controller' => 'users', 
> 'action'
> => 'login');
>                 $this->Auth->logoutRedirect = array('controller' => 'items',
> 'action' => 'index');
>                 $this->Auth->loginRedirect = array('controller' => 'items', 
> 'action'
> => 'index');
>                 $this->Auth->authorize = 'controller';
>         }
>
>         function constructClasses()
>         {
>                 parent::constructClasses();
>                 $this->Email = $this->BorrowEmail;
>         }
>
> }
>
> ?>
>
> On Feb 19, 9:05 am, John Andersen  wrote:
>
> > Please show the code in your new class, specially the constructor
> > code.
> > Enjoy,
> >    John
>
> > On Feb 19, 1:12 am, dtirer  wrote:
>
> > > I'm trying to extend the email component as they do in this 
> > > tutorial:http://cakebaker.42dh.com/2009/09/08/extending-cakephps-core-components/
>
> > > However I keep getting this error: Fatal error: Call to undefined
> > > method stdClass::send() in /home/neighborrow/nyudev.neighborrow.com/
> > > app/controllers/components/neighborrow_email.php on line 20
>
> > > Any idea why?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Multiple Content Areas

2010-02-19 Thread Dr. Loboto
Your approach looks right. If you have this sidebar on all pages, and
variable name with data is same across all pages (highly recommended)
better place element call in layout and do not mix it with page
content. If sidebar content is independent from current page you can
place data retrieve for it into beforeRender AppController callback.

On Feb 19, 3:48 pm, WebbedIT  wrote:
> Lol, I think Zaky really likes elements as I am seeing that short post
> of his more and more, and probably rightly so as this does seem to be
> the commonly accepted way to tackle the issue of sidebars.
>
> However, can I throw what I am doing open for discussion so my errors
> can be corrected if necessary.  It uses elements, but not sure if I am
> passing in data in the commonly accepted manner.
>
> I have an element called side_content.ctp:
>  if(isset($data)):
>   foreach($data AS $row):
>     echo $this->element($row['element'], array('data'=>$row['data']));
>   endforeach;
> endif;
>
> I then pass that a data array with something like the following
> Array
> (
>     [0] => Array
>         (
>             [element] => cause_profile_summary
>             [data] => array('Cause'=>array('name'=>'Stokenchurch Dog
> Rescue', ...))
>         )
>     [1] => Array
>         (
>             [element] => sub_menu_cause
>             [data] => array('Cause'=>array('page_count'=>3, ...))
>         )
>     [2] => Array
>         (
>             [element] => latest_friends
>             [data] => array('Freind'=>array(0=>array('name'=>'Friend
> One', ...)))
>         )
>
> )
>
> I form the array to be passed to the side_content element in my
> controller pulling data in from related models, then in the view call
> element('side_content',
> array('data'=>$sideContent)); ?>
>
> Is this a sensible approach to dynamic content for side bars or should
> I dump all of this and revert to:
>
> http://book.cakephp.org/view/434/requestAction
>
> I stayed clear of requestAction() previously as there was a lot of
> discussion over performance issues, but now the book certainly seems
> to reccomend it for this purpose.
>
> Sorry to hijack the thread, but hopefully this lot should be a lot of
> use in what you're doing.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: How to make the paginator->sort link an image?

2010-02-19 Thread Jeremy Burns
You could do it with CSS?

Jeremy Burns
jeremybu...@me.com

On 20 Feb 2010, at 02:15, MST wrote:

> How can I replace the text 'Paid' with an image at the top of my
> table?
> 
> So, instead of this:
> sort('Paid', 'payment_received');?>
> 
> I get something like this:
> sort('  IMAGE GOES HERE  ',
> 'payment_received');?>
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> 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+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


How to make the paginator->sort link an image?

2010-02-19 Thread MST
How can I replace the text 'Paid' with an image at the top of my
table?

So, instead of this:
sort('Paid', 'payment_received');?>

I get something like this:
sort('  IMAGE GOES HERE  ',
'payment_received');?>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


isPost isGet Security questions

2010-02-19 Thread Dave
Is it best to secure the actions with 
if ( $this->RequestHandler->isGet() or $this->RequestHandler->isPost()
implementation  when dealing with forms? Using Ajax in my application so the
Security component checking for form modification is of no use to me.
 
And if using $this->RequestHandler->isGet() / isPost () are there any
drawbacks / alternative approaches?
 
Thanks,
 
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Screencasts won't play

2010-02-19 Thread tiberus
Searched for a framework to use and found CakePHP and am ready to give
it a try.  I'm an imperative coder by nature and MVC makes my head
hurt.  I found the screencasts and tutorials esp. what I would call
the "Getting Started" ones (Blog).

I was able to view them a few days ago and found them short and a
great starting point and took some time to read a bit figuring I would
get back to them.

Now when I visit http://cakephp.org/screencasts I am unable to play
most of the screencasts (only the top two play).  I've tried Firefox
(3.5, fully patched) and IE 7 (also fully patched), cleared my cache,
restarted the browsers, rebooted, etc. to no avail.

The Admin Routing tutorial seems to start to load but, never does.
The Blog Tutorial presents page with a big "Q" on it.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


sitemap.xml

2010-02-19 Thread Cycling_Joe
I cant seem to find the answer to this anywhere.
Where would I implement a manually crated sitemap.xml file in CakePHP
I have read there is ways to automate this in the Bakery, problem is I
need this to be done manually.
Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: I can't get ACL-Auth to work

2010-02-19 Thread MST
Do you have any records in your aros_acos table?


On Feb 19, 2:00 pm, mattyh88  wrote:
> I started with the ACL tutorial on the cakephp website. But I can't
> get it to work properly.
>
> Things I did:
>
> 1. Set up the 5 tables (aros, acos, aros_acos, groups, users)
>
> 2. Baked the models (User, Group) - Edited them so they act as
> requester .. (followed the tutorial for the right code)
> 3. Baked the controllers (users_controller, groups_controller)
> 4. Baked the views for User & Group
>
> 5. Added a login view in the users folder + added login & logout
> actions to the users controller
> 6. Added the app_controller file with beforeFilter function
> 7. Fill up the acos table
> 8. Added the actionpath thingie..
>
> Now when I try to go to .../app/groups/add, it says: ( -- translated
> from Dutch -- )
>
> "This page doesn't redirect the right way, Firefox concluded that, the
> server redirects the request for this address on a way that will never
> end"
>
> I really haven't got a clue on what I'm doing wrong here :(
>
> Thank you in advance,
> matty

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Plug-in Routing issues

2010-02-19 Thread Dave
I have a side admin navigation and when i go to a link that is a plug-in
(site/admin/bookings => plug-in) when i am at the booking page the admin
side nav all the links have site/admin/bookings/controller
 
So they should be 
admin/home
admin/bookings
admin/users
 
but they all have (bookings infront of the controller)
 
admin/bookings/home
admin/bookings/users
admin/bookings/groups
 
 
VIEW:
 
link('Bookings Manager', array('admin' => true,
'plugin' => 'bookings', 'controller' => 'bookings', 'action' =>
'index'));?>
 
link('User Management', array('admin' => true,
'controller' => 'users', 'action' => 'index'));?>
 
link('Group Management', array('admin' => true,
'controller' => 'groups', 'action' => 'index'));?>
 
Any ideas where I went wrong?
 
Thanks
Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Extending Component. Error

2010-02-19 Thread dtirer
Sure here it is:

// components/borrow_email.php



--

Auth->allow('*');
$this->Auth->fields = array('username' => 'email', 'password' =>
'password');
$this->Auth->loginAction = array('controller' => 'users', 
'action'
=> 'login');
$this->Auth->logoutRedirect = array('controller' => 'items',
'action' => 'index');
$this->Auth->loginRedirect = array('controller' => 'items', 
'action'
=> 'index');
$this->Auth->authorize = 'controller';
}

function constructClasses()
{
parent::constructClasses();
$this->Email = $this->BorrowEmail;
}
}

?>

On Feb 19, 9:05 am, John Andersen  wrote:
> Please show the code in your new class, specially the constructor
> code.
> Enjoy,
>    John
>
> On Feb 19, 1:12 am, dtirer  wrote:
>
> > I'm trying to extend the email component as they do in this 
> > tutorial:http://cakebaker.42dh.com/2009/09/08/extending-cakephps-core-components/
>
> > However I keep getting this error: Fatal error: Call to undefined
> > method stdClass::send() in /home/neighborrow/nyudev.neighborrow.com/
> > app/controllers/components/neighborrow_email.php on line 20
>
> > Any idea why?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


I can't get ACL-Auth to work

2010-02-19 Thread mattyh88
I started with the ACL tutorial on the cakephp website. But I can't
get it to work properly.

Things I did:

1. Set up the 5 tables (aros, acos, aros_acos, groups, users)

2. Baked the models (User, Group) - Edited them so they act as
requester .. (followed the tutorial for the right code)
3. Baked the controllers (users_controller, groups_controller)
4. Baked the views for User & Group

5. Added a login view in the users folder + added login & logout
actions to the users controller
6. Added the app_controller file with beforeFilter function
7. Fill up the acos table
8. Added the actionpath thingie..

Now when I try to go to .../app/groups/add, it says: ( -- translated
from Dutch -- )

"This page doesn't redirect the right way, Firefox concluded that, the
server redirects the request for this address on a way that will never
end"

I really haven't got a clue on what I'm doing wrong here :(

Thank you in advance,
matty

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


RE: problem with email component

2010-02-19 Thread Johnathan Iannotti
Are you developing your app on a windows localhost?

Johnathan Iannotti | Director of Technology | Blue Clover : On & Off-line 
Branding(tm) 
210 223.5409 P | 860 877.6676  M | 210 223.2581 F | blueclover.com
425 Soledad Ste. 500 | San Antonio, TX 78205


-Original Message-
From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of 
genellern
Sent: Friday, February 19, 2010 1:03 PM
To: CakePHP
Subject: problem with email component

Hi.

i got a unknown trouble with my app.

im trying to set a mail sender but i dont know why it does not send
any email, if somebody could help me i'ld really be thankful
i put my code below

function sendEmail(){
$this->Email->reset();
$this->log(__CLASS__.':'.__FUNCTION__.':'.__LINE__."
email",LOG_DEBUG);
$this->Email->smtpOptions = array(
'port'=>'465',
'timeout'=>'30',
'host' =>'smtp.gmail.com',
'username'=>'gmail co...@gmail.com',
'password'=>'my password');
$this->Email->sendAs = 'html';
$this->Email->delivery = 'smtp';
$this->Email->to = "gmail co...@gmail.com";
$this->Email->subject = 'Welcome to our CakePHP';
$this->Email->from = 'geneller naranjo ';
$this->Email->sendAs = 'html';
if($this->Email->send()){
$this->log(__CLASS__.':'.__FUNCTION__.':'.__LINE__."
NOerrores",LOG_DEBUG);
}
$this->log(__CLASS__.':'.__FUNCTION__.':'.__LINE__."
errores",LOG_DEBUG);
$this->log($this->Email->smtpError,LOG_DEBUG);
   }

when i look the log, i see this:

2010-02-19 13:55:55 Debug: RegistersController:sendEmail:68 errores

that's why i confirm that its not sendind and discard the gmail smtp

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Homepage: http://www.blueclover.com  |  Blog: http://www.blue-ings.com  |  
Twitter: http://twitter.com/bluecloverusa  |  Facebook: 
http://www.facebook.com/blueclover  | YouTube: 
http://www.youtube.com/user/bluecloverstudios | Join Our Mailing List: 
http://visitor.constantcontact.com/manage/optin?v=001ti8yLLtrqgo7unTQ7RVsh7BIcda1iEtM

-

This email transmission, including any attachments thereto, may contain 
information that is proprietary and confidential. The information is intended 
only for the use of the individual(s) or entity to whom this email has been 
addressed. If you are not the intended recipient, or the person responsible for 
delivering it to the intended recipient, you are hereby notified that any 
disclosure, copying, distribution or use of any of the information is strictly 
prohibited. If you have received this transmission in error, please let us know 
immediately and delete the email, including any attachments thereto, from your 
computer.


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


problem with email component

2010-02-19 Thread genellern
Hi.

i got a unknown trouble with my app.

im trying to set a mail sender but i dont know why it does not send
any email, if somebody could help me i'ld really be thankful
i put my code below

function sendEmail(){
$this->Email->reset();
$this->log(__CLASS__.':'.__FUNCTION__.':'.__LINE__."
email",LOG_DEBUG);
$this->Email->smtpOptions = array(
'port'=>'465',
'timeout'=>'30',
'host' =>'smtp.gmail.com',
'username'=>'gmail co...@gmail.com',
'password'=>'my password');
$this->Email->sendAs = 'html';
$this->Email->delivery = 'smtp';
$this->Email->to = "gmail co...@gmail.com";
$this->Email->subject = 'Welcome to our CakePHP';
$this->Email->from = 'geneller naranjo ';
$this->Email->sendAs = 'html';
if($this->Email->send()){
$this->log(__CLASS__.':'.__FUNCTION__.':'.__LINE__."
NOerrores",LOG_DEBUG);
}
$this->log(__CLASS__.':'.__FUNCTION__.':'.__LINE__."
errores",LOG_DEBUG);
$this->log($this->Email->smtpError,LOG_DEBUG);
   }

when i look the log, i see this:

2010-02-19 13:55:55 Debug: RegistersController:sendEmail:68 errores

that's why i confirm that its not sendind and discard the gmail smtp

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: ACL controlled and slow performance

2010-02-19 Thread cakeFreak
Do you mean you specify InnoDB actions on delete etc?

Dan

On 15 Feb, 13:57, Jon Bennett  wrote:
> Hi Daniel,
>
> > Just a question: why did you opt for InnoDB tables rather than MyISAM?
>
> Always use InnoDB for data integrity.
>
> J
>
> --
> jon bennett -www.jben.net- blog.jben.net

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Google Chrome Frame - Sessions

2010-02-19 Thread greg2000
I figured it out. Google Chrome Frame changes the User Agent for only
some of the hits and this was screwing with my installation of Cake's
session management.

On Feb 18, 5:03 pm, greg2000  wrote:
> I've run into a very strange problem and I am curious if anyone else
> is having a similar problem.
>
> If a user:
>
>    *  is using one of my CakePHP websites (1.1 and 1.2 on different
> sites)
>
>    and
>
>    *  is using IE8 with Google ChromeFrame installed
>
>    and
>
>    * refreshes any page once logged in
>
> ... the session dies and they are logged out. If the user is just
> clicking through the site and selecting the same page..then the user
> is not logged out.
>
> If a user disables the ChromeFrame addon, then the site does not
> behave this way.
>
> I'm baffled why the session would be lost during refreshes, but not
> through normal navigation.
>
> Has anyone else experienced this type of issue with the ChromeFrame
> addon?
>
> btw...CAKE_SESSION_SAVE is set to php

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


ACL + habtm groups

2010-02-19 Thread cakeFreak
Did you guys manage to handle HABTM relations with ACL?

Like User->habtm('Groups')?

And then you assign a user to multiple groups and permissions to
groups?

Dan

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Pop-up Form in Ajax

2010-02-19 Thread WebbedIT
I used ModalBox to do something similar and wrote up an article on my
blog, it should be of use:

http://webbedit.co.uk/blog_posts/view/tutorial-cakephp-modalbox-crud

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Please answer query fast

2010-02-19 Thread WebbedIT
I suggest you read the book and give it a try, when you have problems,
then come to the community and ask for assistance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Please answer query fast

2010-02-19 Thread John Andersen
1) Install CakePHP
2) Modify the home.ctp file in the views/pages directory.
3) Run it using "yourwebaddress"
Voila :)

Ok, maybe your question is somewhat more serious, so please clarify!
Do you have CakePHP installed and in working condition?
Are you using a database?
What else do you need?

Enjoy,
   John

On Feb 19, 1:41 pm, Ruchi  wrote:
> How to develop program in cakephp and run it?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Pop-up Form in Ajax

2010-02-19 Thread gopallal
Hi All,
  I am new for cakephp as well as for ajax also. So please help me
out.
My requirement is as below:
 In my ctp, there will be one link. When user will click on this
link, he/she should get a pop-up form.
This form will be submitted by user. Again based on that form data, he/
she should get a success or failure response in a pop-up window(with
OK button).
  These all should be in Ajax because main ctp
file with the link should not get refreshed.

How should I approach this problem? Any tutorial, link or code example
will be very helpful for me.

Thanks in advance.


Regards,
Gopal lal

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Please answer query fast

2010-02-19 Thread Ruchi
How to develop program in cakephp and run it?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Extending Component. Error

2010-02-19 Thread John Andersen
Please show the code in your new class, specially the constructor
code.
Enjoy,
   John

On Feb 19, 1:12 am, dtirer  wrote:
> I'm trying to extend the email component as they do in this 
> tutorial:http://cakebaker.42dh.com/2009/09/08/extending-cakephps-core-components/
>
> However I keep getting this error: Fatal error: Call to undefined
> method stdClass::send() in /home/neighborrow/nyudev.neighborrow.com/
> app/controllers/components/neighborrow_email.php on line 20
>
> Any idea why?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: check if a view file exists

2010-02-19 Thread anl hp
this is an example I use in one of my plugins

   $file = new File(CSS_URL . 'cpanel.css');

$css = $this->Html->css('/cpanel/css/cpanel.css');

if ($file->exists()) {
$css = $this->Html->css('cpanel.css');
   }

you should instead use the constant VIEWS


--
anl


On Fri, Feb 19, 2010 at 2:03 PM, Ernesto  wrote:

> Hello.
>
> is there a way to check if a view file ([view].ctp) exists?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> 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+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


check if a view file exists

2010-02-19 Thread Ernesto
Hello.

is there a way to check if a view file ([view].ctp) exists?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Set::sort() fail

2010-02-19 Thread TCarlsen
of course thx a million

$result = Set::sort($statuses['Statuses']['Status'], '{n}.id',
'desc'); did the trick

Thx WebbedlT

On Feb 19, 11:45 am, WebbedIT  wrote:
> I don't think Set::sort can sort that array due to it having type and
> Status at the top level.  Try
>
> $result = Set::sort($statuses['Status'], '{n}.id', 'desc');
>
> HTH
>
> Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Set::sort() fail

2010-02-19 Thread WebbedIT
I don't think Set::sort can sort that array due to it having type and
Status at the top level.  Try

$result = Set::sort($statuses['Status'], '{n}.id', 'desc');

HTH

Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Set::sort() fail

2010-02-19 Thread TCarlsen
array looks like this http://gist.github.com/307590 and trying to sort
it by id in this case but I wanna sort be created_at in the end so the
new twits are first (the to twitter acc are mixet in order)

On Feb 19, 11:04 am, WebbedIT  wrote:
> Not quite sure what you want the final array to look like?  What does
> the array look like before the sort and how do you want it to look
> after the sort?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Set::sort() fail

2010-02-19 Thread WebbedIT
Not quite sure what you want the final array to look like?  What does
the array look like before the sort and how do you want it to look
after the sort?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Pagination: URL for last page

2010-02-19 Thread WebbedIT
As I stated earlier, you can't know off-site the number of the last
post/page so create an action such as /forum/thread/#id/lastPost or /
forum/thread/#id/lastPage which lets you use cake to determine the
last post/page and display it.

HTH

Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: How to diplay multiple address in google map using php.

2010-02-19 Thread WebbedIT
That's short and sweet?!?  Not sure how it;s related to CakePHP?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Multiple Content Areas

2010-02-19 Thread WebbedIT
Lol, I think Zaky really likes elements as I am seeing that short post
of his more and more, and probably rightly so as this does seem to be
the commonly accepted way to tackle the issue of sidebars.

However, can I throw what I am doing open for discussion so my errors
can be corrected if necessary.  It uses elements, but not sure if I am
passing in data in the commonly accepted manner.

I have an element called side_content.ctp:
element($row['element'], array('data'=>$row['data']));
  endforeach;
endif;

I then pass that a data array with something like the following
Array
(
[0] => Array
(
[element] => cause_profile_summary
[data] => array('Cause'=>array('name'=>'Stokenchurch Dog
Rescue', ...))
)
[1] => Array
(
[element] => sub_menu_cause
[data] => array('Cause'=>array('page_count'=>3, ...))
)
[2] => Array
(
[element] => latest_friends
[data] => array('Freind'=>array(0=>array('name'=>'Friend
One', ...)))
)

)

I form the array to be passed to the side_content element in my
controller pulling data in from related models, then in the view call
element('side_content',
array('data'=>$sideContent)); ?>

Is this a sensible approach to dynamic content for side bars or should
I dump all of this and revert to:

http://book.cakephp.org/view/434/requestAction

I stayed clear of requestAction() previously as there was a lot of
discussion over performance issues, but now the book certainly seems
to reccomend it for this purpose.

Sorry to hijack the thread, but hopefully this lot should be a lot of
use in what you're doing.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Multiple forms on single page

2010-02-19 Thread Marco
I don't know if I understood your question but what I use when I need
a step by step form is this component:

http://bakery.cakephp.org/articles/view/wizard-component-1-2-1

On Feb 18, 7:11 pm, McScreech  wrote:
> Is it possible to define several _independent_ data entry forms on a
> single page where each one posts data back to different models? Maybe
> with a redirect back to the same multi-form page on each Submit until
> a 'Done' button is clicked?
>
> And of course, if so, any suggestions on how to do so?
>
> DaveT.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: adding ajax inputs to a form

2010-02-19 Thread WebbedIT
Sounds like you're having an identical problem to:
http://groups.google.com/group/cake-php/browse_thread/thread/94375425c8c57634

Maybe worth having a chat with that poster as unsure if he resolved it.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: YASAQ Yet Another SaveAll Question

2010-02-19 Thread WebbedIT
I can't get my head around your schema due to the non-standard naming
of your tables and models and the non-standard attempt at what me and
John think is a  HABTM relationship.  John has dug deep to try and get
his head around your schema, but I'm still very confused by it.

Also, in your schema you do not always follow the same rules as most
models have a singular table name such as Father having a table of
father, yet the Pop model has a table of pops.

My opinion, if it is indeed worth anything, is that if I want help
from the community then I should make their job easier by following
Cake's conventions so they don't have to decipher an alternate
convention before being able to tackle my issue.  If not, I risk the
situation where people simply don't bother trying to help and limit my
chances of getting a resolution.

Am I right in thinking your primary models are, using Cakes
conventions:

Clone (table: clones)
Population (table: populations)
Mother (table: mothers)
Father (table: fathers)

My thinking was that you created the Mated model to link Population to
a Mother and Father, and that if each Clone has both a mother_id and
father_id then why not have Population hasMany Clone which in turn
belongsTo Mother and Father?  But, then I spotted that Clone hasMany
Mother and Father?

Now for a science question, how can one Clone have many Mothers and
Fathers?  Anyway, back to database schemas, if this is the requirement
then I would imagine that Population could HABTM Mother and Father.

However, this is where I lose the plot as your Mated model clearly
belongsTo one Mother and Father, but the confusing thing is rather
than link Mated directly to your Mother and Father models you're
trying to create an impossible link to non-existent fields in the
Clone table (Clone.mother_id and Clone.father_id shouldn't exist as
you have defined that Clone hasMany Mother and Father meaning the
foreign keys in those relationships are Mother.clone_id and
Father.clone_id).

To save yourself a lot of headaches, you really need to make sense of
the schema before moving onto creating forms and saves.

HTH

Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Multiple forms on single page

2010-02-19 Thread WebbedIT
It's possible, as is near enough anything, but without a good amount
of detail on the amount of models concerned and how they are related
it's hard to give you an answer with any sort of context.

Have you tried doing this and failed, if so what direction did you
take and what problems did you face?  I would imagine this would lend
itself to Ajax quite well, but finding it hard to imagine a single
pages with multiple forms which you can fill in in no particular order
then click done.

I would expect if this is a multi-step form to still have to go
through each form in a logical order if the models are linked, and if
they are not, why do they exist on the same multi-form page?!?

Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Using saveAll to insert new fields, update old fields

2010-02-19 Thread WebbedIT
Often you can get so hung up on thinking the problem is with Cake that
you forget to thoroughly check your HTML.  Been guilty of this myself,
glad you found it :)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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


Re: Using UNIX_TIMESTAMP in DB queries (handling dates in controllers)

2010-02-19 Thread WebbedIT
I'm interested in the answer to this as I am curretly being lazy and
have a convertDate() function in my app_controller and app_model as
follows

function convertDate($input) {
  if ($input) {
$inputExplode = explode(' ', $input);
$dateExplode = explode('-', $inputExplode[0]);
$output = $dateExplode[2]."-".$dateExplode[1]."-".$dateExplode[0];
$output .= isset($inputExplode[1]) ? " ".$inputExplode[1] : "";
return $output;
  }
}

I would imagine that you should be using a behaviour with afterFind
and beforeSave methods, but I'm yet to dabble in self-created
behaviours and controllers.

Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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