Re: IDE

2010-12-23 Thread Shinya Koizumi
Does any know if they provide a plugin for pdt  or zend studio

Sent from my iPhone

On Dec 22, 2010, at 6:08 PM, huoxito huox...@gmail.com wrote:

 I use Komodo Edit, free version, it has a nice plugin for cakephp with 
 autocomplete, it get a little bit slow sometimes on ubuntu but it's great. 
 Sometimes I try to use gedit but it lacks a lot of interesting stuff like 
 'ctrl + y' to redo things, tabbing the code is not so good.
 
 Also some good programmers I know have strongly encouraged me to use vim. I 
 guess I need to take a huge look at 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

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: IDE

2010-12-23 Thread Angel Robert Marquez
*linux*
vim
gedit

*mac OS*
vim
textmate
coda

*windows*
notepad2
eclipse
aptana





On Wed, Dec 22, 2010 at 12:11 AM, fadhli e.fad...@gmail.com wrote:

 netbeans


 On Wed, Dec 22, 2010 at 12:32 PM, Amit Badkas amit.sanis...@gmail.comwrote:

 Hi,

 I use easy eclipse for PHP (
 http://www.easyeclipse.org/site/distributions/php.html). I have also used
 Aptana IDE once but found easy eclipse better.

 Amit Badkas

 PHP Applications for E-Biz: http://www.sanisoft.com



 On Tue, Dec 21, 2010 at 8:27 PM, Kristofer krishop...@gmail.com wrote:

 What IDE do people typically use with CakePHP?  I've been doing stuff
 from the Linux command line using vim for so long.  I'd like something
 more graphical that (hopefully) supports SVN.  Looking for more point-
 and-click.  :)

 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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@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


Re: IDE

2010-12-23 Thread Shinya Koizumi
Thanks

Sent from my iPhone

On Dec 23, 2010, at 1:09 AM, Angel Robert Marquez angel.marq...@gmail.com 
wrote:

 linux
 vim
 gedit
 
 mac OS
 vim
 textmate
 coda
 
 windows
 notepad2
 eclipse
 aptana
 
 
 
 
 
 On Wed, Dec 22, 2010 at 12:11 AM, fadhli e.fad...@gmail.com wrote:
 netbeans
 
 
 On Wed, Dec 22, 2010 at 12:32 PM, Amit Badkas amit.sanis...@gmail.com wrote:
 Hi,
 
 I use easy eclipse for PHP 
 (http://www.easyeclipse.org/site/distributions/php.html). I have also used 
 Aptana IDE once but found easy eclipse better.
 
 Amit Badkas
 
 PHP Applications for E-Biz: http://www.sanisoft.com
 
 
 
 On Tue, Dec 21, 2010 at 8:27 PM, Kristofer krishop...@gmail.com wrote:
 What IDE do people typically use with CakePHP?  I've been doing stuff
 from the Linux command line using vim for so long.  I'd like something
 more graphical that (hopefully) supports SVN.  Looking for more point-
 and-click.  :)
 
 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
 
 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

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: IDE

2010-12-23 Thread Angel Robert Marquez
np

i would highly recommend installing a linux distro and using vim with the
terminator terminal

yum..

[?]

On Thu, Dec 23, 2010 at 1:19 AM, Shinya Koizumi sh.koiz...@gmail.comwrote:

 Thanks

 Sent from my iPhone

 On Dec 23, 2010, at 1:09 AM, Angel Robert Marquez angel.marq...@gmail.com
 wrote:

 *linux*
 vim
 gedit

 *mac OS*
 vim
 textmate
 coda

 *windows*
 notepad2
 eclipse
 aptana





 On Wed, Dec 22, 2010 at 12:11 AM, fadhli  e.fad...@gmail.com
 e.fad...@gmail.com wrote:

 netbeans


 On Wed, Dec 22, 2010 at 12:32 PM, Amit Badkas  amit.sanis...@gmail.com
 amit.sanis...@gmail.com wrote:

 Hi,

 I use easy eclipse for PHP 
 (http://www.easyeclipse.org/site/distributions/php.html
 http://www.easyeclipse.org/site/distributions/php.html). I have also
 used Aptana IDE once but found easy eclipse better.

 Amit Badkas

 PHP Applications for E-Biz: http://www.sanisoft.com
 http://www.sanisoft.com



 On Tue, Dec 21, 2010 at 8:27 PM, Kristofer  krishop...@gmail.com
 krishop...@gmail.com wrote:

 What IDE do people typically use with CakePHP?  I've been doing stuff
 from the Linux command line using vim for so long.  I'd like something
 more graphical that (hopefully) supports SVN.  Looking for more point-
 and-click.  :)

 Check out the new CakePHP Questions site http://cakeqs.org
 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
 cake-php@googlegroups.com
 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php?hl=en
 http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org
 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
 cake-php@googlegroups.com
 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php?hl=en
 http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org
 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
 cake-php@googlegroups.com
 To unsubscribe from this group, send email to
  cake-php%2bunsubscr...@googlegroups.com
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php?hl=en
 http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org
 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
 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
 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.comcake-php%2bunsubscr...@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
B60.gif

Re: Complex LIKE Conditions in CakePHP

2010-12-23 Thread Dr. Loboto
array(
  array('Product.short_description LIKE' = %_ $plural _%),
  array('Product.short_description LIKE' = %_ $singular _%)
)

On 22 дек, 18:35, Christopher Geheran cgehe...@gmail.com wrote:
 So, I am attempting to have multiple like conditions on the same
 field, as follows, and Im sending this into the pagination class.

 array(
    'Product.short_description LIKE' = array(%_ $plural _%, %_
 $singular _%)
 )

 Since the above is an array, cakephp is attempting to add the IN
 clause into the sql, which makes perfect sense-- but, obviously does
 not work for a LIKE condition.

 Since its an array, you can not do this:

 array(
    'Product.short_description LIKE' = %_ $plural _%,
    'Product.short_description LIKE' = %_ $singular _%
 )

 You cannot do this because the Keys are the same, so you only end up
 with the last key in the SQL. I attempted making the entire thing an
 array, like this:

 array(
    '0'='Product.short_description LIKE' = %_ $plural _%,
    '1'='Product.short_description LIKE' = %_ $singular _%
 )

 Cake didn't seem to like that either.

 Any suggestions?

 Thanks,

 Chris

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


does $this-render act as die in 1.2?

2010-12-23 Thread Stephen
Simple question.

I'm reworking some of my code to make it more efficient and user friendly
(Fat Models etc)

I'm wondering, does $this-render() stop cake from reading further on in the
controller action? (I.e. Act like running die() )

Cheers

-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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: does $this-render act as die in 1.2?

2010-12-23 Thread Jeremy Burns | Class Outfit
What happens when you try?

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 23 Dec 2010, at 10:17, Stephen wrote:

 Simple question.
 
 I'm reworking some of my code to make it more efficient and user friendly 
 (Fat Models etc)
 
 I'm wondering, does $this-render() stop cake from reading further on in the 
 controller action? (I.e. Act like running die() )
 
 Cheers
 
 -- 
 Kind Regards
  Stephen @ NinjaCoderMonkey
 
  www.ninjacodermonkey.co.uk
 
 
 
 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


Re: does $this-render act as die in 1.2?

2010-12-23 Thread Stephen
I'm pretty sure it will stop executing any further but unfortunately I'm
reworking a process and haven't finished my amendments to test.

It's more of a niggle than a problem, anyone know if I need to chuck in some
dies?

On 23 December 2010 10:22, Jeremy Burns | Class Outfit 
jeremybu...@classoutfit.com wrote:

 What happens when you try?

 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 23 Dec 2010, at 10:17, Stephen wrote:

 Simple question.

 I'm reworking some of my code to make it more efficient and user friendly
 (Fat Models etc)

 I'm wondering, does $this-render() stop cake from reading further on in
 the controller action? (I.e. Act like running die() )

 Cheers

 --
 Kind Regards
  Stephen @ NinjaCoderMonkey

  www.ninjacodermonkey.co.uk



 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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: does $this-render act as die in 1.2?

2010-12-23 Thread Amit Badkas
Hi,

No, $this-render() doesn't stop execution.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Thu, Dec 23, 2010 at 3:47 PM, Stephen step...@ninjacodermonkey.co.ukwrote:

 Simple question.

 I'm reworking some of my code to make it more efficient and user friendly
 (Fat Models etc)

 I'm wondering, does $this-render() stop cake from reading further on in
 the controller action? (I.e. Act like running die() )

 Cheers

 --
 Kind Regards
  Stephen @ NinjaCoderMonkey

  www.ninjacodermonkey.co.uk


  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.comcake-php%2bunsubscr...@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


Re: does $this-render act as die in 1.2?

2010-12-23 Thread Stephen
Thanks for the heads up.

On 23 December 2010 10:25, Amit Badkas amit.sanis...@gmail.com wrote:

 Hi,

 No, $this-render() doesn't stop execution.

 Amit Badkas

 PHP Applications for E-Biz: http://www.sanisoft.com



 On Thu, Dec 23, 2010 at 3:47 PM, Stephen 
 step...@ninjacodermonkey.co.ukwrote:

 Simple question.

 I'm reworking some of my code to make it more efficient and user friendly
 (Fat Models etc)

 I'm wondering, does $this-render() stop cake from reading further on in
 the controller action? (I.e. Act like running die() )

 Cheers

 --
 Kind Regards
  Stephen @ NinjaCoderMonkey

  www.ninjacodermonkey.co.uk


  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.comcake-php%2bunsubscr...@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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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


Strange problem setting a variable

2010-12-23 Thread Stephen
Hi there

I have the following controller action which is accessed via ajax (select
box, observeField)

http://pastie.org/1400270

And here are the custom model functions it accesses

http://pastie.org/1400273

I am getting the following error when I access this function from the view:

*Notice (8): Undefined variable: category_label
[APP\views\orders\add_category.ctp, line 4]

*Does anybody have any idea why $this-set(compact( ... doesn't seem to be
sending the variable to the view?

-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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 use transactions in cakephp

2010-12-23 Thread Zeu5
hi there,

i have a 7 model transaction that needs to be rolled back whenever 1
of the tables do not commit properly.

i found this but i am not sure how it works.

http://book.cakephp.org/view/1633/Transactions

I am vaguely familiar with MySQL transaction but prefer to follow cake
way of doing things.

Appreciate it with any advice rendered.

Thank you.

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 use transactions in cakephp

2010-12-23 Thread Jon Bennett
 i have a 7 model transaction that needs to be rolled back whenever 1
 of the tables do not commit properly.

 i found this but i am not sure how it works.

 http://book.cakephp.org/view/1633/Transactions

 I am vaguely familiar with MySQL transaction but prefer to follow cake
 way of doing things.

Use innodb and connect your keys/tables correctly.
Use saveAll not save and it will wrap all the SQL into a single transaction.

hth

Jon

-- 
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: Strange problem setting a variable

2010-12-23 Thread Stephen
Fixed it

I am getting the following error when I access this function from the view:

 *Notice (8): Undefined variable: category_label
 [APP\views\orders\add_category.ctp, line 4]

 *Does anybody have any idea why $this-set(compact( ... doesn't seem to
 be sending the variable to the view?


It seems that when you use compact with a variable that contains an
underscore, the variable will become Inflected.

category_label becomes $categoryLabel in the view.

Doh.

-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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 use transactions in cakephp

2010-12-23 Thread Zeu5
Hi Jon

 Use innodb and connect your keys/tables correctly.
 Use saveAll not save and it will wrap all the SQL into a single transaction.

Are you suggesting an alternative to 
http://book.cakephp.org/view/1633/Transactions
?

Unfortunately the 7 models are not interrelated to each other, some
are of course related.

So i am not sure if saveAll allows that non interrelated models.

Thank you.

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


A Deeper Insights to Database Config Settings

2010-12-23 Thread John Maxim
class DATABASE_CONFIG {

var $default = array(
'driver' = 'mysql',
'persistent' = false,
'host' = 'localhost',
'login' = 'root',
'password' = '',
'database' = 'blog',
'prefix' = '',
);

var $test = array(
'driver' = 'mysql',
'persistent' = false,
'host' = 'localhost',
'login' = 'user',
'password' = 'password',
'database' = 'test_database_name',
'prefix' = '',
);
}

-
Dear veterans,

Above is a sample database configuration. Can we set it to connect to
more than a database ? Is it fixed to only one ? What I learned is
Cake uses the default array by the name; whatever setting inside, var
$default = array();

What's the second array for?, var $test = array();  ? I accidentally
entered some wrong setting for this second array and it doesn't affect
the $default performance. Explanation ?

If I want to test many tutorials' codes, I would not be able to change
the default setting to another database, hence creating another table,
e.g. Members, instead of Users if I already have Users table in the
existing database which my Cake's default config is pointing to.
Therefore, the Controller, Model, and View would all have to be
different, by the file named, e.g., controllers
\members_controller.php, models\member.php, views\members\index.ctp

Is this how we test codes? because it may flood the MVC with many
names that may not be reflective, e.g. what if I am testing the 3rd
code by the table name Users as well ? and the 4th code with same
table's name.. and so on..?

How do we usually go about this, suggested way?

Thanks in advance.



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: A Deeper Insights to Database Config Settings

2010-12-23 Thread Stephen
Hi John

You have 2 databases, one is your development/production database
($default), the other is your test environment (For testing your app).

See: http://book.cakephp.org/view/1196/Testing

You can change the driver of your connection, i.e. use sqlite rather than
mysql

As for testing users and then members, it sounds like you're just playing
with the code to become familiar.
This isn't the normal way, I would suggest building a full application and
challenge yourself to overcome obstacles.

-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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: A Deeper Insights to Database Config Settings

2010-12-23 Thread euromark
http://www.dereuromark.de/2010/08/17/development-vs-productive-setup/
as you can see my app switches the configs based on the server

it is even possible to select a specific datasource in the controller
actions etc.
for twitter datasources, for example.

you can also see that i use a special prefix for testing
(if you use the default config your app tables get filled with
testing stuff
you really would want to avoid that! I once tried that and it even
deleted some of the tables completely (with all data of course).


On 23 Dez., 13:31, John Maxim goog...@gmail.com wrote:
 class DATABASE_CONFIG {

         var $default = array(
                 'driver' = 'mysql',
                 'persistent' = false,
                 'host' = 'localhost',
                 'login' = 'root',
                 'password' = '',
                 'database' = 'blog',
                 'prefix' = '',
         );

         var $test = array(
                 'driver' = 'mysql',
                 'persistent' = false,
                 'host' = 'localhost',
                 'login' = 'user',
                 'password' = 'password',
                 'database' = 'test_database_name',
                 'prefix' = '',
         );

 }

 -
 Dear veterans,

 Above is a sample database configuration. Can we set it to connect to
 more than a database ? Is it fixed to only one ? What I learned is
 Cake uses the default array by the name; whatever setting inside, var
 $default = array();

 What's the second array for?, var $test = array();  ? I accidentally
 entered some wrong setting for this second array and it doesn't affect
 the $default performance. Explanation ?

 If I want to test many tutorials' codes, I would not be able to change
 the default setting to another database, hence creating another table,
 e.g. Members, instead of Users if I already have Users table in the
 existing database which my Cake's default config is pointing to.
 Therefore, the Controller, Model, and View would all have to be
 different, by the file named, e.g., controllers
 \members_controller.php, models\member.php, views\members\index.ctp

 Is this how we test codes? because it may flood the MVC with many
 names that may not be reflective, e.g. what if I am testing the 3rd
 code by the table name Users as well ? and the 4th code with same
 table's name.. and so on..?

 How do we usually go about this, suggested way?

 Thanks in advance.

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: Strange problem setting a variable

2010-12-23 Thread euromark
only in cake1.2
in cake1.3 this is fixed

On 23 Dez., 12:56, Stephen step...@ninjacodermonkey.co.uk wrote:
 Fixed it

 I am getting the following error when I access this function from the view:

  *Notice (8): Undefined variable: category_label
  [APP\views\orders\add_category.ctp, line 4]

  *Does anybody have any idea why $this-set(compact( ... doesn't seem to
  be sending the variable to the view?

 It seems that when you use compact with a variable that contains an
 underscore, the variable will become Inflected.

 category_label becomes $categoryLabel in the view.

 Doh.

 --
 Kind Regards
  Stephen @ NinjaCoderMonkey

  www.ninjacodermonkey.co.uk

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 use transactions in cakephp

2010-12-23 Thread Jon Bennett
 Unfortunately the 7 models are not interrelated to each other, some
 are of course related.

 So i am not sure if saveAll allows that non interrelated models.

I've only used transactions in cake to save related data, though I
believe once a transaction has been triggered, it will wrap any
subsequent saveAll's as well - not certain on that, worth checking!

not used the datasource way of doing it, sorry.

hth

Jo

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


Custom SQL and Populating Form

2010-12-23 Thread Dan
Here is some code:

Model:
class Project extends AppModel {
var $name = 'Project';
var $primaryKey = 'project_id';


function customFunction($id=0){
$sql = custom sql... where project_id = ?;
$params = array( customValidation($id) );
return $this-query($sql, $params, false);
}
}

Controller:
class ProjectsController extends AppController {
var $name = 'Projects';

function test($id=0){
$this-data = $this-Project-testByID($id);
}
}

View:
echo $form-create(Project);
echo $form-input('project_name');
echo $form-end();

ISSUE:

The controller's action with the custom SQL doesn't populate the form.
I figured out that It's due to the array not being in the proper
format:

Custom query: Array ( [0] = Array (...)
CakePHP built in actions (ie. read() ): Array ( [Project] = Array
(...)

Is there a way to have the custom SQL be returned in the proper format
and populate the form?

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 use transactions in cakephp

2010-12-23 Thread Zeu5
Alright thanks!

On Dec 23, 8:55 pm, Jon Bennett jmbenn...@gmail.com wrote:
  Unfortunately the 7 models are not interrelated to each other, some
  are of course related.

  So i am not sure if saveAll allows that non interrelated models.

 I've only used transactions in cake to save related data, though I
 believe once a transaction has been triggered, it will wrap any
 subsequent saveAll's as well - not certain on that, worth checking!

 not used the datasource way of doing it, sorry.

 hth

 Jo

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


GoogleApi

2010-12-23 Thread Gazmend Nrecaj
Hi,

I want to use a GoogleMap in my App, has anyone Information how can I get
this .
I'm using CakePHP 1.3

Thanks

Gazi

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: A Deeper Insights to Database Config Settings

2010-12-23 Thread John Maxim
Thanks Stephen. I'd build a full working app. I took the challenge.

Hi euromark, your tutorial seems hard for me. I dare not take the
risks changing stuff too much maybe I should get more familiar first.
I'd check the link back. Thanks for it.


On Dec 23, 8:50 pm, euromark dereurom...@googlemail.com wrote:
 http://www.dereuromark.de/2010/08/17/development-vs-productive-setup/
 as you can see my app switches the configs based on the server

 it is even possible to select a specific datasource in the controller
 actions etc.
 for twitter datasources, for example.

 you can also see that i use a special prefix for testing
 (if you use the default config your app tables get filled with
 testing stuff
 you really would want to avoid that! I once tried that and it even
 deleted some of the tables completely (with all data of course).

 On 23 Dez., 13:31, John Maxim goog...@gmail.com wrote:

  class DATABASE_CONFIG {

          var $default = array(
                  'driver' = 'mysql',
                  'persistent' = false,
                  'host' = 'localhost',
                  'login' = 'root',
                  'password' = '',
                  'database' = 'blog',
                  'prefix' = '',
          );

          var $test = array(
                  'driver' = 'mysql',
                  'persistent' = false,
                  'host' = 'localhost',
                  'login' = 'user',
                  'password' = 'password',
                  'database' = 'test_database_name',
                  'prefix' = '',
          );

  }

  -
  Dear veterans,

  Above is a sample database configuration. Can we set it to connect to
  more than a database ? Is it fixed to only one ? What I learned is
  Cake uses the default array by the name; whatever setting inside, var
  $default = array();

  What's the second array for?, var $test = array();  ? I accidentally
  entered some wrong setting for this second array and it doesn't affect
  the $default performance. Explanation ?

  If I want to test many tutorials' codes, I would not be able to change
  the default setting to another database, hence creating another table,
  e.g. Members, instead of Users if I already have Users table in the
  existing database which my Cake's default config is pointing to.
  Therefore, the Controller, Model, and View would all have to be
  different, by the file named, e.g., controllers
  \members_controller.php, models\member.php, views\members\index.ctp

  Is this how we test codes? because it may flood the MVC with many
  names that may not be reflective, e.g. what if I am testing the 3rd
  code by the table name Users as well ? and the 4th code with same
  table's name.. and so on..?

  How do we usually go about this, suggested way?

  Thanks in advance.

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: A Deeper Insights to Database Config Settings

2010-12-23 Thread AD7six


On Dec 23, 1:50 pm, euromark dereurom...@googlemail.com wrote:
 http://www.dereuromark.de/2010/08/17/development-vs-productive-setup/

FWIW I used to do the above sort of thing and would say now: bad
idea.

Why should your test/staging/live site know or have you development db
connection data. why should your staging site have your live db
connection settings.

To use a recent and relevant examlpe: Think about what happend to
github recently - through a series of errors the live db got truncated
from running a test on a CI server (https://github.com/blog/744-today-
s-outage) - that's only possible if the CI server has the access to
the live db - which by design you're providing if you provide with the
above example.

IMO what you're solving in the article is a hack for simply /not/
using the same database.php (and core.php for that matter) file in all
environments. Just don't add it to your repo, don't send it if you're
ftp/rsyncing files around, setup on first use and the problem of what
evironment should I use goes away.

The technique is certainly useful - but not IMO for the use given.

AD

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: GoogleApi

2010-12-23 Thread AD7six


On Dec 23, 12:26 pm, Gazmend Nrecaj gazmendnre...@googlemail.com
wrote:
 Hi,

 I want to use a GoogleMap in my App, has anyone Information how can I get
 this .

maybe google does.

 I'm using CakePHP 1.3

Good for you ;) however any google maps tutorial you google and read
is relevant, as what you're using on the server doesn't make much
difference.

AD

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


Creating a Table's Name

2010-12-23 Thread John Maxim
Hi,

Isn't it better to create a table with the Name: acos_aros,

 than; Name: aros_acos

I remember reading this in the cookbook on alphabetical order.

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: Changing The Layout Design

2010-12-23 Thread John Maxim
Thanks everyone, I'm moving to work on this soon.

On Dec 23, 2:27 am, ⎝⏠⏝⏠⎠ Kuldeep Singh PHP FreeLancer Web
Developer,SEO Services kuldeepsingh.sadio...@gmail.com wrote:
 You need to put the relation of the favicon in the HTML

 On 22 December 2010 23:55, Ryan Schmidt google-2...@ryandesign.com wrote:



  On Dec 22, 2010, at 04:53, Mike Karthauser wrote:
   On Wed, December 22, 2010 10:29 am, John Maxim wrote:
   Is there a way to replace the default favicon ?

   yes. edit css.

  Uh... no. CSS files have nothing to do with the favicon. The favicon is
  simply the file favicon.ico which you place directly in your webroot.

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comcake-php%2bunsubscr...@googlegroups.comFor
   more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en

 --
 Kuldeep Singh...
 WebDeveloper And Freelancer Kay Sellers,
 Owner:http://kaysellers.com
 +9199142-41733,*+91-9501710226(Allways Switched On)*
 Skype ID : kaydeveloper
 Yahoo:deepulove123321
 On Twitter:http://twitter.com/ruhisoftect
 We Provide:-
 Adobe AIR,E-Commerce PHP Web and Desktop Applications,Wordpress
 Themes,Drupal Themes,Joomla Templates,Joomla Components Modules
 Plugins,Java,ERP,MLM Development and Logic Design,Ajax,Jquery,RSS
 Feeds,PhotoShop,Flex,Payment Solutions.

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: call in to variables...

2010-12-23 Thread cricket
On Wed, Dec 22, 2010 at 8:56 PM, chris...@yahoo.com chris...@yahoo.com wrote:

 no there is no unique username, this is a social network site with
 lots of users ;) I guess,... this still in construction...

If username is not unique your favorites action will never work
properly as it's only param is $username. You'll either need to ensure
that usernames are unique across your DB or use something else with
which to get a particular user's favorites.

I haven't gone through all of your code (frankly, it looks like it
would benefit from a careful re-write, especially moving quite a lot
of it to a model) but, in order to use model::field() you first must
set the model's id. The point of field() is to get the column value
for a particular row. If the model's id is not set, you can't query
that row.

I think $parent_id isn't a good choice for variable name here, as
you're not dealing with the parent Video of another Video. I assume
that it's the User that created the Video, but I'm unsure.

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: does $this-render act as die in 1.2?

2010-12-23 Thread cricket
On Thu, Dec 23, 2010 at 5:25 AM, Stephen step...@ninjacodermonkey.co.uk wrote:
 I'm pretty sure it will stop executing any further but unfortunately I'm
 reworking a process and haven't finished my amendments to test.

 It's more of a niggle than a problem, anyone know if I need to chuck in some
 dies?

What Amit said. And you should only use die() for debugging/error
control. Use return instead. You only want to get out of the action,
not kill the entire process.

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: Strange problem setting a variable

2010-12-23 Thread cricket
On Thu, Dec 23, 2010 at 7:51 AM, euromark dereurom...@googlemail.com wrote:
 only in cake1.2
 in cake1.3 this is fixed

Yes, that was an unwelcome feature. In the meantime, for 1.2.x, you can do:

$this-set(compact('category_label'), false);

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: Custom SQL and Populating Form

2010-12-23 Thread cricket
On Thu, Dec 23, 2010 at 8:38 AM, Dan dannyetdi...@gmail.com wrote:
 Here is some code:

 Model:
 class Project extends AppModel {
    var $name = 'Project';
    var $primaryKey = 'project_id';


        function customFunction($id=0){
                $sql = custom sql... where project_id = ?;
                $params = array( customValidation($id) );
                return $this-query($sql, $params, false);
        }
 }

 Controller:
 class ProjectsController extends AppController {
        var $name = 'Projects';

        function test($id=0){
                $this-data = $this-Project-testByID($id);
        }
 }

 View:
 echo $form-create(Project);
 echo $form-input('project_name');
 echo $form-end();

 ISSUE:

 The controller's action with the custom SQL doesn't populate the form.
 I figured out that It's due to the array not being in the proper
 format:

 Custom query: Array ( [0] = Array (...)
 CakePHP built in actions (ie. read() ): Array ( [Project] = Array
 (...)

 Is there a way to have the custom SQL be returned in the proper format
 and populate the form?

You could build the array yourself based on the result then return
that from your model.

Or, you could use Cake's find() instead. If there's something specific
keeping you from doing that, perhaps there's asimpler workaround than
using query().

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: A Deeper Insights to Database Config Settings

2010-12-23 Thread cricket
On Thu, Dec 23, 2010 at 10:40 AM, AD7six andydawso...@gmail.com wrote:

 IMO what you're solving in the article is a hack for simply /not/
 using the same database.php (and core.php for that matter) file in all
 environments. Just don't add it to your repo, don't send it if you're
 ftp/rsyncing files around, setup on first use and the problem of what
 evironment should I use goes away.

Also, it's worth changing the owner  permissions on these two files
so that you can't accidentally overwrite them with rsync/ftp, but only
directly edit them using sudo in an ssh session.

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: Creating a Table's Name

2010-12-23 Thread cricket
On Thu, Dec 23, 2010 at 11:36 AM, John Maxim goog...@gmail.com wrote:
 Hi,

 Isn't it better to create a table with the Name: acos_aros,

  than; Name: aros_acos

 I remember reading this in the cookbook on alphabetical order.

That's correct. However, that particular table should be aros_acos.
Nobody seems to know why but we all just put it down to, It's ACL.
There are more vexing questions to ponder. :-)

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: Custom SQL and Populating Form

2010-12-23 Thread Dan
So far, I'm simply doing this:

$myarr = $this-query($sql, $params, false);
return $myarr[0];

I have to figure out what to do when there are no records returned.
The index is wrong when that happens.

On Dec 23, 2:50 pm, cricket zijn.digi...@gmail.com wrote:
 On Thu, Dec 23, 2010 at 8:38 AM, Dan dannyetdi...@gmail.com wrote:
  Here is some code:

  Model:
  class Project extends AppModel {
     var $name = 'Project';
     var $primaryKey = 'project_id';

         function customFunction($id=0){
                 $sql = custom sql... where project_id = ?;
                 $params = array( customValidation($id) );
                 return $this-query($sql, $params, false);
         }
  }

  Controller:
  class ProjectsController extends AppController {
         var $name = 'Projects';

         function test($id=0){
                 $this-data = $this-Project-testByID($id);
         }
  }

  View:
  echo $form-create(Project);
  echo $form-input('project_name');
  echo $form-end();

  ISSUE:

  The controller's action with the custom SQL doesn't populate the form.
  I figured out that It's due to the array not being in the proper
  format:

  Custom query: Array ( [0] = Array (...)
  CakePHP built in actions (ie. read() ): Array ( [Project] = Array
  (...)

  Is there a way to have the custom SQL be returned in the proper format
  and populate the form?

 You could build the array yourself based on the result then return
 that from your model.

 Or, you could use Cake's find() instead. If there's something specific
 keeping you from doing that, perhaps there's asimpler workaround than
 using query().

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: Creating a Table's Name

2010-12-23 Thread John Maxim
Thanks cricket. I agree, more challenging stuff there in acl.

On Dec 24, 3:00 am, cricket zijn.digi...@gmail.com wrote:
 On Thu, Dec 23, 2010 at 11:36 AM, John Maxim goog...@gmail.com wrote:
  Hi,

  Isn't it better to create a table with the Name: acos_aros,

   than; Name: aros_acos

  I remember reading this in the cookbook on alphabetical order.

 That's correct. However, that particular table should be aros_acos.
 Nobody seems to know why but we all just put it down to, It's ACL.
 There are more vexing questions to ponder. :-)

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


File upload

2010-12-23 Thread Leandro Montero
Hi there, in these days i had exactly the same problem as described
here

http://groups.google.com/group/cake-php/browse_thread/thread/6fdf4b6937b9912a/93cc444340a09940?#93cc444340a09940
es
The thing is that the solution overthere doesn't work in my
website
Anyone has some clue? I'm completely desperate about this and my
client
really wants to kill me!

Thank you!
Leandro

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: GoogleApi

2010-12-23 Thread ufarukah...@yahoo.com


Sent from my Nokia phone
-Original Message-
From: AD7six
Sent:  23/12/2010 3:43:30 pm
Subject:  Re: GoogleApi



On Dec 23, 12:26 pm, Gazmend Nrecaj gazmendnre...@googlemail.com
wrote:
 Hi,

 I want to use a GoogleMap in my App, has anyone Information how can I get
 this .

maybe google does.

 I'm using CakePHP 1.3

Good for you ;) however any google maps tutorial you google and read
is relevant, as what you're using on the server doesn't make much
difference.

AD

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
Just, download it from google.com

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


HABTM Relations‏ CAKEPHP

2010-12-23 Thread Web Developman
hi

i need save an aditional field in join table, but don't find an
complete example that showing the correct way to do.

the question is as follows:

I have three tables as follow:

authors (id, name, lastname, nationality)
books (id, title)
authors_books(author_id, book_id,description) // Join Table

description is a extra field in the join table that I want to save,
when save an new author.


for their help I will stay very grateful

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: call in to variables...

2010-12-23 Thread chris...@yahoo.com
Hi cricket, Thank You for your reply,

speaking of unique usernames... in fact yes, they are all unique.
i'm not quite understud what Amit meant to be,... yes they are all
unique, and each user has its own Videos, Groups, Blogs, Profile,
Business Profile, etc... and in order to favorite let say I (user1)
want to favorite video that you (user2) have post it in from youtube
or google and have favorite section so I can access with no time. the
clear picture of this,... if its not to much trouble could you please
access http://www.zippopeople.com and please signup to see your
favorite section in My Videos, My Groups, ... this is just a testing
URL and all records will be deleted after all... here is my ../views/
videos/favorites.ctp file, and in order to link to that ORIGINAL VIDEO
that have been posted from your favorites you need to have a some
unique string (i name it $parent['User']['username']) other from
($user_obj['User']['username']) where in my case user_obj is the
User1 and parent is User2. and I have to link it to ORIGINAL video
show page. here is my favorites.ctp file


div style=float: left; margin: 1px 5px 0 0; width: 650px;


div style=float: left; margin: 1px 5px 0 0; width: 650px;

div class=buddy style=float: left; display: block; margin: 0 10px
0 0;
  ?php echo $html-link($photoShow-buddy($user_obj, array('height'
= 36, 'width' = 36)), '/profile/' . $user_obj['User']['username'],
false, false, false) ?

/div


  div style=float: left; display: block;  width: 250px;

  span style=float: left; font-size: 13px; font-weight: normal;
margin-top: 1px;
  ?php echo ucfirst(Inflector::pluralize(__('video', true))) ?: ?
php echo $html-link($user_obj['User']['firstname'] . ' ' .
$user_obj['User']['lastname'], '/profile/' . $user_obj['User']
['username'], array('style' = 'color: #00;')) ?
/span
  div class=clr/div


  span style=float: left; font-size: 12px; font-weight: normal;
margin-top: 2px;

?php if($user_obj['User']['online_status']==0): ?
   ?php echo __('status', true) ?: strongspan style=color:
red;?php echo ucfirst(__('offline now', true)) ?/span/strong
   ?php else: ?
   ?php echo __('status', true) ?: strongspan style=color:
#0EC107;?php echo ucfirst(__('online now', true)) ?/span/
strong
   ?php endif ?
/span

  /div





 div style=float: right; margin: 0 5px 0 0; font-size: 12px; font-
weight: normal; text-align: right;

 span style=float: right; font-size: 12px; font-weight: bold;
text-align: right; margin: 0 0 5px 0;

?php echo $html-link(ucfirst(__('ALL VIDEOS', true)), '/
videos' , array('style' = 'color: #00;')) ?
 /span

div class=clr/div
 span style=float: right; font-size: 14px; font-weight: normal;
text-align: right; margin: 0 0 5px 0;
 ?php if($user-is_authorized($user_obj['User']['id'])): ?
?php echo $html-link(ucfirst(__('my favorites', true)) . ' - ' .
$user_obj['User']['video_favorites'], '/videos/favorites/' .
$user_obj['User']['username']) ?
  |  ?php endif ?

  ?php echo $html-link(ucfirst(Inflector::pluralize(__('video',
true))) . ' ' . $user_obj['User']['firstname'] . ' ' .
$user_obj['User']['lastname'] . ' - ' . $user_obj['User']['videos'], '/
videos/index/' . $user_obj['User']['username']) ?

/span
 /div


div class=clr/div


div style=float: left; display: block; font-size: 13px; font-
weight: normal; margin: 10px 0 10px 46px; position: relative;

span class=sort?php echo ucfirst(__('sort by', true)) ?/
span:


?php echo $paginator-sort(__('added date', true), 'created',
array('model' = 'VideoFavorite', 'escape' = false, 'url' =
am($url_options, array('direction' = 'desc', 'page' = 1)), 'class'
= $application-paginator_order() == 'created' ? 'selected' : '')) ?
 -
?php echo $paginator-sort(__('alphabetically', true), 'name',
array('model' = 'VideoFavorite', 'direction' = 'desc', 'escape' =
false, 'url' = am($url_options, array('direction' = 'asc', 'page' =
1)), 'class' = $application-paginator_order() == 'name' ?
'selected' : '')) ?
     

  ?php echo $html-link(ucfirst(__('videos', true)) . ' - ' .
$this-params['paging']['VideoFavorite']['count'], '/videos/index/' .
$user_obj['User']['username'], array('class' = 'photos')) ?
   

  ?php if(array_key_exists('date', $this-params['pass'])): ?
  ?php echo $html-link(ucfirst(__('added date', true)) . ' : ' .
$application-daysAgo($time, strftime('%Y-%m-%d', strtotime($this-
params['pass']['date']))), '/videos/favorites/' . $user_obj['User']
['username'] . '/date:' . $this-params['pass']['date'], array('class'
= 'calendar')) ?
  ?php else: ?
  ?php echo $html-link(ucfirst(__('added date', true)) . ' : ' .
__('all', true), '/videos/favorites/' . $user_obj['User']['username'],
array('class' = 'calendar')) ?
  ?php endif ?

  img style=float: none; src=?php echo $this-webroot ?img/
arrow.png width=18 height=15 align=top class=arrow
onClick=javascript:showMenu('id_menu_date')

Re: Complex LIKE Conditions in CakePHP

2010-12-23 Thread nurvzy
I'm assuming you want an OR -- Dr. Loboto's produce an AND condition.
LIKE plural AND LIKE singular doesn't make a whole lot of sense.  You
probably want LIKE plural OR LIKE singular to be found in the
description.

$conditions = array(
  'OR' = array(
array('Product.short_description LIKE' = %_ $plural _%),
    array('Product.short_description LIKE' = %_ $singular _%)
  )
);

$this-paginate($conditions);

That will get you what you want,
Nick

On Dec 23, 2:54 am, Dr. Loboto drlob...@gmail.com wrote:
 array(
   array('Product.short_description LIKE' = %_ $plural _%),
   array('Product.short_description LIKE' = %_ $singular _%)
 )

 On 22 дек, 18:35, Christopher Geheran cgehe...@gmail.com wrote:







  So, I am attempting to have multiple like conditions on the same
  field, as follows, and Im sending this into the pagination class.

  array(
     'Product.short_description LIKE' = array(%_ $plural _%, %_
  $singular _%)
  )

  Since the above is an array, cakephp is attempting to add the IN
  clause into the sql, which makes perfect sense-- but, obviously does
  not work for a LIKE condition.

  Since its an array, you can not do this:

  array(
     'Product.short_description LIKE' = %_ $plural _%,
     'Product.short_description LIKE' = %_ $singular _%
  )

  You cannot do this because the Keys are the same, so you only end up
  with the last key in the SQL. I attempted making the entire thing an
  array, like this:

  array(
     '0'='Product.short_description LIKE' = %_ $plural _%,
     '1'='Product.short_description LIKE' = %_ $singular _%
  )

  Cake didn't seem to like that either.

  Any suggestions?

  Thanks,

  Chris

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: File upload

2010-12-23 Thread Tilen Majerle
just use FormHelper, and files you have are stored in $this-data in
controller after submit


VIEW like this

{{{

print $form-create(YourModelName, array('type' = 'file')); //start form
for uploading
print $form-file('inputname'); //input for file
print $form-submit('upload'); //upload button
print $form-end(); //close it

}}}

in controller in method use like this

{{{

$file = $this-data[YourModelName][fieldname];
//now $file stored classical array with index like tmp_name, name, size,
mime, error...and u can work like always :D

}}}

--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2010/12/23 Leandro Montero lpmont...@gmail.com

 Hi there, in these days i had exactly the same problem as described
 here


 http://groups.google.com/group/cake-php/browse_thread/thread/6fdf4b6937b9912a/93cc444340a09940?#93cc444340a09940
 es
 The thing is that the solution overthere doesn't work in my
 website
 Anyone has some clue? I'm completely desperate about this and my
 client
 really wants to kill me!

 Thank you!
 Leandro

 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.comcake-php%2bunsubscr...@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


Re: GoogleApi

2010-12-23 Thread georgeman



http://bakery.cakephp.org/articles/marcferna/2010/05/27/google-maps-api-v3-helper
http://bakery.cakephp.org/articles/rajibahmed/2010/11/20/cakephp_google_map_v3_helper

On Dec 23, 6:26 am, Gazmend Nrecaj gazmendnre...@googlemail.com
wrote:
 Hi,

 I want to use a GoogleMap in my App, has anyone Information how can I get
 this .
 I'm using CakePHP 1.3

 Thanks

 Gazi

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: HABTM Relations‏ CAKEPHP

2010-12-23 Thread georgeman
It makes a lot more sense to book the description of the book in the
books table, don't you think?

On Dec 23, 12:10 pm, Web Developman jhona...@gmail.com wrote:
 hi

 i need save an aditional field in join table, but don't find an
 complete example that showing the correct way to do.

 the question is as follows:

 I have three tables as follow:

 authors (id, name, lastname, nationality)
 books (id, title)
 authors_books(author_id, book_id,description) // Join Table

 description is a extra field in the join table that I want to save,
 when save an new author.

 for their help I will stay very grateful

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 can I add to one table while I'm adding to another

2010-12-23 Thread georgeman
If I have two possible solutions, one solution requires me to go
through some code line by line and figure out what is happening, and
it will take longer because the comments don't say much, and the other
solution is a plugin that also needs some modification but it comes
with a wiki, detailed and clear comments, a blog that explains in
further detail and also provides an example... if this is the
situation, then solution one is way too complicated for me. I have a
low pain threshold.

On Dec 23, 12:51 am, Amit Badkas amit.sanis...@gmail.com wrote:
 Hi,

 The link given by me was not a broken one as I am still able to access that.
 Also I told you to refer the behavior and it doesn't have cleanUpFields()
 anywhere, anyhow I didn't think that the behavior provides complicated
 solution. I also mentioned 'this is a too old article and some code in it
 need to change as per latest version of CakePHP'.

 Amit Badkas

 PHP Applications for E-Biz:http://www.sanisoft.com

 On Wed, Dec 22, 2010 at 11:02 PM, georgeman confidentia...@gmail.comwrote:







  Thanks for the tips. I don't think SaveAll is the solution I am
  looking for.

  What I want to do is enter a list of tags separated by commas then
  save them correctly. The 'simple tagging' article seems to be geared
  towards this but the solution offered is SO COMPLICATED and his
  comments are too brief to be very helpful, so I would have to go
  through each line by line.   Here is the link again because the link
  Amit posted got broken:http://bit.ly/hILzLN. It also uses
  cleanUpFields() function which is deprecated and some searching
  through the old APIs, this group, and Google I realized this was going
  to be some work...

  Here is another article on this topic (http://bit.ly/hCC7Cc) but gwoo
  this is not a good approach because it is not a good idea to use a
  model inside a component. But at least his comments explain in an
  understandable way what he is doing? He left a clue in his comment
  Look how we implemented tagging in the bakery code. I wish he would
  have supplied a link. I did some searching on the bakery and couldn't
  find anything.

  But I did find another article:http://bit.ly/hJiP8y, and it looks
  promising but as I was reading it I noticed the quality of
  explanations gradually deteriorating. The article starts off being
  excellently organized and clearly explaining everything that is about
  to happen, and by the time we get to the end it looks like the writer
  decided to get it over with and dump the rest of the code... (lmao)..

  Since tagging is so common on the web I am really surprised there
  isn't already developed an easier way to do this for CakePHP.

  On Dec 20, 11:57 pm, Amit Badkas amit.sanis...@gmail.com wrote:
   Hi,

   You need to use behavior for this, I use modified version ofhttp://
  bakery.cakephp.org/articles/dooltaz/2007/05/02/simple-tagging-...
   this is a too old article and some code in it need to change as per
   latest version of CakePHP.

   Amit Badkas

   PHP Applications for E-Biz:http://www.sanisoft.com

   On Tue, Dec 21, 2010 at 7:32 AM, georgeman confidentia...@gmail.com
  wrote:
Here is the scenario based on a simple blog:

The model for the blog is called Post. Post has the following fields:
id, title, body, created, modified. There are two other related
models: Tag and Comment. Tag has the following fields: id, name,
created, modified. Comment has the following fields: id, name, email,
body, blog_id, created, modified.

These are the associations: Post hasMany Comment, Post
hasAndBelongsToMany Tag, Tag hasAndBelongsToMany Post, Comment
belongsTo Post.

Therefore another table is required to keep track of the associations
between Post and Tag. The posts_tags table has the following fields:
post_id, tag_id.

So let's say I want to write a new blog Post. And let's say I want to
add some new tags that already are not in the table. How do I do that?
How do I add to two tables at the same time?

Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp
  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.comcake-php%2bunsubscr...@googlegroups.c
 om
  cake-php%2bunsubscr...@googlegroups.c omFor more options, visit this
  group at
   http://groups.google.com/group/cake-php?hl=en

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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
  

Re: Strange problem setting a variable

2010-12-23 Thread Stephen
Excellent, I'll remember to do that

On 23 December 2010 18:46, cricket zijn.digi...@gmail.com wrote:

 On Thu, Dec 23, 2010 at 7:51 AM, euromark dereurom...@googlemail.com
 wrote:
  only in cake1.2
  in cake1.3 this is fixed

 Yes, that was an unwelcome feature. In the meantime, for 1.2.x, you can do:

 $this-set(compact('category_label'), false);

 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.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en




-- 
Kind Regards
 Stephen @ NinjaCoderMonkey

 www.ninjacodermonkey.co.uk

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: File upload

2010-12-23 Thread Leandro Montero
That's exactly what i'm doingbut nothing.
I mean, my code worked perfectly but suddenly it has stopped!
It seems like all the file uploads were disabled!

On 23 dic, 21:32, Tilen Majerle tilen.maje...@gmail.com wrote:
 just use FormHelper, and files you have are stored in $this-data in
 controller after submit

 VIEW like this

 {{{

 print $form-create(YourModelName, array('type' = 'file')); //start form
 for uploading
 print $form-file('inputname'); //input for file
 print $form-submit('upload'); //upload button
 print $form-end(); //close it

 }}}

 in controller in method use like this

 {{{

 $file = $this-data[YourModelName][fieldname];
 //now $file stored classical array with index like tmp_name, name, size,
 mime, error...and u can work like always :D

 }}}

 --
 Lep pozdrav, Tilen Majerlehttp://majerle.eu

 2010/12/23 Leandro Montero lpmont...@gmail.com

  Hi there, in these days i had exactly the same problem as described
  here

 http://groups.google.com/group/cake-php/browse_thread/thread/6fdf4b69...
  es
  The thing is that the solution overthere doesn't work in my
  website
  Anyone has some clue? I'm completely desperate about this and my
  client
  really wants to kill me!

  Thank you!
  Leandro

  Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comcake-php%2bunsubscr...@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


Re: File upload

2010-12-23 Thread Tilen Majerle
ouu...that's other problem then :D
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2010/12/23 Leandro Montero lpmont...@gmail.com

 That's exactly what i'm doingbut nothing.
 I mean, my code worked perfectly but suddenly it has stopped!
 It seems like all the file uploads were disabled!

 On 23 dic, 21:32, Tilen Majerle tilen.maje...@gmail.com wrote:
  just use FormHelper, and files you have are stored in $this-data in
  controller after submit
 
  VIEW like this
 
  {{{
 
  print $form-create(YourModelName, array('type' = 'file')); //start
 form
  for uploading
  print $form-file('inputname'); //input for file
  print $form-submit('upload'); //upload button
  print $form-end(); //close it
 
  }}}
 
  in controller in method use like this
 
  {{{
 
  $file = $this-data[YourModelName][fieldname];
  //now $file stored classical array with index like tmp_name, name, size,
  mime, error...and u can work like always :D
 
  }}}
 
  --
  Lep pozdrav, Tilen Majerlehttp://majerle.eu
 
  2010/12/23 Leandro Montero lpmont...@gmail.com
 
   Hi there, in these days i had exactly the same problem as described
   here
 
  http://groups.google.com/group/cake-php/browse_thread/thread/6fdf4b69.
 ..
   es
   The thing is that the solution overthere doesn't work in my
   website
   Anyone has some clue? I'm completely desperate about this and my
   client
   really wants to kill me!
 
   Thank you!
   Leandro
 
   Check out the new CakePHP Questions sitehttp://cakeqs.organd 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.comcake-php%2bunsubscr...@googlegroups.com
 cake-php%2bunsubscr...@googlegroups.comcake-php%252bunsubscr...@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.comcake-php%2bunsubscr...@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


Re: GoogleApi

2010-12-23 Thread euromark
funny, i just wrote a helper for the new google api v3:
http://www.dereuromark.de/2010/12/21/googlemapsv3-cakephp-helper/

feel free to update or enhance it further

On 23 Dez., 22:46, georgeman confidentia...@gmail.com wrote:
 http://bakery.cakephp.org/articles/marcferna/2010/05/27/google-maps-a...http://bakery.cakephp.org/articles/rajibahmed/2010/11/20/cakephp_goog...

 On Dec 23, 6:26 am, Gazmend Nrecaj gazmendnre...@googlemail.com
 wrote:







  Hi,

  I want to use a GoogleMap in my App, has anyone Information how can I get
  this .
  I'm using CakePHP 1.3

  Thanks

  Gazi

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: A Deeper Insights to Database Config Settings

2010-12-23 Thread euromark
@AD
the database.php is never included in any rep
it is the same for all environments so you can just drag and drop it
of COURSE this should be handled differently for ONLINE testing
enviroments, i agree

but it doesnt hurt to have the same file for local dev and live stage
and the core is the same as well of course. do you have a custom
core.php file for each environment?



On 23 Dez., 19:56, cricket zijn.digi...@gmail.com wrote:
 On Thu, Dec 23, 2010 at 10:40 AM, AD7six andydawso...@gmail.com wrote:

  IMO what you're solving in the article is a hack for simply /not/
  using the same database.php (and core.php for that matter) file in all
  environments. Just don't add it to your repo, don't send it if you're
  ftp/rsyncing files around, setup on first use and the problem of what
  evironment should I use goes away.

 Also, it's worth changing the owner  permissions on these two files
 so that you can't accidentally overwrite them with rsync/ftp, but only
 directly edit them using sudo in an ssh session.

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


Comments Plugin for CakePHP

2010-12-23 Thread georgeman
I am installing the Comments Plugin from CakePHP

I'm stuck at the part where it says that Need to have some sort of
users or logins table that keep members personal info. This table
should contain slug field.

For some reason I just can't figure out this 'slug' business. To me a
slug is something I'd find under an old log when I was a kid. Anybody
else using this plugin can give me an idea what this table should look
like?

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 use transactions in cakephp

2010-12-23 Thread Amit Badkas
Hi,

I would use something like following in one of the models to save data for
non-related InnoDB tables

$db = ConnectionManager::getDataSource($this-useDbConfig);
$db-begin($this);

save code here

$db-commit($this);

Hope this helps.

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Thu, Dec 23, 2010 at 7:46 PM, Zeu5 kimc...@gmail.com wrote:

 Alright thanks!

 On Dec 23, 8:55 pm, Jon Bennett jmbenn...@gmail.com wrote:
   Unfortunately the 7 models are not interrelated to each other, some
   are of course related.
 
   So i am not sure if saveAll allows that non interrelated models.
 
  I've only used transactions in cake to save related data, though I
  believe once a transaction has been triggered, it will wrap any
  subsequent saveAll's as well - not certain on that, worth checking!
 
  not used the datasource way of doing it, sorry.
 
  hth
 
  Jo
 
  --
  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.comcake-php%2bunsubscr...@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


Re: Custom Function Password Match Always Triggered

2010-12-23 Thread John Maxim
Hi Ryan, Thanks for this, it will help in my documentation later.

On Dec 23, 2:34 am, Ryan Schmidt google-2...@ryandesign.com wrote:
 On Dec 21, 2010, at 22:45, John Maxim wrote:

  Hi Ryan what is a wrapper ?

 A wrapper is a function that calls another function.

 http://en.wikipedia.org/wiki/Wrapper_function

  Does it make it less secure ? but seeing that it has salted added
  doesn't sound like so.

 Using a salt makes your hashing *more* secure. If you store unsalted hashes 
 in your database, and a hacker manages to get access to that database, they 
 could possibly figure out the original passwords, for example using rainbow 
 tables. That's why you want to use a salt -- to prevent that attack 
 possibility.

 http://en.wikipedia.org/wiki/Rainbow_table

 CakePHP provides the Security::hash() method so that you can use it to hash 
 with salt, so that you don't have to manually deal with adding salt every 
 time you want to compute a hash.

 http://en.wikipedia.org/wiki/Don%27t_repeat_yourself

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


To use App Controller or not to use

2010-12-23 Thread John Maxim
I'm reading this section now:

http://book.cakephp.org/view/957/The-App-Controller


I find that the usefulness of AppController is by creating the
components, uses, and helpers in a new folder different path other
than in the controller file. But that page says creating the
AppController: is defined in /app/app_controller.php

Is it a new file I need to create?

Or is it something else because a comment from that page says the file
(app_controller.php) is here:

app\cake\libs\controller

The path above doesn't even exist.



The only eg. is:

?php
class AppController extends Controller {
}
?


So do I include the Auth component in there (AppController) rather
than in the controller file ?

Now even the beforefilter function is entered in AppController which
both I haven't seen in any examples.

Are there more examples to this ? Is this normally useful ?


Thanks.

John M.

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: To use App Controller or not to use

2010-12-23 Thread John Maxim
I found the file it's in *\cake\libs\controller

On Dec 24, 3:04 pm, John Maxim goog...@gmail.com wrote:
 I'm reading this section now:

 http://book.cakephp.org/view/957/The-App-Controller

 I find that the usefulness of AppController is by creating the
 components, uses, and helpers in a new folder different path other
 than in the controller file. But that page says creating the
 AppController: is defined in /app/app_controller.php

 Is it a new file I need to create?

 Or is it something else because a comment from that page says the file
 (app_controller.php) is here:

 app\cake\libs\controller

 The path above doesn't even exist.

 The only eg. is:

     ?php
     class AppController extends Controller {
     }
     ?

 So do I include the Auth component in there (AppController) rather
 than in the controller file ?

 Now even the beforefilter function is entered in AppController which
 both I haven't seen in any examples.

 Are there more examples to this ? Is this normally useful ?

 Thanks.

 John M.

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