Tuesday, November 30, 2010

Re: Error : VALID_NOT_EMPTY

 var $validate = array(
                         'name' => array(
                                        'notempty' => array(
                                                           'rule' => 'notEmpty',
                                                           'required' => true,
                                                           'allowEmpty' => false,
                                                           'message' => 'Please enter a value for the Name field',
                                                           'last' => true
                                                            ),
                                        'unique' => array(
                                                         'rule' => array(
                                                                        'checkUnique',
                                                                        'name'),
                                                            'message' => 'Division name exists'
                                   )
                                ));

user this u will get.

all the best..

On Tue, Nov 30, 2010 at 2:54 PM, Amit Badkas <amit.sanisoft@gmail.com> wrote:
Hi,

Aren't you following http://book.cakephp.org/view/1528/Blog for creating sample blog application?

Amit Badkas

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



On Tue, Nov 30, 2010 at 9:03 AM, Hans Wiriya Tsai <hansw.id@gmail.com> wrote:
great, thx for the prompt help! I would of course read the entire docs
(later), but your quick help is very helpful for a beginner like me.

On Tue, Nov 30, 2010 at 9:23 AM, cricket <zijn.digital@gmail.com> wrote:
> On Mon, Nov 29, 2010 at 5:43 AM, Hans Wiriya Tsai <hansw.id@gmail.com> wrote:
>> I hv CakePHP 1.3.6 installed on Ubuntu and learning to create simple
>> blog. When I add validation to my model, I got this error:
>>
>> Notice (8): Use of undefined constant VALID_NOT_EMPTY - assumed
>> 'VALID_NOT_EMPTY' [CORE/cake/libs/class_registry.php, line 141]
>>
>>
>> Here's my model:
>> <?php
>> class Blog extends AppModel {
>>        var $name = 'Blog';
>>        var $validate = array(
>>                        'title' => array(
>>                                        'rule' => VALID_NOT_EMPTY,
>>                                        'message' => 'Title of a blog cannot be empty'
>>                        )
>>        );
>> }
>> ?>
>>
>> Any idea what this error is all about? Thx for any help.
>
> Yes, it's an undefined constant. VALID_NOT_EMPTY was deprecated awhile
> back. Use 'rule' => 'notEmpty' instead.
>
> http://book.cakephp.org/view/1143/Data-Validation
>
> 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+unsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en



--
Master Ram.
Founder n Director of rgPlanets Pvt. Ltd.

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

Re: Error : VALID_NOT_EMPTY

Hi,

Aren't you following http://book.cakephp.org/view/1528/Blog for creating sample blog application?

Amit Badkas

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



On Tue, Nov 30, 2010 at 9:03 AM, Hans Wiriya Tsai <hansw.id@gmail.com> wrote:
great, thx for the prompt help! I would of course read the entire docs
(later), but your quick help is very helpful for a beginner like me.

On Tue, Nov 30, 2010 at 9:23 AM, cricket <zijn.digital@gmail.com> wrote:
> On Mon, Nov 29, 2010 at 5:43 AM, Hans Wiriya Tsai <hansw.id@gmail.com> wrote:
>> I hv CakePHP 1.3.6 installed on Ubuntu and learning to create simple
>> blog. When I add validation to my model, I got this error:
>>
>> Notice (8): Use of undefined constant VALID_NOT_EMPTY - assumed
>> 'VALID_NOT_EMPTY' [CORE/cake/libs/class_registry.php, line 141]
>>
>>
>> Here's my model:
>> <?php
>> class Blog extends AppModel {
>>        var $name = 'Blog';
>>        var $validate = array(
>>                        'title' => array(
>>                                        'rule' => VALID_NOT_EMPTY,
>>                                        'message' => 'Title of a blog cannot be empty'
>>                        )
>>        );
>> }
>> ?>
>>
>> Any idea what this error is all about? Thx for any help.
>
> Yes, it's an undefined constant. VALID_NOT_EMPTY was deprecated awhile
> back. Use 'rule' => 'notEmpty' instead.
>
> http://book.cakephp.org/view/1143/Data-Validation
>
> 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+unsubscribe@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+unsubscribe@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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Re: download file

If you mean you want to your users to be prompted with a download window use readfile, otherwise I don't think I understand the question.

Here's something I did for pdf files.

http://pastie.org/private/igu2zad2lasz4vjowvdya



On 29 November 2010 06:42, Miqdad Ali <mr.miqdad.ali@gmail.com> wrote:
friends,
I want code for downloading image files in cakephp
--------------------------------------------------------------------
Miqdad Ali
http://www.miqdadali.co.cc


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



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

Re: Error : VALID_NOT_EMPTY

look at http://book.cakephp.org/view/1173/notEmpty for new validation
rules or http://book.cakephp.org/view/1151/Multiple-Rules-per-Field is
an other good point to start with validation.

On 29 Nov., 11:43, Hans Wiriya Tsai <hansw...@gmail.com> wrote:
> I hv CakePHP 1.3.6 installed on Ubuntu and learning to create simple
> blog. When I add validation to my model, I got this error:
>
> Notice (8): Use of undefined constant VALID_NOT_EMPTY - assumed
> 'VALID_NOT_EMPTY' [CORE/cake/libs/class_registry.php, line 141]
>
> Here's my model:
> <?php
> class Blog extends AppModel {
>         var $name = 'Blog';
>         var $validate = array(
>                         'title' => array(
>                                         'rule' => VALID_NOT_EMPTY,
>                                         'message' => 'Title of a blog cannot be empty'
>                         )
>         );}
>
> ?>
>
> Any idea what this error is all about? Thx for any help.

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

Re: CakePlate - Boilerplate CakePHP distro

Hi Ryan,

Great work. Nice idea , keep up the good work.


Best wishes and Regards,

Amit

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

Re: Routing with parameters

Hi,

Your route should be something like

Router:: connect ('/sitelocks', array ('controller' => 'portfolio', 'action' => 'index', 'forsale' => 1));

Amit Badkas

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



On Mon, Nov 29, 2010 at 10:45 PM, xamako <xamako@gmail.com> wrote:
Hi!

I'm trying to rounting to a method of a controller with a
specific parameter.

What I'm trying to do is simulate a call like:

www.web.com/portfolio/index/forsale:1

This is what I have so far, but I do not know how to add the parameter
the call

Router:: connect ('/ sitelocks', array ('controller' => 'portfolio',
'Action' => 'index'));

Thanks!

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

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

Re: CakePlate - Boilerplate CakePHP distro

I'd like to have a look at this but I'm still on 1.2, may need to adapt to 1.3 and check this out.

Anyway, good work, I like the idea.


On 30 November 2010 08:19, Jeremy Burns | Class Outfit <jeremyburns@classoutfit.com> wrote:
Without downloading it, how do we find out what's included? How would anyone know if you've coded it well (to standards etc)? How easy is it to strip down pieces not needed on a specific project? What's the [Cake] upgrade path like?

Jeremy Burns
Class Outfit

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

On 30 Nov 2010, at 04:16, ryan.pendergast@gmail.com wrote:

> You know how as a developer each time you create a new web app you
> spend the first few hours downloading, installing, and configuring the
> important add-ons that you need for nearly any production-level
> project? When all you really want to do is get started on your new
> kick-ass idea?
>
> That's why a friend and I decided to do something about it. We're
> launching CakePlate, a open source distribution of CakePHP that's
> ready to rock, right out of the box.
>
> learn more and read the full announcement at http://cakeplate.posterous.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+unsubscribe@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+unsubscribe@googlegroups.com For 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en