Re: Model and Controller aliases

2010-04-16 Thread Hendry
I would rather put the descriptions in the comments, especially if you
only use it when reviewing the files.

# Hendry

On Sat, Apr 17, 2010 at 1:59 AM, Scott  wrote:
> Some of my model and controller classes have very long, and therefore
> descriptive, names.  The problem is that it's a real pain to use these
> when coding, but I want the names to be as descriptive as possible
> when reviewing the files.
>
> It would be really nice if we could define an alias that could be used
> instead of the full model/controller name when calling actions.

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: Remove "Strip "Welcome to CakePHP Console" from shell output

2009-07-28 Thread Hendry

Hi Piotr,

Try to look into:
cake/console/libs/shell.php
and change the function _welcome , or just simply comment out the
$this->_welcome() method call in the function startup()

Regards,
Hendry

On Wed, Jul 29, 2009 at 2:36 AM, 3lancer.eu wrote:
> I'd like to get rid off the welcome message as well as the folders
> info, as I don't need that everytime I run this task. Any good way to
> do that?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: jquery cakephp post data problem

2009-07-05 Thread Hendry

What I would suggest is, try to install firebug and use firefox, you
could see what data exactly being posted and it would help you more on
debugging.

Regards,
Hendry

On Sun, Jul 5, 2009 at 11:14 PM, stZen wrote:
> I am getting a response back (with an error saying there is no view
> set, but thats ok). My problem is
> that I am not able to see the posted data in the controller.

--~--~-~--~~~---~--~~
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: generateList() returning SQL error.

2009-07-04 Thread Hendry

What cake version are you using now? If it is cake 1.2, generateList
is deprecated, you should use find('list').
Also, would be more helpful if you post your Book and Author model and
its relationship here.

~hendry

On Sun, Jul 5, 2009 at 12:53 PM, centr0 wrote:
> the error msg is:
> 1064: You have an error in your SQL syntax; check the manual that
> corresponds to your MySQL server version for the right syntax to use
> near 'generateList' at line 1
>
> im using xampp on win xp so im guessing everything is up to date.  my
> db_config uses mysqli.
>
> any ideas?  thanks in advance for response.

--~--~-~--~~~---~--~~
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: Forms with multiple tables

2009-07-04 Thread Hendry

Hi Travis,

Please read http://book.cakephp.org/view/438/displayField

Regards,
Hendry

On Sun, Jul 5, 2009 at 7:36 AM, Travis wrote:
> Thanks, That worked.
>
> I have one more question, is there a way I can tell it what field to
> put in the select, right now it is using the field "name" and I would
> like it to use the field "common_name" since as you can figure out
> common name is what we call it, as apposed to the government assigned
> name.
>
> Travis

--~--~-~--~~~---~--~~
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: Write to log table for every successful update/delete

2009-07-04 Thread Hendry

THanks Chris, I'm testing it now ;)

Regards,
Hendry

On Sat, Jul 4, 2009 at 6:25 AM, BlueC wrote:
> You could use the logablebehavior I have used it and it is really
> excellent!! It even integrates with auth component so you can log and
> see who did what. It can also log inserts too.
>
> http://code.google.com/p/alkemann/wiki/LogableBehavior
> http://bakery.cakephp.org/articles/view/logablebehavior
>
> Enjoy!
>
> Chris

--~--~-~--~~~---~--~~
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: Automagically filling table-fields?

2009-07-04 Thread Hendry

Hi,

should be Post not Posts:

$this->data['Post']['username'] = $this->Auth->user('username');

Regards,
Hendry

On Sun, Jul 5, 2009 at 2:58 AM, eMilk wrote:
> This is my PostsController::add():
>        function add() {
>                        if (!empty($this->data)) {
>                                $this->data['Posts']['username'] = 
> $this->Auth->user
> ('username');
>                        if  ($this->Post->save($this->data)) {
>                                $this->Session->setFlash('Your robot has been 
> saved.');
>                                $this->redirect(array('action' => 'index'));
>                        }
>                }
>        }

--~--~-~--~~~---~--~~
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: Automagically filling table-fields?

2009-07-04 Thread Hendry

Hi,

That's weird, could you test using this line, just to make sure you
implement the AuthComponent correctly:

$this->data['Post']['username'] = 'Hendry';

Regards,
Hendry



On Sun, Jul 5, 2009 at 3:28 AM, eMilk wrote:
> Hi Hendry,
>
> Thanks - didn't fix it though - still no data being added to the
> 'username' field automatically yet. :(

--~--~-~--~~~---~--~~
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: Write to log table for every successful update/delete

2009-07-03 Thread Hendry

Hi Carlos,

Yes, I can use the model's callback method (aftersave and afterdelete)
but then, since this would require writing to another table, which
means call to other model from inside a model, wouldn't this break the
MVC pattern?

Regards,
Hendry

On Sat, Jul 4, 2009 at 12:47 AM, Carlos Gonzalez
Lavin wrote:
> I don't know if these applies to you... but saves (I don't know if just
> valid ones) do a callback to the model's aftersave function (either inserts
> or updates)
> A bit more info on it:
> http://book.cakephp.org/view/684/afterSave

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