Re: cake_1.2.3.8166+ Query: execute

2010-07-16 Thread Dr. Loboto
Open this error message and inspect stack trace there. You'll see
which model/controller/behavior still uses execute() method instead of
query() one.

On Jul 17, 3:06 am, "simon...@terra.com.br" 
wrote:
> HI,
>
> I'm using cake_1.2.3.8166 version. I get this error:
>
> Warning (512): SQL Error: 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 '' at line 1 [CORE\cake\libs\model\datasources
> \dbo_source.php, line 525]
>
> Query: execute
>
> Query: execute
>
> I did change all the execute() to query(), but the problem is still
> there.
>
> Any ideas?
>
> Regards,

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: Show validation message when validation fail

2010-07-16 Thread Dr. Loboto
Validations rules are for fields in form, not save() method itself.
All fields listed there are validated and for each failed one error
message is generated. When you use form helper these errors outputs
near these fields. So in controller action you know that "Some fields
values are incorrect" and may (or may not) display such flash message.
Just do not redirect after failed save and you'll see particular
validation messages in form.

On Jul 17, 12:46 am, "Mariano C."  wrote:
> I have Post model in which I've defined validation rules:
>
> var $validate = array(
>         'range' => array(
>         'rule' => array('range', 1900, 2010),
>         'message' => 'Between 1900 and 2010.'
>     )
> );
>
> and I've the PostsController, with an easy add function:
> function add() {
>         if (!empty($this->data)) {
>                 if ($this->Post->save($this->data))
>                         {
>                            // HANDLE SUCCESS
>                         }
>                         else
>                         {
>                            // HANDLE VALIDATION ERROR
>                            $this->Session->setFlash("generic error");
>                         }
>                 }
>         }
>
> How I've to code the 'else' branch to show validation error message
> defined inside model?
> Especially I would show "between 1900 and 2010." as error rather thn
> "generic error"
>
> Regards

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: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread Dr. Loboto
1.2 also do not support 5.3
One of aims for 1.3 was exactly 5.3 support.

On Jul 16, 5:46 pm, xamako  wrote:
> First I am trying to migrate to version 1.2
>
> Thanks
>
> On Jul 16, 12:38 pm, xamako  wrote:
>
>
>
> > I am trying to upgrade to version 1.3, but there are many errors, you
> > know someone guide
>
> > I've looked at:
>
> >http://mark-story.com/posts/view/getting-a-new-oven-migrating-from-ca...
>
> >http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2
>
> > Thanks
>
> > On Jul 16, 9:35 am, xamako  wrote:
>
> > > Ok
>
> > > I'm try upgrade to 1.2.
>
> > > Thanks!
>
> > > On Jul 16, 9:33 am, mike karthauser  wrote:
>
> > > > Cake 1.1.* is not compatible with php5.3.
>
> > > > You are either going to need to upgrade your app to a recent version of 
> > > > 1.2.* or find a version of php < 5.3
>
> > > > Mike Karthauser
> > > > Brightstorm limited
> > > > Tel: 07939252144
>
> > > > On 16 Jul 2010, at 08:26, xamako  wrote:
>
> > > > > Hi!
>
> > > > > I'm trying to run a project written in cakephp 1.1.11.4064 on a server
> > > > > PHP 5.3.2, but fails.
>
> > > > > These are the errors:
>
> > > > > Strict Standards: Redefining already defined constructor for class
> > > > > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake
> > > > > \libs\object.php on line 69
>
> > > > > Deprecated: Assigning the return value of new by reference is
> > > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > > > \cake\libs\object.php on line 94
>
> > > > > Deprecated: Assigning the return value of new by reference is
> > > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > > > \cake\libs\security.php on line 48
>
> > > > > Deprecated: Assigning the return value of new by reference is
> > > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > > > \cake\libs\configure.php on line 82
>
> > > > > Strict Standards: Non-static method Configure::getInstance() should
> > > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > > > > \amyadler\new_site\cake\bootstrap.php on line 43
>
> > > > > Strict Standards: Non-static method Configure::write() should not be
> > > > > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler
> > > > > \new_site\cake\bootstrap.php on line 82
>
> > > > > Strict Standards: Non-static method Configure::getInstance() should
> > > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > > > > \amyadler\new_site\cake\libs\configure.php on line 102
>
> > > > > Any solution?
>
> > > > > Check out the new CakePHP Questions 
> > > > > sitehttp://cakeqs.organdhelpotherswith 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 athttp://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



Started developing a survey plugin

2010-07-16 Thread TuteC
Hi all.

I've searched through the internet for a survey plugin for CakePHP,
but couldn't find a simple and modular one as a plugin has to be. So I
started developing one, and as I thought that someone else may find
this useful, I'm sending this email.

I'm releasing the code in http://github.com/tute/frage, and is now
being actively developed.

Kind regards,

Eugenio.

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: Tree Reorder: What Does it Do?

2010-07-16 Thread Kirk
Max, I think you're looking for http://book.cakephp.org/view/1628/Recover

Also, I just noticed that
reorder() is in 2 different places in the documentation, and the 2nd place
already has the complete documentation. Now I can't remember if I passed the
id in an options array or not when I got the error.

On Fri, Jul 16, 2010 at 3:28 PM, Max  wrote:

> Not sure if this applies but I had an existing DB that has:
> id | name | parent_id
>
> I added the two other fields (lft and rght) but how to I get these
> populated with the correct values so 'generatetreelist' will work
> correctly?
>
> Thanks.
>
>
> On Jul 16, 8:37 am, Kirk  wrote:
> > Why are you editing the 1.2 documentation instead of 1.3? I submitted a
> more
> > complete documentation of the reorder function a week ago after looking
> > through the code, but still no one has approved it. I don't know what
> those
> > cake people are doing over there. I used reorder to order by name field,
> > which is default, and it worked fine. You just call $model->reorder().
> It's
> > supposed to take an id as a parameter as well, but I got an error when I
> > tried to pass an id.
> >
> > ~Kirk
> >
> > On Fri, Jul 16, 2010 at 8:30 AM, DragonFlyEye  >wrote:
> >
> > > Ok, for those who happen upon this thread looking for a method of
> > > ordering their Tree children, I did a bit of digging into the actual
> > > code and discovered that there are in fact more arguments to the
> > > children() function than are documented in the Book. I've made
> > > corrections to the Book which will hopefully fill in soon:
> > >http://book.cakephp.org/view/228/Basic-Usage#Children-525
> > > children() in fact takes several arguments (though strangely, not in
> > > an $options array like you might expect from CakePHP) including an
> > > $order SQL ORDER BY statement. So, whatever reorder() is supposed to
> > > do, this is actually not the way to organize your tree structure for
> > > display.
> >
> > > Hope that helps someone!! It's been a heck of a struggle for me,
> > > personally.
> >
> > > 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.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.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: how i make backend and frontend?

2010-07-16 Thread Davor Ilic
m found the solution about my issue:

false

Router::connect('/', array('controller' => 'clients', 'action' =>
'index', 'admin'=>false));

right

Router::connect('/', array('controller' => 'clients', 'action' => 
'index'));

the admin false turns on to use the prefix "admin_"



2010/7/17 Davor Ilic :
> do i have to use two i have to work with two diffrent controllers one
> for my backendsection and one for my frontendsection?
> i this the solution
>
> 2010/7/17 Davor Ilic :
>> i also tried this
>>
>>                function beforeFilter() {
>>                parent::beforeFilter();
>>                $this->Auth->allow('index');
>>                }
>>
>> but nothing
>>
>> 2010/7/17 Davor Ilic :
>>> i´ve try it and it doesn´t work. it make know the methods with admin_
>>> prefix access without login i try it like this:
>>>
>>>
>>>
>>>                function beforeFilter() {
>>>                        parent::beforeFilter();
>>>                        if($this->__getAdminMode()) {
>>>                                $this->components = array('Auth');
>>>                        }
>>>
>>>                }
>>>
>>> 2010/7/16 Sam Sherlock :
 [code]

       function __getAdminMode() {

               $adminRoute = Configure::read('Routing.prefixes.0');

               if (isset($this->params['prefix']) && 
 $this->params['prefix'] ==
 $adminRoute) {

                       return true;

               }

               return false;

       }

 [/code]
 the code above is adapted for cake1.3 is is from
 http://github.com/josegonzalez/cakephp-admin-panel/blob/master/app_controller.php
  - S



 On 16 July 2010 18:49, Davor Ilic  wrote:
>
> should i poll it with params['admin'] in app_controller to use component
> auth or not? or is there another way or did i missunderstood something 
> with
> Authcomponent?
>
> 2010/7/16 Davor Ilic 
>>
>>
>> 2010/7/16 Davor Ilic 
>>>
>>> i forgot used this routes:
>>> Router::connect('/admin', array('controller' =>
>>> 'users','action'=>'login','admin'=>true));
>>> Router::connect('/admin/:controller/:action/*', array('admin' => true));
>>> Router::connect('/', array('controller' => 'contents', 'action' =>
>>> 'index', 'admin'=>false))
>>
>> i meen i forgot which root i use to tell
>>
>>>
>>> 2010/7/16 Davor Ilic 

 yes thats right. i tell app_controller to use the component auth but
 don´t know how to tell app_controller to use for auth the 
 "admin_method" and
 for frontend this "method" in my case "admin_index()" and "index()"

 2010/7/16 Sam Sherlock 
>
> I am sorry I misunderstood your question.
> It sounds as if you your having an issue with the auth comp but you
> have not posted your code
> are you being redirected to login for all controllers/actions?
>
>  - S
>
>
>
> On 16 July 2010 17:50, Davor Ilic  wrote:
>>
>> don´t need this i already have an backend but need an frontend now
>> with the same controllers
>>
>> 2010/7/16 Hugo M 
>>>
>>>
>>> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>>>
>>> 2010/7/16 Davor Ilic 

 hmmm don´t understand it well, because:
 if i set this prefixes in core why i will using then the index()
 method "and" the clients_index?
 Also for auth i set it in the app controller and it ask me every
 time to login regardless of whether i´m in the admin section or 
 the frontend
 where i only want to output the content from db.
 Mybe i can change something in this auth controller to to only use
 it in the admin section where the methods only called with the 
 prefix
 "admin_"...



 2010/7/16 Sam Sherlock 
>
> Configure admin and clients as prefixes in core.php
>
> then in clients controller
> admin_index()
> clients_index()
> index()
>  - S
>
>
>
>
> On 16 July 2010 00:11, Davor Ilic  wrote:
>>
>> My problem is i use now my own backend which i wrote it with
>> cakephp but how i can use now the same controllers for my 
>> frontend not the
>> same as backend methods but the same controller ? example:
>> i have an Controller: ClientsController in which an:
>> admin_index() and index() but can´t use index() without asking 
>>

Re: how i make backend and frontend?

2010-07-16 Thread Davor Ilic
do i have to use two i have to work with two diffrent controllers one
for my backendsection and one for my frontendsection?
i this the solution

2010/7/17 Davor Ilic :
> i also tried this
>
>                function beforeFilter() {
>                parent::beforeFilter();
>                $this->Auth->allow('index');
>                }
>
> but nothing
>
> 2010/7/17 Davor Ilic :
>> i´ve try it and it doesn´t work. it make know the methods with admin_
>> prefix access without login i try it like this:
>>
>>
>>
>>                function beforeFilter() {
>>                        parent::beforeFilter();
>>                        if($this->__getAdminMode()) {
>>                                $this->components = array('Auth');
>>                        }
>>
>>                }
>>
>> 2010/7/16 Sam Sherlock :
>>> [code]
>>>
>>>       function __getAdminMode() {
>>>
>>>               $adminRoute = Configure::read('Routing.prefixes.0');
>>>
>>>               if (isset($this->params['prefix']) && $this->params['prefix'] 
>>> ==
>>> $adminRoute) {
>>>
>>>                       return true;
>>>
>>>               }
>>>
>>>               return false;
>>>
>>>       }
>>>
>>> [/code]
>>> the code above is adapted for cake1.3 is is from
>>> http://github.com/josegonzalez/cakephp-admin-panel/blob/master/app_controller.php
>>>  - S
>>>
>>>
>>>
>>> On 16 July 2010 18:49, Davor Ilic  wrote:

 should i poll it with params['admin'] in app_controller to use component
 auth or not? or is there another way or did i missunderstood something with
 Authcomponent?

 2010/7/16 Davor Ilic 
>
>
> 2010/7/16 Davor Ilic 
>>
>> i forgot used this routes:
>> Router::connect('/admin', array('controller' =>
>> 'users','action'=>'login','admin'=>true));
>> Router::connect('/admin/:controller/:action/*', array('admin' => true));
>> Router::connect('/', array('controller' => 'contents', 'action' =>
>> 'index', 'admin'=>false))
>
> i meen i forgot which root i use to tell
>
>>
>> 2010/7/16 Davor Ilic 
>>>
>>> yes thats right. i tell app_controller to use the component auth but
>>> don´t know how to tell app_controller to use for auth the 
>>> "admin_method" and
>>> for frontend this "method" in my case "admin_index()" and "index()"
>>>
>>> 2010/7/16 Sam Sherlock 

 I am sorry I misunderstood your question.
 It sounds as if you your having an issue with the auth comp but you
 have not posted your code
 are you being redirected to login for all controllers/actions?

  - S



 On 16 July 2010 17:50, Davor Ilic  wrote:
>
> don´t need this i already have an backend but need an frontend now
> with the same controllers
>
> 2010/7/16 Hugo M 
>>
>>
>> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>>
>> 2010/7/16 Davor Ilic 
>>>
>>> hmmm don´t understand it well, because:
>>> if i set this prefixes in core why i will using then the index()
>>> method "and" the clients_index?
>>> Also for auth i set it in the app controller and it ask me every
>>> time to login regardless of whether i´m in the admin section or the 
>>> frontend
>>> where i only want to output the content from db.
>>> Mybe i can change something in this auth controller to to only use
>>> it in the admin section where the methods only called with the 
>>> prefix
>>> "admin_"...
>>>
>>>
>>>
>>> 2010/7/16 Sam Sherlock 

 Configure admin and clients as prefixes in core.php

 then in clients controller
 admin_index()
 clients_index()
 index()
  - S




 On 16 July 2010 00:11, Davor Ilic  wrote:
>
> My problem is i use now my own backend which i wrote it with
> cakephp but how i can use now the same controllers for my 
> frontend not the
> same as backend methods but the same controller ? example:
> i have an Controller: ClientsController in which an:
> admin_index() and index() but can´t use index() without asking 
> mie to
> authentifacting me...
> how to solve this to see the frontend
>
> 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

Re: how i make backend and frontend?

2010-07-16 Thread Davor Ilic
i also tried this

function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('index');
}

but nothing

2010/7/17 Davor Ilic :
> i´ve try it and it doesn´t work. it make know the methods with admin_
> prefix access without login i try it like this:
>
>
>
>                function beforeFilter() {
>                        parent::beforeFilter();
>                        if($this->__getAdminMode()) {
>                                $this->components = array('Auth');
>                        }
>
>                }
>
> 2010/7/16 Sam Sherlock :
>> [code]
>>
>>       function __getAdminMode() {
>>
>>               $adminRoute = Configure::read('Routing.prefixes.0');
>>
>>               if (isset($this->params['prefix']) && $this->params['prefix'] 
>> ==
>> $adminRoute) {
>>
>>                       return true;
>>
>>               }
>>
>>               return false;
>>
>>       }
>>
>> [/code]
>> the code above is adapted for cake1.3 is is from
>> http://github.com/josegonzalez/cakephp-admin-panel/blob/master/app_controller.php
>>  - S
>>
>>
>>
>> On 16 July 2010 18:49, Davor Ilic  wrote:
>>>
>>> should i poll it with params['admin'] in app_controller to use component
>>> auth or not? or is there another way or did i missunderstood something with
>>> Authcomponent?
>>>
>>> 2010/7/16 Davor Ilic 


 2010/7/16 Davor Ilic 
>
> i forgot used this routes:
> Router::connect('/admin', array('controller' =>
> 'users','action'=>'login','admin'=>true));
> Router::connect('/admin/:controller/:action/*', array('admin' => true));
> Router::connect('/', array('controller' => 'contents', 'action' =>
> 'index', 'admin'=>false))

 i meen i forgot which root i use to tell

>
> 2010/7/16 Davor Ilic 
>>
>> yes thats right. i tell app_controller to use the component auth but
>> don´t know how to tell app_controller to use for auth the "admin_method" 
>> and
>> for frontend this "method" in my case "admin_index()" and "index()"
>>
>> 2010/7/16 Sam Sherlock 
>>>
>>> I am sorry I misunderstood your question.
>>> It sounds as if you your having an issue with the auth comp but you
>>> have not posted your code
>>> are you being redirected to login for all controllers/actions?
>>>
>>>  - S
>>>
>>>
>>>
>>> On 16 July 2010 17:50, Davor Ilic  wrote:

 don´t need this i already have an backend but need an frontend now
 with the same controllers

 2010/7/16 Hugo M 
>
>
> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>
> 2010/7/16 Davor Ilic 
>>
>> hmmm don´t understand it well, because:
>> if i set this prefixes in core why i will using then the index()
>> method "and" the clients_index?
>> Also for auth i set it in the app controller and it ask me every
>> time to login regardless of whether i´m in the admin section or the 
>> frontend
>> where i only want to output the content from db.
>> Mybe i can change something in this auth controller to to only use
>> it in the admin section where the methods only called with the prefix
>> "admin_"...
>>
>>
>>
>> 2010/7/16 Sam Sherlock 
>>>
>>> Configure admin and clients as prefixes in core.php
>>>
>>> then in clients controller
>>> admin_index()
>>> clients_index()
>>> index()
>>>  - S
>>>
>>>
>>>
>>>
>>> On 16 July 2010 00:11, Davor Ilic  wrote:

 My problem is i use now my own backend which i wrote it with
 cakephp but how i can use now the same controllers for my frontend 
 not the
 same as backend methods but the same controller ? example:
 i have an Controller: ClientsController in which an:
 admin_index() and index() but can´t use index() without asking mie 
 to
 authentifacting me...
 how to solve this to see the frontend

 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 quest

Re: Tree Reorder: What Does it Do?

2010-07-16 Thread Max
Not sure if this applies but I had an existing DB that has:
id | name | parent_id

I added the two other fields (lft and rght) but how to I get these
populated with the correct values so 'generatetreelist' will work
correctly?

Thanks.


On Jul 16, 8:37 am, Kirk  wrote:
> Why are you editing the 1.2 documentation instead of 1.3? I submitted a more
> complete documentation of the reorder function a week ago after looking
> through the code, but still no one has approved it. I don't know what those
> cake people are doing over there. I used reorder to order by name field,
> which is default, and it worked fine. You just call $model->reorder(). It's
> supposed to take an id as a parameter as well, but I got an error when I
> tried to pass an id.
>
> ~Kirk
>
> On Fri, Jul 16, 2010 at 8:30 AM, DragonFlyEye wrote:
>
> > Ok, for those who happen upon this thread looking for a method of
> > ordering their Tree children, I did a bit of digging into the actual
> > code and discovered that there are in fact more arguments to the
> > children() function than are documented in the Book. I've made
> > corrections to the Book which will hopefully fill in soon:
> >http://book.cakephp.org/view/228/Basic-Usage#Children-525
> > children() in fact takes several arguments (though strangely, not in
> > an $options array like you might expect from CakePHP) including an
> > $order SQL ORDER BY statement. So, whatever reorder() is supposed to
> > do, this is actually not the way to organize your tree structure for
> > display.
>
> > Hope that helps someone!! It's been a heck of a struggle for me,
> > personally.
>
> > 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.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


Show validation message when validation fail

2010-07-16 Thread Mariano C.
I have Post model in which I've defined validation rules:

var $validate = array(
'range' => array(
'rule' => array('range', 1900, 2010),
'message' => 'Between 1900 and 2010.'
)
);

and I've the PostsController, with an easy add function:
function add() {
if (!empty($this->data)) {
if ($this->Post->save($this->data))
{
   // HANDLE SUCCESS
}
else
{
   // HANDLE VALIDATION ERROR
   $this->Session->setFlash("generic error");
}
}
}

How I've to code the 'else' branch to show validation error message
defined inside model?
Especially I would show "between 1900 and 2010." as error rather thn
"generic error"

Regards

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-writing all admin_add actions to admin_edit in 1.3

2010-07-16 Thread Dunhamzzz
Hi

In order to not have to duplicate my add and edit forms I have
attempted to route all the admin_add actions to admin_edit, my
admin_edit method is define to just load a blank form if no ID is
supplied in the URL and this worked fine in CakePHP 1.2. I have
however just upgraded to 1.3 for various reasons...

I have tried the following in CakePHP 1.3 to no avail:

Router::connect('/admin/:controller/add', array('action' => 'edit',
'admin' => true));

What is the correct way to do this? Is there a better way then routing
around the add action? It just seemed the easiest way, despite it
making my admin_edit action a little bit more complicated.

Thanks in advance.

Matt

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: SecurityComponent Logs

2010-07-16 Thread jdbartlett
I've been thinking about this a little more and agree that this should
probably be a separate plugin rather than a patch for the current
SecurityComponent.

The more I think about it, tokenizing basically serves to prevent
record hijacking (overtyping a primary or foreign key or other hidden
field in a form) and field insertion (adding extra fields to the
form). But most modern web apps expose CRUD methods in a JSON REST API
for use with Ajax, where form field hashes don't (or shouldn't) apply.

In the threads I've seen on the subject, it's recommended to disable
SecurityComponent's POST validation for Ajax requests to avoid black
boxes. This exposes the REST API to CSRF attacks. Even when CSRF
protection is restored (by checking that Ajax requests include header
information, appended to the XHR by JavaScript--non-exotic CSRF attack
sites can't do this), record hijacking and field insertion must be
coded for manually. Effectively, as far as such applications are
concerned, field hashing may as well not exist at all.

Perhaps it would be better to produce a plugin that recommends use of
fieldLists in save() calls and record ownership verification, instead
of relying on field hashing. For CSRF protection, it could use session-
specific tokens appended as hidden fields in forms and as HTTP Request
Headers in Ajax requests.

Does anyone think I've overlooked something with this concept? It's
quite an extension of my original goal!

Thanks.

On Jul 16, 9:00 am, cricket  wrote:
> On Fri, Jul 16, 2010 at 9:30 AM, jdbartlett  wrote:
> > SecurityComponent is good for protecting against CSRF attacks, but
> > when I encounter a black hole while debugging an app, I want to know
> > why. When SecurityComponent black holes a request, it's only capable
> > of telling you one thing: you sent a bad request. That's good for
> > production--you want attackers to have as little information as
> > possible--but it's frustrating for developers who are debugging their
> > code.
>
> > I think it would be helpful if there were an option to have
> > SecurityComponent and FormHelper log the unserialized field lists they
> > use to produce token hashes.
>
> > My idea is to create a security.log in tmp/logs with entries like:
> > * [Time and Request URI] - Form field hash [hash] based on [field
> > list]
> > * [Time and Request URI] - Request field hash [hash] based on [field
> > list]
> > * [Time and Request URI] - Request field hash [hash] does not match
> > Form field hash [hash]
>
> > Because it's intended for debugging specific black holes, I think such
> > logging should be a discrete configuration option for
> > SecurityComponent. Developers would enable it only when they need to
> > work out why a specific request is being black holed.
>
> > Does anyone else think this would be helpful? Are there good reasons
> > to avoid such an approach? I've hacked my own SecurityComponent and
> > FormHelper forks to do this, but wanted the community's opinion on the
> > idea before cleaning it up and submitting a patch/pull request.
>
> One vote from me. That seems worthwhile. Perhaps a good approach would
> be to create a plugin.

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


Expire Session with Auth

2010-07-16 Thread saidbakr
Hi,

In my application, after sometime of inactivity, the authentication is
expired and then the areas that it requires authentication redirects
the user to the login page. This is nice.

However, I have some kind of third party file browser and I use
CakePHP session to handle the authentication of the users by setting a
session variable in which its value is dependable on the Cake's
Authentication.

My little problem is, when Authentication is expired and the window of
the file browser is still opened, I still able to access it.

My question is: How could I able to unset or delete any session
variable I have chosen it or all session variables when the
Authentication is expired?

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 i make backend and frontend?

2010-07-16 Thread Davor Ilic
i´ve try it and it doesn´t work. it make know the methods with admin_
prefix access without login i try it like this:



function beforeFilter() {
parent::beforeFilter();
if($this->__getAdminMode()) {
$this->components = array('Auth');
}

}

2010/7/16 Sam Sherlock :
> [code]
>
>   function __getAdminMode() {
>
>   $adminRoute = Configure::read('Routing.prefixes.0');
>
>   if (isset($this->params['prefix']) && $this->params['prefix'] ==
> $adminRoute) {
>
>   return true;
>
>   }
>
>   return false;
>
>   }
>
> [/code]
> the code above is adapted for cake1.3 is is from
> http://github.com/josegonzalez/cakephp-admin-panel/blob/master/app_controller.php
>  - S
>
>
>
> On 16 July 2010 18:49, Davor Ilic  wrote:
>>
>> should i poll it with params['admin'] in app_controller to use component
>> auth or not? or is there another way or did i missunderstood something with
>> Authcomponent?
>>
>> 2010/7/16 Davor Ilic 
>>>
>>>
>>> 2010/7/16 Davor Ilic 

 i forgot used this routes:
 Router::connect('/admin', array('controller' =>
 'users','action'=>'login','admin'=>true));
 Router::connect('/admin/:controller/:action/*', array('admin' => true));
 Router::connect('/', array('controller' => 'contents', 'action' =>
 'index', 'admin'=>false))
>>>
>>> i meen i forgot which root i use to tell
>>>

 2010/7/16 Davor Ilic 
>
> yes thats right. i tell app_controller to use the component auth but
> don´t know how to tell app_controller to use for auth the "admin_method" 
> and
> for frontend this "method" in my case "admin_index()" and "index()"
>
> 2010/7/16 Sam Sherlock 
>>
>> I am sorry I misunderstood your question.
>> It sounds as if you your having an issue with the auth comp but you
>> have not posted your code
>> are you being redirected to login for all controllers/actions?
>>
>>  - S
>>
>>
>>
>> On 16 July 2010 17:50, Davor Ilic  wrote:
>>>
>>> don´t need this i already have an backend but need an frontend now
>>> with the same controllers
>>>
>>> 2010/7/16 Hugo M 


 http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated

 2010/7/16 Davor Ilic 
>
> hmmm don´t understand it well, because:
> if i set this prefixes in core why i will using then the index()
> method "and" the clients_index?
> Also for auth i set it in the app controller and it ask me every
> time to login regardless of whether i´m in the admin section or the 
> frontend
> where i only want to output the content from db.
> Mybe i can change something in this auth controller to to only use
> it in the admin section where the methods only called with the prefix
> "admin_"...
>
>
>
> 2010/7/16 Sam Sherlock 
>>
>> Configure admin and clients as prefixes in core.php
>>
>> then in clients controller
>> admin_index()
>> clients_index()
>> index()
>>  - S
>>
>>
>>
>>
>> On 16 July 2010 00:11, Davor Ilic  wrote:
>>>
>>> My problem is i use now my own backend which i wrote it with
>>> cakephp but how i can use now the same controllers for my frontend 
>>> not the
>>> same as backend methods but the same controller ? example:
>>> i have an Controller: ClientsController in which an:
>>> admin_index() and index() but can´t use index() without asking mie 
>>> to
>>> authentifacting me...
>>> how to solve this to see the frontend
>>>
>>> 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 opti

Re: SecurityComponent Logs

2010-07-16 Thread jdbartlett
Unless you specify a callback action, SecurityComponent's black holes
are always HTTP 404 responses with no body content. Currently,
SecurityComponent is designed not to give any information about why
it's black holing a response.

On Jul 16, 1:24 pm, euromark  wrote:
> are those black holes 404s? or what error code is thrown?
>
> On 16 Jul., 16:00, cricket  wrote:
>
>
>
> > On Fri, Jul 16, 2010 at 9:30 AM, jdbartlett  wrote:
> > > SecurityComponent is good for protecting against CSRF attacks, but
> > > when I encounter a black hole while debugging an app, I want to know
> > > why. When SecurityComponent black holes a request, it's only capable
> > > of telling you one thing: you sent a bad request. That's good for
> > > production--you want attackers to have as little information as
> > > possible--but it's frustrating for developers who are debugging their
> > > code.
>
> > > I think it would be helpful if there were an option to have
> > > SecurityComponent and FormHelper log the unserialized field lists they
> > > use to produce token hashes.
>
> > > My idea is to create a security.log in tmp/logs with entries like:
> > > * [Time and Request URI] - Form field hash [hash] based on [field
> > > list]
> > > * [Time and Request URI] - Request field hash [hash] based on [field
> > > list]
> > > * [Time and Request URI] - Request field hash [hash] does not match
> > > Form field hash [hash]
>
> > > Because it's intended for debugging specific black holes, I think such
> > > logging should be a discrete configuration option for
> > > SecurityComponent. Developers would enable it only when they need to
> > > work out why a specific request is being black holed.
>
> > > Does anyone else think this would be helpful? Are there good reasons
> > > to avoid such an approach? I've hacked my own SecurityComponent and
> > > FormHelper forks to do this, but wanted the community's opinion on the
> > > idea before cleaning it up and submitting a patch/pull request.
>
> > One vote from me. That seems worthwhile. Perhaps a good approach would
> > be to create a plugin.

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: Something like ActiveMerchant?

2010-07-16 Thread Andreas
Ok,

I make a repo to github. I named it Aktive Merchant ;)

The link is http://github.com/akDeveloper/Aktive-Merchant

Will add soon some wiki notes for development new gateways.

Please give your feedback.

Thanks

On Jul 16, 7:20 am, "iamcam (Cameron Perry)" 
wrote:
> This all sounds great!
>
> I don't have much of have an opinion of what to do with the name
> considering the most obvious combinations of PHP and Merchant have
> already been used. I dunno, maybe "Active PHP Merchant"? I'm not the
> most imaginative when it comes to naming.
>
> I haven't used PHPUnit yet, but I think that could be a nice way for
> interested parties (myself included) to get involved just by starting
> some tests.
>
> Take care,
> Cameron
>
> On Jul 14, 2:34 pm, Andreas  wrote:
>
> > I 'll make a git repo in a few days so you can see the source code.
>
> > @iamcam The code is close to ruby code ( as php 5.2 allows ). Gateways
> > have standard public methods ( authorize, purchase, void etc ).
>
> > Every response is an Response class object. There is also Creditcard
> > class object, and everything Active Merchant has.
>
> > Some missing, for now, features are  PHPUnit tests and integation form
> > helper.
>
> > By the way, thinking of naming this project "phpMerchant" but googling
> > on that i found this linkhttp://code.google.com/p/php-merchant/
>
> > It is an Active Merchant like project, but it is inactive for over a
> > year...
>
> > On Jul 14, 10:15 am, "iamcam (Cameron Perry)"
>
> >  wrote:
> > > Bharadwaj, That's the best I could come up with in the PHP world.
> > > Unfortunately the PEAR packages look outdated, and the Kohana
> > > component is for that framework - not sure how it would work as a
> > > stand-alone. There are ports in other languages (python and Objective-
> > > C), but that doesn't help us.
>
> > > This is a huge need in the PHP community, even if most the payment
> > > gateways already have sample code. It's so much nicer working with
> > > consistent interfaces than trying to decipher the intricacies between
> > > all the various APIs.
>
> > > ~Cameron
>
> > > On Jul 12, 10:32 pm, Bharadwaj Parthasarathy 
> > > wrote:
>
> > > > +1 for github
>
> > > > I am also interested in participating in development.
>
> > > >  From a quick google search, there seems to be no similar framework in  
> > > > php.
> > > > You may want to check this 
> > > > -http://stackoverflow.com/questions/2768942/do-any-projects-exist-for-...
>
> > > > - Bharadwaj
>
> > > > On 12-Jul-10, at 10:23 PM, iamcam (Cameron Perry) wrote:
>
> > > > > How closely are you following the original ruby version? I'd be
> > > > > interested in helping out here and there once you put it on github (so
> > > > > much better than google).
>
> > > > > ~Cameron
>
> > > > > On Jul 9, 4:20 pm, Andreas  wrote:
> > > > >> Hi,
>
> > > > >> I am currently developing a port of Active Merchant on PHP.
>
> > > > >> I 've also add a few gateways for testing such as PaypalExpress,  
> > > > >> Hsbc,
> > > > >> Authorize.net(partial), Centinel 3D secure(partial), and
> > > > >> Eurobank(Greek bank).
>
> > > > >> I am planning to make a public repository on github or google project
> > > > >> hosting, when i clean the code and add some documentation.
>
> > > > >> I hope this will help php developers to integrate payments api to
> > > > >> their eCommerce applications.
>
> > > > >> On Jul 6, 1:51 am, "iamcam (Cameron Perry)" 
> > > > >> wrote:
>
> > > > >>> Has anyone seen anything like ActiveMerchant on the PHP side? I
> > > > >>> searched around a bit but haven't seen anything.
>
> > > > >>> I'm intrigued by the fact that it supports so many gateways out of  
> > > > >>> the
> > > > >>> box, and wonder if (a) anyone has already come up with a PHP
> > > > >>> alternative, or (b) thinks it feasible to attempt a port.
>
> > > > >>> Thanks!
> > > > >>> Cameron
>
> > > > > 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.com For more options, visit this  
> > > > > group athttp://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: CakePHP 1.3 Form Helper creating drop down and not input field

2010-07-16 Thread Miles J
Exactly what Jeremy said. I actually ran into this problem yesterday,
I resolved it by just putting "type" => "text".

Sometimes I love Cakes automagic-ness, sometimes it can be quite
annoying.

On Jul 16, 7:34 am, Jeremy Burns | Class Outfit
 wrote:
> The form helper will automatically create a drop down is there is a variable 
> that is a plural of a field name without it's '_id' at the end.
>
> For example, if you set a variable called $towns in your controller populated 
> by $this->Town->find('list'); and then have a form input called town_id, Cake 
> will link them up and make a drop down called town_id populated with the 
> contents of the $towns array.
>
> I can only presume that you have one such variable that matches a field name, 
> and the rest don't.
>
> What is your desired outcome? Should they all be drop downs (in which case 
> you'll need to set the array variables in your controller) or should they all 
> be inputs (in which case you should add the 'type' => 'text' option to your 
> form input).
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 16 Jul 2010, at 15:14, spheroid wrote:
>
> > I have a database table that contains child records of another table
> > and want users to be able to change those child records. The form
> > helper is doing something strange. I have it loop through my fields
> > which are varchar, and for some reason one field is creating a select
> > drop down, all others an input. Why is this happening and how can I
> > fix it?
>
> > Portion of my view:
>
> > echo $form->input($somestring['MyTableName']['fieldname'], array(
> >                    'div' => false,
> >                    'label' => $somestring['MyTableName']
> > ['fieldname_text'],
> >                    'before' => '',
> >                    'between' => ': *',
> >                    'after' => '',
> >                    'size' => 65,
> >                    'default' => $somestring['MyTableName']['setting']
> >                    ));
>
> > 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.com For more options, visit this group 
> > athttp://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: cake_1.2.3.8166+ Query: execute

2010-07-16 Thread Tilen Majerle
can u show us your query statement please?...maybe you fail at query
statement
--
LP,
Tilen Majerle http://majerle.eu


2010/7/16 simon...@terra.com.br 

> HI,
>
> I'm using cake_1.2.3.8166 version. I get this error:
>
> Warning (512): SQL Error: 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 '' at line 1 [CORE\cake\libs\model\datasources
> \dbo_source.php, line 525]
>
>
> Query: execute
>
> Query: execute
>
>
> I did change all the execute() to query(), but the problem is still
> there.
>
> Any ideas?
>
>
> Regards,
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


cake_1.2.3.8166+ Query: execute

2010-07-16 Thread simon...@terra.com.br
HI,

I'm using cake_1.2.3.8166 version. I get this error:

Warning (512): SQL Error: 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 '' at line 1 [CORE\cake\libs\model\datasources
\dbo_source.php, line 525]


Query: execute

Query: execute


I did change all the execute() to query(), but the problem is still
there.

Any ideas?


Regards,

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: SecurityComponent Logs

2010-07-16 Thread euromark
are those black holes 404s? or what error code is thrown?


On 16 Jul., 16:00, cricket  wrote:
> On Fri, Jul 16, 2010 at 9:30 AM, jdbartlett  wrote:
> > SecurityComponent is good for protecting against CSRF attacks, but
> > when I encounter a black hole while debugging an app, I want to know
> > why. When SecurityComponent black holes a request, it's only capable
> > of telling you one thing: you sent a bad request. That's good for
> > production--you want attackers to have as little information as
> > possible--but it's frustrating for developers who are debugging their
> > code.
>
> > I think it would be helpful if there were an option to have
> > SecurityComponent and FormHelper log the unserialized field lists they
> > use to produce token hashes.
>
> > My idea is to create a security.log in tmp/logs with entries like:
> > * [Time and Request URI] - Form field hash [hash] based on [field
> > list]
> > * [Time and Request URI] - Request field hash [hash] based on [field
> > list]
> > * [Time and Request URI] - Request field hash [hash] does not match
> > Form field hash [hash]
>
> > Because it's intended for debugging specific black holes, I think such
> > logging should be a discrete configuration option for
> > SecurityComponent. Developers would enable it only when they need to
> > work out why a specific request is being black holed.
>
> > Does anyone else think this would be helpful? Are there good reasons
> > to avoid such an approach? I've hacked my own SecurityComponent and
> > FormHelper forks to do this, but wanted the community's opinion on the
> > idea before cleaning it up and submitting a patch/pull request.
>
> One vote from me. That seems worthwhile. Perhaps a good approach would
> be to create a plugin.

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 i make backend and frontend?

2010-07-16 Thread Sam Sherlock
[code]

function __getAdminMode() {
$adminRoute = Configure::read('Routing.prefixes.0');
if (isset($this->params['prefix']) && $this->params['prefix'] ==
$adminRoute) {
return true;
}
return false;
}

[/code]
the code above is adapted for cake1.3 is is from
http://github.com/josegonzalez/cakephp-admin-panel/blob/master/app_controller.php

 - S



On 16 July 2010 18:49, Davor Ilic  wrote:

> should i poll it with params['admin'] in app_controller to use component
> auth or not? or is there another way or did i missunderstood something with
> Authcomponent?
>
>
> 2010/7/16 Davor Ilic 
>
>>
>>
>> 2010/7/16 Davor Ilic 
>>
>>> i forgot used this routes:
>>>
>>> Router::connect('/admin', array('controller' =>
>>> 'users','action'=>'login','admin'=>true));
>>>  Router::connect('/admin/:controller/:action/*', array('admin' =>
>>> true));
>>>  Router::connect('/', array('controller' => 'contents', 'action' =>
>>> 'index', 'admin'=>false))
>>>
>>
>> i meen i forgot which root i use to tell
>>
>>
>>>  2010/7/16 Davor Ilic 
>>>
 yes thats right. i tell app_controller to use the component auth but
 don´t know how to tell app_controller to use for auth the "admin_method" 
 and
 for frontend this "method" in my case "admin_index()" and "index()"


 2010/7/16 Sam Sherlock 

> I am sorry I misunderstood your question.
>
> It sounds as if you your having an issue with the auth comp but you
> have not posted your code
>
> are you being redirected to login for all controllers/actions?
>
>
>  - S
>
>
>
>
> On 16 July 2010 17:50, Davor Ilic  wrote:
>
>> don´t need this i already have an backend but need an frontend now
>> with the same controllers
>>
>> 2010/7/16 Hugo M 
>>
>>
>>> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>>>
>>> 2010/7/16 Davor Ilic 
>>>
>>> hmmm don´t understand it well, because:

 if i set this prefixes in core why i will using then the index()
 method "and" the clients_index?

 Also for auth i set it in the app controller and it ask me every
 time to login regardless of whether i´m in the admin section or the
 frontend where i only want to output the content from db.

 Mybe i can change something in this auth controller to to only use
 it in the admin section where the methods only called with the prefix
 "admin_"...




 2010/7/16 Sam Sherlock 

 Configure admin and clients as prefixes in core.php
>
> then in clients controller
>
> admin_index()
> clients_index()
> index()
>
>  - S
>
>
>
>
> On 16 July 2010 00:11, Davor Ilic  wrote:
>
>> My problem is i use now my own backend which i wrote it with
>> cakephp but how i can use now the same controllers for my frontend 
>> not the
>> same as backend methods but the same controller ? example:
>>
>> i have an Controller: ClientsController in which an: admin_index()
>> and index() but can´t use index() without asking mie to 
>> authentifacting
>> me...
>> how to solve this to see the frontend
>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and
>> help others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google
>> Groups "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and
> help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.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.
 

Re: how i make backend and frontend?

2010-07-16 Thread Davor Ilic
should i poll it with params['admin'] in app_controller to use component
auth or not? or is there another way or did i missunderstood something with
Authcomponent?

2010/7/16 Davor Ilic 

>
>
> 2010/7/16 Davor Ilic 
>
>> i forgot used this routes:
>>
>> Router::connect('/admin', array('controller' =>
>> 'users','action'=>'login','admin'=>true));
>>  Router::connect('/admin/:controller/:action/*', array('admin' => true));
>>  Router::connect('/', array('controller' => 'contents', 'action' =>
>> 'index', 'admin'=>false))
>>
>
> i meen i forgot which root i use to tell
>
>
>>  2010/7/16 Davor Ilic 
>>
>>> yes thats right. i tell app_controller to use the component auth but
>>> don´t know how to tell app_controller to use for auth the "admin_method" and
>>> for frontend this "method" in my case "admin_index()" and "index()"
>>>
>>>
>>> 2010/7/16 Sam Sherlock 
>>>
 I am sorry I misunderstood your question.

 It sounds as if you your having an issue with the auth comp but you have
 not posted your code

 are you being redirected to login for all controllers/actions?


  - S




 On 16 July 2010 17:50, Davor Ilic  wrote:

> don´t need this i already have an backend but need an frontend now with
> the same controllers
>
> 2010/7/16 Hugo M 
>
>
>> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>>
>> 2010/7/16 Davor Ilic 
>>
>> hmmm don´t understand it well, because:
>>>
>>> if i set this prefixes in core why i will using then the index()
>>> method "and" the clients_index?
>>>
>>> Also for auth i set it in the app controller and it ask me every time
>>> to login regardless of whether i´m in the admin section or the
>>> frontend where i only want to output the content from db.
>>>
>>> Mybe i can change something in this auth controller to to only use it
>>> in the admin section where the methods only called with the prefix
>>> "admin_"...
>>>
>>>
>>>
>>>
>>> 2010/7/16 Sam Sherlock 
>>>
>>> Configure admin and clients as prefixes in core.php

 then in clients controller

 admin_index()
 clients_index()
 index()

  - S




 On 16 July 2010 00:11, Davor Ilic  wrote:

> My problem is i use now my own backend which i wrote it with
> cakephp but how i can use now the same controllers for my frontend 
> not the
> same as backend methods but the same controller ? example:
>
> i have an Controller: ClientsController in which an: admin_index()
> and index() but can´t use index() without asking mie to 
> authentifacting
> me...
> how to solve this to see the frontend
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and
> help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

 You received this message because you are subscribed to the Google
 Groups "CakePHP" group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.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.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.comFor
>>  more options, visit this grou

Re: how i make backend and frontend?

2010-07-16 Thread Davor Ilic
2010/7/16 Davor Ilic 

> i forgot used this routes:
>
> Router::connect('/admin', array('controller' =>
> 'users','action'=>'login','admin'=>true));
>  Router::connect('/admin/:controller/:action/*', array('admin' => true));
>  Router::connect('/', array('controller' => 'contents', 'action' =>
> 'index', 'admin'=>false))
>

i meen i forgot which root i use to tell


> 2010/7/16 Davor Ilic 
>
>> yes thats right. i tell app_controller to use the component auth but don´t
>> know how to tell app_controller to use for auth the "admin_method" and for
>> frontend this "method" in my case "admin_index()" and "index()"
>>
>>
>> 2010/7/16 Sam Sherlock 
>>
>>> I am sorry I misunderstood your question.
>>>
>>> It sounds as if you your having an issue with the auth comp but you have
>>> not posted your code
>>>
>>> are you being redirected to login for all controllers/actions?
>>>
>>>
>>>  - S
>>>
>>>
>>>
>>>
>>> On 16 July 2010 17:50, Davor Ilic  wrote:
>>>
 don´t need this i already have an backend but need an frontend now with
 the same controllers

 2010/7/16 Hugo M 


> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>
> 2010/7/16 Davor Ilic 
>
> hmmm don´t understand it well, because:
>>
>> if i set this prefixes in core why i will using then the index()
>> method "and" the clients_index?
>>
>> Also for auth i set it in the app controller and it ask me every time
>> to login regardless of whether i´m in the admin section or the
>> frontend where i only want to output the content from db.
>>
>> Mybe i can change something in this auth controller to to only use it
>> in the admin section where the methods only called with the prefix
>> "admin_"...
>>
>>
>>
>>
>> 2010/7/16 Sam Sherlock 
>>
>> Configure admin and clients as prefixes in core.php
>>>
>>> then in clients controller
>>>
>>> admin_index()
>>> clients_index()
>>> index()
>>>
>>>  - S
>>>
>>>
>>>
>>>
>>> On 16 July 2010 00:11, Davor Ilic  wrote:
>>>
 My problem is i use now my own backend which i wrote it with cakephp
 but how i can use now the same controllers for my frontend not the 
 same as
 backend methods but the same controller ? example:

 i have an Controller: ClientsController in which an: admin_index()
 and index() but can´t use index() without asking mie to authentifacting
 me...
 how to solve this to see the frontend


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

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

>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.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.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.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 cak

Re: how i make backend and frontend?

2010-07-16 Thread Davor Ilic
i forgot used this routes:

Router::connect('/admin', array('controller' =>
'users','action'=>'login','admin'=>true));
 Router::connect('/admin/:controller/:action/*', array('admin' => true));
 Router::connect('/', array('controller' => 'contents', 'action' => 'index',
'admin'=>false));

2010/7/16 Davor Ilic 

> yes thats right. i tell app_controller to use the component auth but don´t
> know how to tell app_controller to use for auth the "admin_method" and for
> frontend this "method" in my case "admin_index()" and "index()"
>
>
> 2010/7/16 Sam Sherlock 
>
>> I am sorry I misunderstood your question.
>>
>> It sounds as if you your having an issue with the auth comp but you have
>> not posted your code
>>
>> are you being redirected to login for all controllers/actions?
>>
>>
>>  - S
>>
>>
>>
>>
>> On 16 July 2010 17:50, Davor Ilic  wrote:
>>
>>> don´t need this i already have an backend but need an frontend now with
>>> the same controllers
>>>
>>> 2010/7/16 Hugo M 
>>>
>>>
 http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated

 2010/7/16 Davor Ilic 

 hmmm don´t understand it well, because:
>
> if i set this prefixes in core why i will using then the index() method
> "and" the clients_index?
>
> Also for auth i set it in the app controller and it ask me every time
> to login regardless of whether i´m in the admin section or the
> frontend where i only want to output the content from db.
>
> Mybe i can change something in this auth controller to to only use it
> in the admin section where the methods only called with the prefix
> "admin_"...
>
>
>
>
> 2010/7/16 Sam Sherlock 
>
> Configure admin and clients as prefixes in core.php
>>
>> then in clients controller
>>
>> admin_index()
>> clients_index()
>> index()
>>
>>  - S
>>
>>
>>
>>
>> On 16 July 2010 00:11, Davor Ilic  wrote:
>>
>>> My problem is i use now my own backend which i wrote it with cakephp
>>> but how i can use now the same controllers for my frontend not the same 
>>> as
>>> backend methods but the same controller ? example:
>>>
>>> i have an Controller: ClientsController in which an: admin_index()
>>> and index() but can´t use index() without asking mie to authentifacting
>>> me...
>>> how to solve this to see the frontend
>>>
>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> You received this message because you are subscribed to the Google
>>> Groups "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google
>> Groups "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.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.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.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.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>

REST webservices does not respond with the right content type

2010-07-16 Thread ytbryan
Hi all,

I followed this http://book.cakephp.org/view/1239/The-Simple-Setup to
do REST webservices

but I am not getting the respond type as text/xml . it returns as text/
html.

I placed the below into my controller but it does not work.
$this->RequestHandler->respondAs('xml');
  $this->RequestHandler->setContent('xml');

Please advise.

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 i make backend and frontend?

2010-07-16 Thread Davor Ilic
yes thats right. i tell app_controller to use the component auth but don´t
know how to tell app_controller to use for auth the "admin_method" and for
frontend this "method" in my case "admin_index()" and "index()"

2010/7/16 Sam Sherlock 

> I am sorry I misunderstood your question.
>
> It sounds as if you your having an issue with the auth comp but you have
> not posted your code
>
> are you being redirected to login for all controllers/actions?
>
>
>  - S
>
>
>
>
> On 16 July 2010 17:50, Davor Ilic  wrote:
>
>> don´t need this i already have an backend but need an frontend now with
>> the same controllers
>>
>> 2010/7/16 Hugo M 
>>
>>
>>> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>>>
>>> 2010/7/16 Davor Ilic 
>>>
>>> hmmm don´t understand it well, because:

 if i set this prefixes in core why i will using then the index() method
 "and" the clients_index?

 Also for auth i set it in the app controller and it ask me every time to
 login regardless of whether i´m in the admin section or the frontend
 where i only want to output the content from db.

 Mybe i can change something in this auth controller to to only use it in
 the admin section where the methods only called with the prefix "admin_"...




 2010/7/16 Sam Sherlock 

 Configure admin and clients as prefixes in core.php
>
> then in clients controller
>
> admin_index()
> clients_index()
> index()
>
>  - S
>
>
>
>
> On 16 July 2010 00:11, Davor Ilic  wrote:
>
>> My problem is i use now my own backend which i wrote it with cakephp
>> but how i can use now the same controllers for my frontend not the same 
>> as
>> backend methods but the same controller ? example:
>>
>> i have an Controller: ClientsController in which an: admin_index() and
>> index() but can´t use index() without asking mie to authentifacting me...
>> how to solve this to see the frontend
>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google
>> Groups "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.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.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.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.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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check

Re: how i make backend and frontend?

2010-07-16 Thread Sam Sherlock
I am sorry I misunderstood your question.

It sounds as if you your having an issue with the auth comp but you have not
posted your code

are you being redirected to login for all controllers/actions?


 - S



On 16 July 2010 17:50, Davor Ilic  wrote:

> don´t need this i already have an backend but need an frontend now with the
> same controllers
>
> 2010/7/16 Hugo M 
>
>
>> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>>
>> 2010/7/16 Davor Ilic 
>>
>> hmmm don´t understand it well, because:
>>>
>>> if i set this prefixes in core why i will using then the index() method
>>> "and" the clients_index?
>>>
>>> Also for auth i set it in the app controller and it ask me every time to
>>> login regardless of whether i´m in the admin section or the frontend
>>> where i only want to output the content from db.
>>>
>>> Mybe i can change something in this auth controller to to only use it in
>>> the admin section where the methods only called with the prefix "admin_"...
>>>
>>>
>>>
>>>
>>> 2010/7/16 Sam Sherlock 
>>>
>>> Configure admin and clients as prefixes in core.php

 then in clients controller

 admin_index()
 clients_index()
 index()

  - S




 On 16 July 2010 00:11, Davor Ilic  wrote:

> My problem is i use now my own backend which i wrote it with cakephp
> but how i can use now the same controllers for my frontend not the same as
> backend methods but the same controller ? example:
>
> i have an Controller: ClientsController in which an: admin_index() and
> index() but can´t use index() without asking mie to authentifacting me...
> how to solve this to see the frontend
>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

 You received this message because you are subscribed to the Google
 Groups "CakePHP" group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.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.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.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.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: how i make backend and frontend?

2010-07-16 Thread Davor Ilic
don´t need this i already have an backend but need an frontend now with the
same controllers

2010/7/16 Hugo M 

>
> http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated
>
> 2010/7/16 Davor Ilic 
>
> hmmm don´t understand it well, because:
>>
>> if i set this prefixes in core why i will using then the index() method
>> "and" the clients_index?
>>
>> Also for auth i set it in the app controller and it ask me every time to
>> login regardless of whether i´m in the admin section or the frontend
>> where i only want to output the content from db.
>>
>> Mybe i can change something in this auth controller to to only use it in
>> the admin section where the methods only called with the prefix "admin_"...
>>
>>
>>
>>
>> 2010/7/16 Sam Sherlock 
>>
>> Configure admin and clients as prefixes in core.php
>>>
>>> then in clients controller
>>>
>>> admin_index()
>>> clients_index()
>>> index()
>>>
>>>  - S
>>>
>>>
>>>
>>>
>>> On 16 July 2010 00:11, Davor Ilic  wrote:
>>>
 My problem is i use now my own backend which i wrote it with cakephp but
 how i can use now the same controllers for my frontend not the same as
 backend methods but the same controller ? example:

 i have an Controller: ClientsController in which an: admin_index() and
 index() but can´t use index() without asking mie to authentifacting me...
 how to solve this to see the frontend


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

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

>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.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.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.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: how i make backend and frontend?

2010-07-16 Thread Hugo M
http://www.jamesfairhurst.co.uk/posts/view/creating_an_admin_section_with_cakephp_updated

2010/7/16 Davor Ilic 

> hmmm don´t understand it well, because:
>
> if i set this prefixes in core why i will using then the index() method
> "and" the clients_index?
>
> Also for auth i set it in the app controller and it ask me every time to
> login regardless of whether i´m in the admin section or the frontend where
> i only want to output the content from db.
>
> Mybe i can change something in this auth controller to to only use it in
> the admin section where the methods only called with the prefix "admin_"...
>
>
>
>
> 2010/7/16 Sam Sherlock 
>
> Configure admin and clients as prefixes in core.php
>>
>> then in clients controller
>>
>> admin_index()
>> clients_index()
>> index()
>>
>>  - S
>>
>>
>>
>>
>> On 16 July 2010 00:11, Davor Ilic  wrote:
>>
>>> My problem is i use now my own backend which i wrote it with cakephp but
>>> how i can use now the same controllers for my frontend not the same as
>>> backend methods but the same controller ? example:
>>>
>>> i have an Controller: ClientsController in which an: admin_index() and
>>> index() but can´t use index() without asking mie to authentifacting me...
>>> how to solve this to see the frontend
>>>
>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.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.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


tinyint(1) versus boolean.

2010-07-16 Thread Dérico Filho
Hi



Some of you might feel bugged when trying to access an TINYINT(1)
field in mysql with values different from 0 or 1.

It happens that CakePHP thinks TINYINT(1) is BOOLEAN. Therefore, 0 is
0/False and anything else but zero is 1/TRUE.

If it ever happens to you, you have two options.


First, you may change the field type to INT(1) -- which will wok
although it might change the way MySQL handle data.

Second, you may dike out the lines:
if (($col == 'tinyint' && $limit == 1) || $col == 'boolean') {
return 'boolean';
}
AND
'boolean' => array('name' => 'tinyint', 'limit' => '1')

>From cake/libs/model/datasources/dbo/dbo_mysql*.php


I hope it helps some of you.


Dérico.

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 i make backend and frontend?

2010-07-16 Thread Davor Ilic
hmmm don´t understand it well, because:

if i set this prefixes in core why i will using then the index() method
"and" the clients_index?

Also for auth i set it in the app controller and it ask me every time to
login regardless of whether i´m in the admin section or the frontend where i
only want to output the content from db.

Mybe i can change something in this auth controller to to only use it in the
admin section where the methods only called with the prefix "admin_"...




2010/7/16 Sam Sherlock 

> Configure admin and clients as prefixes in core.php
>
> then in clients controller
>
> admin_index()
> clients_index()
> index()
>
>  - S
>
>
>
>
> On 16 July 2010 00:11, Davor Ilic  wrote:
>
>> My problem is i use now my own backend which i wrote it with cakephp but
>> how i can use now the same controllers for my frontend not the same as
>> backend methods but the same controller ? example:
>>
>> i have an Controller: ClientsController in which an: admin_index() and
>> index() but can´t use index() without asking mie to authentifacting me...
>> how to solve this to see the frontend
>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.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: cake 1.3.2 wants to be too smart

2010-07-16 Thread djogo
yeah, it's so stupidly easy to do it in MySQL, it's a shame that I
have to write any code at all in beforeSave() to accomplish the same
thing.

RAPID DEVELOPMENT, they say.

Maybe the model could have a "no-mess-field-list", or fields that will
be left alone when saving or updating.

On 15 jul, 03:30, Grzegorz Pawlik  wrote:
> Ofcourse I could, but I don't like to repeat myself. If I have this
> functionality in DB - I don't want to implement it in my scipts.
>
> This is not about that I can not continue because of that cake behavior. I
> can get a simple workaround working. This is more about concepts, principles
> behind cake and undocumented(?) behaviors.
>
> On 15 July 2010 06:33, Jeremy Burns | Class Outfit <
>
> jeremybu...@classoutfit.com> wrote:
> > I don't know if this would work for you and your set up, but could you
> > populate and set the timestamp from within Cake using the date() function
> > instead of relying on the database?
>
> > Jeremy Burns
> > Class Outfit
>
> > jeremybu...@classoutfit.com
> >http://www.classoutfit.com
>
> > On 15 Jul 2010, at 05:26, djogo wrote:
>
> > > Yes, this kind of suck. I wanted to have both created_at and
> > > updated_at fields, which I remember being trivial at mysql, but cake
> > > doesnt allow you to:
>
> > > - have two or more timestamp fields
> > > - name your timestamp field whatever you want
>
> > > On 13 jul, 04:11, Grzegorz Pawlik  wrote:
> > >> That's not what I'm asking about. Lets say I NEED to use TIMESTAMP and
> > >> CURRENT_TIMESTAMP as default value, and in that case cakePHP
> > >> misbehaves.
>
> > >> On Jul 13, 7:04 am, Walther  wrote:
>
> > >>> I've never seen that problem before...
>
> > >>> Cake offers the same functionality, it is well documented in every
> > >>> book. Basically you crater a field called created or updated as a
> > >>> datetime, default null and cake will populate it automatically.
>
> > >>> On Jul 12, 5:02 pm, Grzegorz Pawlik  wrote:
>
> >  just switching from 1.3.0 to 1.3.2 got me into trouble, when I have
> >  field specified as:
>
> >    `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
>
> >  and don't supply any value for that field in array I try to save ,
> >  neither a key in
> >  1.3.0 it's working as desired - I get current timestamp in that field,
> >  but
> >  1.3.2 tries looks that's it not null field, and read default value
> >  (CURRENT_TIMESTAMP) ant unfortunatelly polupulates this array with
> >  that pair of key/val:
> >  "createt_at"=>"CURRENT_TIMESTAMP"
> >  which is basically stupid for two reasons, I think:
> >  1. It tries to duplicate database mechanisms which are working just
> >  fine (when no value - use default value, no need to to that:
> >  if no value, check what's default value defined in database and
> >  explicitly save data with that value)
> >  2. It makes CURRENT_TIMESTAMP not working
>
> >  is there a way to turn that behavior off?
>
> > > 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.comFor
> > >  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
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> --
> Grzegorz Pawlik
> 695 146 983
> grzegorzpaw...@gmail.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


Re: Custom helpers not loaded

2010-07-16 Thread Ragnis
It is inside AccessHelper.
AccessHelper: http://gist.github.com/478497

On Jul 16, 4:45 pm, cricket  wrote:
> On Fri, Jul 16, 2010 at 7:18 AM, Ragnis  wrote:
> > After I moved from a shared hosting to a VPS cake 1.3.2 does not load
> > custom helpers.
> > All core helpers are loaded, but not my custom helpers.
>
> > I my controller i have
> > public $helpers = array('Session', 'Html', 'Form', 'Access',
> > 'Recaptcha');
>
> > When i try to use a custom helper from view, i get an error message:
> > Fatal error: Call to undefined method stdClass::setCurrentUserData()
> > in /var/www/***.git/app/views/layouts/default.ctp on line 5
>
> Where does setCurrentUserData() method come from? How is it being
> called? This doesn't appear to be a problem with Helpers not being
> loaded. In that case, it should complain that object itself is
> undefined.

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: setFlash not displaying

2010-07-16 Thread StephenE

I am using 1.3.  Your suggestion worked.  Thanks!

>From the perspective of a newbie, the CakePHP 1.3 manual needs better
documentation on the setFlash() method.  They need an example of how
to implement it that actually works.


On Jul 16, 10:25 am, Jeremy Burns | Class Outfit
 wrote:
> Which version of Cake are you using?
>
> There's no need to check for the presence of a message; ->flash() takes care 
> of that for you.
>
> On 1.3:
> echo $this->Session->flash();
>
> On 1.2:
> $this->Session->flash();
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 16 Jul 2010, at 05:58, StephenE wrote:
>
>
>
> > Hello, newbie here.  I cannot get setFlash() to display a message on
> > my view page.
>
> > In the controller:
>
> > $this->Session->setFlash('Please enter the correct number.',
> > 'register', array('class' => 'error-message'));
>
> > In the view page register.ctp:
>
> > check('Message.flash')) { $session->flash();}?>
>
> > This seems so simple.  What am I doing wrong?  Thanks for the help!
>
> > 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.com For more options, visit this group 
> > athttp://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: Connecting two tables with diffrent/ special key

2010-07-16 Thread Jeremy Burns | Class Outfit
Got it. Can I make a suggestion? This suggests poor data integrity as child 
records (favs) can exist after the parent record (products) have been deleted. 
Would it not be better to mark a product as 'deleted' rather than actually 
deleting it?

Jeremy Burns
Class Outfit

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

On 16 Jul 2010, at 15:21, brototyp wrote:

> @Jeremy: Normally these Fields would be the same. But the Product
> table is changing every day. And if a product is gone, I need the
> Information the favs table (That a user added a pruduct to his favs,
> which isn't there anymore), so I can't just join these two tables.
> 
> @Master Ram: Thanks for your answer, I tried Sams solution, but Im
> sure your is working also.
> 
> @Sam: Thanks Sam solution seems to work. I added in my Fav Model:
> 
> var $belongsTo = array(
>'Product' => array(
>'className' => 'Product',
>'foreignKey'=> false,
>'conditions'=> 'Product.zupid = Fav.zupid'
>)
> 
> and all information shows up.
> 
> What doesn'T work so far is connecting the Product to Favs table. My
> code gets interrupted by adding this:
> 
> In your Product model...
> var $hasMany = array(
>'Fav' => array(
>'className' => 'Fav',
>'foreignKey'=> false,
>'conditions'=> 'Product.zupid = Fav.zupid'
>)
> 
> I will try some more time. And if it doesn'T work, I will come back to
> you.
> 
> Thanks guys for your help, App it.
> 
> Best,
> Björn
> 
> 
> 
> 
> 
> 
> On 13 Jul., 07:02, Sam  wrote:
>> Assuming your favs table produces a Fav model(note, I haven't tested
>> this but it *should* work)
>> In your Fav model...
>> var $belongsTo = array(
>> 'Product' => array(
>> 'className' => 'Product',
>> 'foreignKey'=> false,
>> 'conditions'=> 'Product.zupid = Fav.zupid'
>> )
>> 
>> In your Product model...
>> var $hasMany = array(
>> 'Fav' => array(
>> 'className' => 'Fav',
>> 'foreignKey'=> false,
>> 'conditions'=> 'Product.zupid = Fav.zupid'
>> )
>> 
>> On Jul 12, 6:56 pm, brototyp  wrote:
>> 
>>> Hi guys, I'm pretty new in Cake and I have an issue with connecting
>>> two tables.
>> 
>>> I have a product table (product) with:
>> 
>>> id (auto increment), zupid (a unique product id key), productname,
>>> product_id, product price  .
>> 
>>> and an other table (favs) with:
>> 
>>> id (auto increment), zupid, user_id, stats.
>> 
>>> Now I would like to connect those tables somehow with zupid as key (it
>>> has to be zupid).
>>> The reason for connecting is, that I want to have all product data
>>> when accessing the fav table in the favs view.
>>> So far, I only get the data from the favs table.
>> 
>>> Thanks in advance!
>>> Best,
>>> b
> 
> 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: CakePHP 1.3 Form Helper creating drop down and not input field

2010-07-16 Thread Jeremy Burns | Class Outfit
The form helper will automatically create a drop down is there is a variable 
that is a plural of a field name without it's '_id' at the end.

For example, if you set a variable called $towns in your controller populated 
by $this->Town->find('list'); and then have a form input called town_id, Cake 
will link them up and make a drop down called town_id populated with the 
contents of the $towns array.

I can only presume that you have one such variable that matches a field name, 
and the rest don't.

What is your desired outcome? Should they all be drop downs (in which case 
you'll need to set the array variables in your controller) or should they all 
be inputs (in which case you should add the 'type' => 'text' option to your 
form input).

Jeremy Burns
Class Outfit

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

On 16 Jul 2010, at 15:14, spheroid wrote:

> I have a database table that contains child records of another table
> and want users to be able to change those child records. The form
> helper is doing something strange. I have it loop through my fields
> which are varchar, and for some reason one field is creating a select
> drop down, all others an input. Why is this happening and how can I
> fix it?
> 
> Portion of my view:
> 
> echo $form->input($somestring['MyTableName']['fieldname'], array(
>'div' => false,
>'label' => $somestring['MyTableName']
> ['fieldname_text'],
>'before' => '',
>'between' => ': *',
>'after' => '',
>'size' => 65,
>'default' => $somestring['MyTableName']['setting']
>));
> 
> 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: setFlash not displaying

2010-07-16 Thread Jeremy Burns | Class Outfit
Which version of Cake are you using?

There's no need to check for the presence of a message; ->flash() takes care of 
that for you.

On 1.3:
echo $this->Session->flash();

On 1.2:
$this->Session->flash();

Jeremy Burns
Class Outfit

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

On 16 Jul 2010, at 05:58, StephenE wrote:

> 
> Hello, newbie here.  I cannot get setFlash() to display a message on
> my view page.
> 
> In the controller:
> 
> $this->Session->setFlash('Please enter the correct number.',
> 'register', array('class' => 'error-message'));
> 
> In the view page register.ctp:
> 
> check('Message.flash')) { $session->flash();}?>
> 
> This seems so simple.  What am I doing wrong?  Thanks for the 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+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: Connecting two tables with diffrent/ special key

2010-07-16 Thread brototyp
@Jeremy: Normally these Fields would be the same. But the Product
table is changing every day. And if a product is gone, I need the
Information the favs table (That a user added a pruduct to his favs,
which isn't there anymore), so I can't just join these two tables.

@Master Ram: Thanks for your answer, I tried Sams solution, but Im
sure your is working also.

@Sam: Thanks Sam solution seems to work. I added in my Fav Model:

var $belongsTo = array(
'Product' => array(
'className' => 'Product',
'foreignKey'=> false,
'conditions'=> 'Product.zupid = Fav.zupid'
)

and all information shows up.

What doesn'T work so far is connecting the Product to Favs table. My
code gets interrupted by adding this:

In your Product model...
var $hasMany = array(
'Fav' => array(
'className' => 'Fav',
'foreignKey'=> false,
'conditions'=> 'Product.zupid = Fav.zupid'
)

I will try some more time. And if it doesn'T work, I will come back to
you.

Thanks guys for your help, App it.

Best,
Björn






On 13 Jul., 07:02, Sam  wrote:
> Assuming your favs table produces a Fav model(note, I haven't tested
> this but it *should* work)
> In your Fav model...
> var $belongsTo = array(
>         'Product' => array(
>             'className'     => 'Product',
>             'foreignKey'    => false,
>             'conditions'    => 'Product.zupid = Fav.zupid'
>         )
>
> In your Product model...
> var $hasMany = array(
>     'Fav' => array(
>         'className'     => 'Fav',
>         'foreignKey'    => false,
>         'conditions'    => 'Product.zupid = Fav.zupid'
>     )
>
> On Jul 12, 6:56 pm, brototyp  wrote:
>
> > Hi guys, I'm pretty new in Cake and I have an issue with connecting
> > two tables.
>
> > I have a product table (product) with:
>
> > id (auto increment), zupid (a unique product id key), productname,
> > product_id, product price  .
>
> > and an other table (favs) with:
>
> > id (auto increment), zupid, user_id, stats.
>
> > Now I would like to connect those tables somehow with zupid as key (it
> > has to be zupid).
> > The reason for connecting is, that I want to have all product data
> > when accessing the fav table in the favs view.
> > So far, I only get the data from the favs table.
>
> > Thanks in advance!
> > Best,
> > b

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

2010-07-16 Thread RhythmicDevil
Thank you.

On Jul 16, 10:02 am, cricket  wrote:
> On Fri, Jul 16, 2010 at 9:59 AM, RhythmicDevil  
> wrote:
> > Ok I get you, that makes more sense. I will look into implementing
> > that.
>
> The more I think about it, the more I want to try it. I might take a
> swing at it this weekend. I'll let you know if I do and can get it to
> work.

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


CakePHP 1.3 Form Helper creating drop down and not input field

2010-07-16 Thread spheroid
I have a database table that contains child records of another table
and want users to be able to change those child records. The form
helper is doing something strange. I have it loop through my fields
which are varchar, and for some reason one field is creating a select
drop down, all others an input. Why is this happening and how can I
fix it?

Portion of my view:

echo $form->input($somestring['MyTableName']['fieldname'], array(
'div' => false,
'label' => $somestring['MyTableName']
['fieldname_text'],
'before' => '',
'between' => ': *',
'after' => '',
'size' => 65,
'default' => $somestring['MyTableName']['setting']
));

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

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 9:59 AM, RhythmicDevil  wrote:
> Ok I get you, that makes more sense. I will look into implementing
> that.

The more I think about it, the more I want to try it. I might take a
swing at it this weekend. I'll let you know if I do and can get it to
work.

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: SecurityComponent Logs

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 9:30 AM, jdbartlett  wrote:
> SecurityComponent is good for protecting against CSRF attacks, but
> when I encounter a black hole while debugging an app, I want to know
> why. When SecurityComponent black holes a request, it's only capable
> of telling you one thing: you sent a bad request. That's good for
> production--you want attackers to have as little information as
> possible--but it's frustrating for developers who are debugging their
> code.
>
> I think it would be helpful if there were an option to have
> SecurityComponent and FormHelper log the unserialized field lists they
> use to produce token hashes.
>
> My idea is to create a security.log in tmp/logs with entries like:
> * [Time and Request URI] - Form field hash [hash] based on [field
> list]
> * [Time and Request URI] - Request field hash [hash] based on [field
> list]
> * [Time and Request URI] - Request field hash [hash] does not match
> Form field hash [hash]
>
> Because it's intended for debugging specific black holes, I think such
> logging should be a discrete configuration option for
> SecurityComponent. Developers would enable it only when they need to
> work out why a specific request is being black holed.
>
> Does anyone else think this would be helpful? Are there good reasons
> to avoid such an approach? I've hacked my own SecurityComponent and
> FormHelper forks to do this, but wanted the community's opinion on the
> idea before cleaning it up and submitting a patch/pull request.

One vote from me. That seems worthwhile. Perhaps a good approach would
be to create a plugin.

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: Mod_rewrite not work

2010-07-16 Thread xamako
I've solved

I changed EasyPHP by Xampp, and now everything works fine.

Thanks

On Jul 16, 12:33 am, Alok Mishra  wrote:
> File is not found root directory check link and file status
>
> Alok Mishra
> A1 Technology Chandigarh
>
>
>
> On Fri, Jul 16, 2010 at 3:56 AM, xamako  wrote:
> > Good night
>
> > I am testing a website developed with cakephp, and seems to me a 404
> > error.
>
> > I have found that the mod_rewrite module is enabled, phpinfo ().
>
> > .htaccess files are correct, since they are the default files
>
> > Any ideas?
>
> > Thanks
>
> > 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.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> --
> Alok Mishra

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

2010-07-16 Thread RhythmicDevil
Ok I get you, that makes more sense. I will look into implementing
that.

On Jul 16, 9:56 am, cricket  wrote:
> On Fri, Jul 16, 2010 at 9:37 AM, RhythmicDevil  
> wrote:
> > Thanks for the reply.
>
> > The number of channels is variable but always more than a 100.
>
> > I would prefer not to cache in the client as I would still have to
> > serve up an entire days worth of the schedule for every user.
>
> I meant to cache it on the server. You'd only be serving the entire
> day on that user's first request. Any subsequent request for earlier
> or later in the schedule for that day would simply slide the table
> left or right to the correct position.
>
> > I think my best option, if I cant get Cake to do it, is to use Memcache.
>
> Cake works very well with MemCache.

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

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 9:37 AM, RhythmicDevil  wrote:
> Thanks for the reply.
>
> The number of channels is variable but always more than a 100.
>
> I would prefer not to cache in the client as I would still have to
> serve up an entire days worth of the schedule for every user.

I meant to cache it on the server. You'd only be serving the entire
day on that user's first request. Any subsequent request for earlier
or later in the schedule for that day would simply slide the table
left or right to the correct position.

> I think my best option, if I cant get Cake to do it, is to use Memcache.

Cake works very well with MemCache.

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: Model Callback beforeDelete

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 7:35 AM, Warren  wrote:
> I'm trying to delete images when deleting the container of those
> images with a cascading model::delete
>
> The cascading works fine, but I can't get the model call back
> afterDelete to work properly so I can delete the actual image files
> when doing the delete.
>
> function beforeDelete() {
>        $containerId = $this->id;
>        $numberOfImages = $this->RelatedImage->find('count',
> array('conditions' => array('RelatedImage.container_id' =>
> 'containerId')));
>        if ($numberOfImages > 0){
>            $relatedImages = $this->RelatedImage->find('all',
> array('conditions' => array('RelatedImage.container_id' =>
> 'containerId')));
>                foreach ($relatedImages as $image) {
>                $myFile = WWW_ROOT . 'image' . $containerId . '_i' .
> $image['RelatedImage']['id']  . '.jpg';
>                unlink($myFile);
>                $myThumb = WWW_ROOT . 'img/' . $image['RelatedImage']
> ['thumbnail'];
>                unlink($myThumb);
>                }
>                return true;
>        } else{
>                return false;
>        }
>    }
>
> The if statement fails each time, even though I know there are images
> in the table.


My situation is a bit different than yours but this is what I have in
my Gallery model:

protected $_tmp_slug;

function beforeDelete()
{
$this->_tmp_slug = $this->field('slug');
return true;
}


function afterDelete()
{
$data = $this->Image->find(
'all',
array(
'conditions' => array(
'Image.gallery_id' => $this->id
),
'contain' => array(
'Preview',
'Thumbnail'
)
)
);

foreach($data as $d)
{
if ($this->Image->Thumbnail->delete($d['Thumbnail']['id']))
{
unlink(WWW_ROOT . $d['Thumbnail']['directory'] . '/' .
$d['Thumbnail']['basename']);
}

if ($this->Image->Preview->delete($d['Preview']['id']))
{
unlink(WWW_ROOT . $d['Preview']['directory'] . '/' .
$d['Preview']['basename']);
}

if ($this->Image->delete($d['Image']['id']))
{
unlink(WWW_ROOT . $d['Image']['directory'] . '/' . 
$d['Image']['basename']);
}   
}

$gallery_thumb_id = $this->GalleryThumb->field(
'id',
array('GalleryThumb.gallery_id' => $this->id)
);

$this->GalleryThumb->delete($gallery_thumb_id);

rmdir(WWW_ROOT . 'img/galleries/' . $this->_tmp_slug);

$this->_tmp_slug = null;
}

GalleryThumb is a simple model to specify which Thumb will be used to
represent an entire Gallery.

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


SecurityComponent Logs

2010-07-16 Thread jdbartlett
SecurityComponent is good for protecting against CSRF attacks, but
when I encounter a black hole while debugging an app, I want to know
why. When SecurityComponent black holes a request, it's only capable
of telling you one thing: you sent a bad request. That's good for
production--you want attackers to have as little information as
possible--but it's frustrating for developers who are debugging their
code.

I think it would be helpful if there were an option to have
SecurityComponent and FormHelper log the unserialized field lists they
use to produce token hashes.

My idea is to create a security.log in tmp/logs with entries like:
* [Time and Request URI] - Form field hash [hash] based on [field
list]
* [Time and Request URI] - Request field hash [hash] based on [field
list]
* [Time and Request URI] - Request field hash [hash] does not match
Form field hash [hash]

Because it's intended for debugging specific black holes, I think such
logging should be a discrete configuration option for
SecurityComponent. Developers would enable it only when they need to
work out why a specific request is being black holed.

Does anyone else think this would be helpful? Are there good reasons
to avoid such an approach? I've hacked my own SecurityComponent and
FormHelper forks to do this, but wanted the community's opinion on the
idea before cleaning it up and submitting a patch/pull request.

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: applying css to form input fields

2010-07-16 Thread Hilton Gonçalves
Hello Tomfox,

is possible in two ways:
1 - by jquery http://api.jquery.com/child-selector/
eg.:   $('.loginfield :text').addClass('');
or
2 - by css
eg.: .loginfield input[type=text]{xx:z}

bye,

Hilton

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


setFlash not displaying

2010-07-16 Thread StephenE

Hello, newbie here.  I cannot get setFlash() to display a message on
my view page.

In the controller:

$this->Session->setFlash('Please enter the correct number.',
'register', array('class' => 'error-message'));

In the view page register.ctp:

check('Message.flash')) { $session->flash();}?>

This seems so simple.  What am I doing wrong?  Thanks for the 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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Mod_rewrite not work

2010-07-16 Thread Alok Mishra
File is not found root directory check link and file status

Alok Mishra
A1 Technology Chandigarh
On Fri, Jul 16, 2010 at 3:56 AM, xamako  wrote:

> Good night
>
> I am testing a website developed with cakephp, and seems to me a 404
> error.
>
> I have found that the mod_rewrite module is enabled, phpinfo ().
>
> .htaccess files are correct, since they are the default files
>
> Any ideas?
>
> Thanks
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Alok Mishra

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


Investment Software

2010-07-16 Thread Charles Blackwell
Hi. I am kinda new to PHP and very new to Cake and OOP. I want to
develop a simple interface to track investments in a company. The app
would support a number of investors. I want the app to have a profile
page for each investor that displays their info such as name, start
date, initial investment and interest earned.

>From what I have read, it looks like I would need to develop a user
module and a transaction module. The user module obviously would be
where I stored all my user information. I thinking the transaction
module would be where I store things like interest earned, account
withdraws, etc.

Also, I will need some authentication with this since it would be
using sensitive data.

Does that look about right? Do you think that I would need anything
else to accomplish this programming task?
Can someone help guide me through this project?

Thanks.

C

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: Nickname routing question

2010-07-16 Thread Hugo Massaroli
Wow! I loved your solution. I'll try it, thanks alot!

2010/7/16 cricket 

> On Thu, Jul 15, 2010 at 3:42 PM, Hugo Massaroli 
> wrote:
> > Hi CakePHP community! I have a doubt about routing and accesing models
> while
> > routing. The thing is I have two models:
> >
> > user, and group.
> >
> > Both have show pages.
> >
> > I want to have nicknames so I have a nicknames table and I want to access
> > the show method in this way:
> >
> > www.mydomain.com/thisismygroup1
> > www.mydomain.com/user34
> >
> > Nicknames table:
> > id
> > group_id
> > user_id
> > detail (nickname)
>
>
> Nicknames table:
> id
> model
> foreign_key
> name
>
> Fetch the row based on the requested name and redirect to the correct
> controller, passing the foreign_key value as ID. Or, better, associate
> this model with both User and Group so that your NicknamesController
> can get it straight from whichever model, eg.
> $this->Nicknames->Group->find(...). Then you'd jusy need to do:
>
> $this->viewPath = 'groups';
> $this->render('view') ;
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: Custom helpers not loaded

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 7:18 AM, Ragnis  wrote:
> After I moved from a shared hosting to a VPS cake 1.3.2 does not load
> custom helpers.
> All core helpers are loaded, but not my custom helpers.
>
> I my controller i have
> public $helpers = array('Session', 'Html', 'Form', 'Access',
> 'Recaptcha');
>
> When i try to use a custom helper from view, i get an error message:
> Fatal error: Call to undefined method stdClass::setCurrentUserData()
> in /var/www/***.git/app/views/layouts/default.ctp on line 5

Where does setCurrentUserData() method come from? How is it being
called? This doesn't appear to be a problem with Helpers not being
loaded. In that case, it should complain that object itself is
undefined.

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: Nickname routing question

2010-07-16 Thread cricket
On Thu, Jul 15, 2010 at 3:42 PM, Hugo Massaroli  wrote:
> Hi CakePHP community! I have a doubt about routing and accesing models while
> routing. The thing is I have two models:
>
> user, and group.
>
> Both have show pages.
>
> I want to have nicknames so I have a nicknames table and I want to access
> the show method in this way:
>
> www.mydomain.com/thisismygroup1
> www.mydomain.com/user34
>
> Nicknames table:
> id
> group_id
> user_id
> detail (nickname)


Nicknames table:
id
model
foreign_key
name

Fetch the row based on the requested name and redirect to the correct
controller, passing the foreign_key value as ID. Or, better, associate
this model with both User and Group so that your NicknamesController
can get it straight from whichever model, eg.
$this->Nicknames->Group->find(...). Then you'd jusy need to do:

$this->viewPath = 'groups';
$this->render('view') ;

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

2010-07-16 Thread RhythmicDevil
Thanks for the reply.

The number of channels is variable but always more than a 100.

I would prefer not to cache in the client as I would still have to
serve up an entire days worth of the schedule for every user. I
definitely have to cache on the server. I think my best option, if I
cant get Cake to do it, is to use Memcache.

On Jul 16, 9:21 am, cricket  wrote:
> On Fri, Jul 16, 2010 at 8:44 AM, RhythmicDevil  
> wrote:
> > Hello,
> > I have a view that shows a television schedule, similar to DirectTVs
> > (http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a list of
> > channels and programs in a 4 hour slice broken into 1/2 hour columns.
> > When the schedule first loads the start time is is the most recent 1/2
> > hour mark. Meaning that if its 7.03am the window will start at 7am. If
> > the time is 7.47am the window will start at 7.30. You are able to page
> > left and right in 1/2 hour chunks.
>
> > I am trying to improve performance of the view, as you can imagine its
> > a ton of data to compile and the HTML is fairly complex. My aim is
> > cache the most current schedule chunk. So assume the time is currently
> > 7.03am. The application gets it's first request for the schedule. The
> > controller fetches the schedule from the model starting at 7.00am and
> > then caches it. All subsequent requests for that particular start time
> > (7am) for all users will use the cached version until 7.30am at which
> > point the cache is cleared and process starts again.
>
> > I have implemented Cake's view caching and set the cache action as
> > follows:
>
> > $this->cacheAction = array('getTvSchedule/' => 1800);
>
> > This causes an obvious problem. If the first request for a schedule
> > comes after a 1/2 hour mark (7am, 7.30am, 8am etc) the cache will
> > refreshed a half hour after that time and not at the next half hour
> > mark. I can do some math to figure out the remaining time and use that
> > to set the cache timeout.
>
> > My big problem comes when paging right and left in time. The cache
> > manager does not recognize that a different request has been made and
> > it serves the current cached version. How do I get the cache manager
> > to see the difference?
>
> How many channels are you working with? My first thought is to cache
> the entire day's schedule and use javascript to display only a certain
> portion. Off the top of my head, I'm not quite sure how I'd do that
> but I'll bet there's a really elegant way to do that with, say,
> jquery. I'm thinking that you'd give the table colgroups [1] IDs based
> on the time (note that IDs cannot begin with a digit so prepend some
> string to each). Then have your JS parse out the hash portion of the
> URL to figure out from where to display from.
>
> So, your JS would, on page load, hide the entire table, then parse the
> location.hash value (if not exists, start from the beginning of the
> table), and then slide the table colgroups to the left (obviously, use
> CSS overflow to hide what is "off" the screen) until the desired time
> colgroup is at the left side. Then your paging links would simply call
> a JS function to slide the schedule left or right. No reloading the
> page.
>
> Does that make sense?
>
> BTW, with Cake, you can create a link with a hash value by using the
> '#' option in $html->link().
>
> [1]http://www.w3.org/TR/2010/WD-html-markup-20100624/colgroup.html

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: Nickname routing question

2010-07-16 Thread Hugo Massaroli
Nodoby? :(

2010/7/15 Hugo Massaroli 

> Hi CakePHP community! I have a doubt about routing and accesing models
> while routing. The thing is I have two models:
>
> user, and group.
>
> Both have show pages.
>
> I want to have nicknames so I have a nicknames table and I want to access
> the show method in this way:
>
> www.mydomain.com/thisismygroup1
> www.mydomain.com/user34
>
> Nicknames table:
> id
> group_id
> user_id
> detail (nickname)
>
> I can't use normal routing because I don't know to wich controller the
> nickname belongs to. I need to access Nickname model inside routes.php? Then
> if nickname has user_id I redirect to /users/show and if nickname has
> group_id I redirect to /groups/show. Is that ok? It's possibly and right to
> access a Model inside routes?
>

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: Best practice query - Where to render element

2010-07-16 Thread cricket
On Thu, Jul 15, 2010 at 5:28 PM, sanedevil  wrote:
> @Nabil, @Sam,
> thanks both for your ideas! I believe for consistency sake thruout the
> app, i'll stick to the controller->view->element chain (comin from a
> J2EE backgrnd, its hard to break conventions and rules :) ) But of
> course as you guys suggested, i can excuse myself in certain cases.

 I missed this thread earlier but I'll just chime in that I often
render elements from the controller. In my case, it's generally for
AJAX calls. On normal page load, the View calls the element (say, a
paged listing of Users) but, for an AJAX request, only the element
needs to be rendered.

if ($this->RequestHandler->isAjax())
{
$this->layout = false;
$this->viewPath = 'elements'.DS.'users';
$this->render('pagination');
}

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

2010-07-16 Thread cricket
On Fri, Jul 16, 2010 at 8:44 AM, RhythmicDevil  wrote:
> Hello,
> I have a view that shows a television schedule, similar to DirectTVs
> (http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a list of
> channels and programs in a 4 hour slice broken into 1/2 hour columns.
> When the schedule first loads the start time is is the most recent 1/2
> hour mark. Meaning that if its 7.03am the window will start at 7am. If
> the time is 7.47am the window will start at 7.30. You are able to page
> left and right in 1/2 hour chunks.
>
> I am trying to improve performance of the view, as you can imagine its
> a ton of data to compile and the HTML is fairly complex. My aim is
> cache the most current schedule chunk. So assume the time is currently
> 7.03am. The application gets it's first request for the schedule. The
> controller fetches the schedule from the model starting at 7.00am and
> then caches it. All subsequent requests for that particular start time
> (7am) for all users will use the cached version until 7.30am at which
> point the cache is cleared and process starts again.
>
> I have implemented Cake's view caching and set the cache action as
> follows:
>
> $this->cacheAction = array('getTvSchedule/' => 1800);
>
> This causes an obvious problem. If the first request for a schedule
> comes after a 1/2 hour mark (7am, 7.30am, 8am etc) the cache will
> refreshed a half hour after that time and not at the next half hour
> mark. I can do some math to figure out the remaining time and use that
> to set the cache timeout.
>
>
> My big problem comes when paging right and left in time. The cache
> manager does not recognize that a different request has been made and
> it serves the current cached version. How do I get the cache manager
> to see the difference?
>

How many channels are you working with? My first thought is to cache
the entire day's schedule and use javascript to display only a certain
portion. Off the top of my head, I'm not quite sure how I'd do that
but I'll bet there's a really elegant way to do that with, say,
jquery. I'm thinking that you'd give the table colgroups [1] IDs based
on the time (note that IDs cannot begin with a digit so prepend some
string to each). Then have your JS parse out the hash portion of the
URL to figure out from where to display from.

So, your JS would, on page load, hide the entire table, then parse the
location.hash value (if not exists, start from the beginning of the
table), and then slide the table colgroups to the left (obviously, use
CSS overflow to hide what is "off" the screen) until the desired time
colgroup is at the left side. Then your paging links would simply call
a JS function to slide the schedule left or right. No reloading the
page.

Does that make sense?

BTW, with Cake, you can create a link with a hash value by using the
'#' option in $html->link().

[1] http://www.w3.org/TR/2010/WD-html-markup-20100624/colgroup.html

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: Cannot send the email to more than one recipient.

2010-07-16 Thread cricket
On Thu, Jul 15, 2010 at 11:23 AM, LunarDraco  wrote:
>
> I moved to the swiftmailer component to make better use of the SMTP
> and ssl connections thus by passing most of whatever mail subsystem
> was installed on the host and connecting directly to a known dedicated
> smtp server. However I still send the email to one recipient.

I second the SwiftMailer suggestion. It also has a Throttler and an
AntiFlood plugin that are very useful if one has several hundred
addresses to send to (very bad idea to put them all in "to" for a
single email).

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: Mod_rewrite not work

2010-07-16 Thread cricket
On Thu, Jul 15, 2010 at 6:26 PM, xamako  wrote:
> Good night
>
> I am testing a website developed with cakephp, and seems to me a 404
> error.
>
> I have found that the mod_rewrite module is enabled, phpinfo ().
>
> .htaccess files are correct, since they are the default files
>
> Any ideas?

Set debug to 2 in core.php. Cake throws a 404 for *any* error (except
fatal) when debug is set to 0 (production mode). With it set to 2 it
should tell you where you have some error in your code.

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 populate my data (from one table) into combobox

2010-07-16 Thread cricket
On Thu, Jul 15, 2010 at 11:24 PM, Cruisine  wrote:
> the data had been shown in combobox..but why i still cant save the
> data into database?
> seems like it replaced the existing data that i choose from the
> combobox..
> how to solve that problem??


Set debug to 2 in core.php and then add:

if (!empty($this->data)) {
die(debug($this->data));

... in your action. That will cause Cake to stop processing and simply
display the submitted data. Post that here. Maybe there's something
else not quite right.

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: Assign Profile When User Registers

2010-07-16 Thread Anthony
 You would use the afterSave behavior on your users model.  I meant
model, not controller.


On Jul 16, 7:40 am, Anthony  wrote:
> You would use the afterSave behavior on your users controller.
>
> I think your better off using a belongsTo relationship in the case of
> a user profile though.
>
> This way your profile table contains the foreign key instead of the
> user's table.
>
> Otherwise you have to do nasty things like, save the profile first,
> get its ID, and then save it to the profile_id in the users table.
> When instead you can save the user, get its newly created ID, and then
> save the profile.  With this method I know transactions are used with
> the other route I'm sure you could but seems like it would be a pain.
>
> Someone please correct me if I'm wrong.
>
> On Jul 15, 8:03 am, "Daniel M.K."  wrote:
>
>
>
>
>
>
>
> > Hi Guys, i need a bit of help with this.
>
> > I have a hasOne relationship between USER and PROFILE, when user
> > registers it assigns a profile, this is fine. What i want to do is to
> > auto assign a profile that will already be inserted in the database,
> > by some fields like email, first name and last name.
>
> > Is this possible ? Thanks in advice.

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: Assign Profile When User Registers

2010-07-16 Thread Anthony
Also, you can still make use of pre-made profiles (it kind of seems
like thats what you were wanting to do, since you said the profile is
already inserted into the DB)

I would make a profile templates table, let the user select which one
or enter data, pull in the template data, over write anything the user
provided, then save it to the profile.  If your consistent with your
naming it can all be done really quickly without much overhead.


On Jul 16, 7:40 am, Anthony  wrote:
> You would use the afterSave behavior on your users controller.
>
> I think your better off using a belongsTo relationship in the case of
> a user profile though.
>
> This way your profile table contains the foreign key instead of the
> user's table.
>
> Otherwise you have to do nasty things like, save the profile first,
> get its ID, and then save it to the profile_id in the users table.
> When instead you can save the user, get its newly created ID, and then
> save the profile.  With this method I know transactions are used with
> the other route I'm sure you could but seems like it would be a pain.
>
> Someone please correct me if I'm wrong.
>
> On Jul 15, 8:03 am, "Daniel M.K."  wrote:
>
>
>
>
>
>
>
> > Hi Guys, i need a bit of help with this.
>
> > I have a hasOne relationship between USER and PROFILE, when user
> > registers it assigns a profile, this is fine. What i want to do is to
> > auto assign a profile that will already be inserted in the database,
> > by some fields like email, first name and last name.
>
> > Is this possible ? Thanks in advice.

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


Cache

2010-07-16 Thread RhythmicDevil
Hello,
I have a view that shows a television schedule, similar to DirectTVs
(http://www.directv.com/DTVAPP/epg/theGuide.jsp). It is a list of
channels and programs in a 4 hour slice broken into 1/2 hour columns.
When the schedule first loads the start time is is the most recent 1/2
hour mark. Meaning that if its 7.03am the window will start at 7am. If
the time is 7.47am the window will start at 7.30. You are able to page
left and right in 1/2 hour chunks.

I am trying to improve performance of the view, as you can imagine its
a ton of data to compile and the HTML is fairly complex. My aim is
cache the most current schedule chunk. So assume the time is currently
7.03am. The application gets it's first request for the schedule. The
controller fetches the schedule from the model starting at 7.00am and
then caches it. All subsequent requests for that particular start time
(7am) for all users will use the cached version until 7.30am at which
point the cache is cleared and process starts again.

I have implemented Cake's view caching and set the cache action as
follows:

$this->cacheAction = array('getTvSchedule/' => 1800);

This causes an obvious problem. If the first request for a schedule
comes after a 1/2 hour mark (7am, 7.30am, 8am etc) the cache will
refreshed a half hour after that time and not at the next half hour
mark. I can do some math to figure out the remaining time and use that
to set the cache timeout.


My big problem comes when paging right and left in time. The cache
manager does not recognize that a different request has been made and
it serves the current cached version. How do I get the cache manager
to see the difference?

Thanks.

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

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


Re: Assign Profile When User Registers

2010-07-16 Thread Anthony
You would use the afterSave behavior on your users controller.

I think your better off using a belongsTo relationship in the case of
a user profile though.

This way your profile table contains the foreign key instead of the
user's table.

Otherwise you have to do nasty things like, save the profile first,
get its ID, and then save it to the profile_id in the users table.
When instead you can save the user, get its newly created ID, and then
save the profile.  With this method I know transactions are used with
the other route I'm sure you could but seems like it would be a pain.

Someone please correct me if I'm wrong.

On Jul 15, 8:03 am, "Daniel M.K."  wrote:
> Hi Guys, i need a bit of help with this.
>
> I have a hasOne relationship between USER and PROFILE, when user
> registers it assigns a profile, this is fine. What i want to do is to
> auto assign a profile that will already be inserted in the database,
> by some fields like email, first name and last name.
>
> Is this possible ? Thanks in advice.

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: Tree Reorder: What Does it Do?

2010-07-16 Thread Kirk
Why are you editing the 1.2 documentation instead of 1.3? I submitted a more
complete documentation of the reorder function a week ago after looking
through the code, but still no one has approved it. I don't know what those
cake people are doing over there. I used reorder to order by name field,
which is default, and it worked fine. You just call $model->reorder(). It's
supposed to take an id as a parameter as well, but I got an error when I
tried to pass an id.

~Kirk

On Fri, Jul 16, 2010 at 8:30 AM, DragonFlyEye wrote:

> Ok, for those who happen upon this thread looking for a method of
> ordering their Tree children, I did a bit of digging into the actual
> code and discovered that there are in fact more arguments to the
> children() function than are documented in the Book. I've made
> corrections to the Book which will hopefully fill in soon:
> http://book.cakephp.org/view/228/Basic-Usage#Children-525
> children() in fact takes several arguments (though strangely, not in
> an $options array like you might expect from CakePHP) including an
> $order SQL ORDER BY statement. So, whatever reorder() is supposed to
> do, this is actually not the way to organize your tree structure for
> display.
>
> Hope that helps someone!! It's been a heck of a struggle for me,
> personally.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: Tree Reorder: What Does it Do?

2010-07-16 Thread DragonFlyEye
Ok, for those who happen upon this thread looking for a method of
ordering their Tree children, I did a bit of digging into the actual
code and discovered that there are in fact more arguments to the
children() function than are documented in the Book. I've made
corrections to the Book which will hopefully fill in soon:
http://book.cakephp.org/view/228/Basic-Usage#Children-525
children() in fact takes several arguments (though strangely, not in
an $options array like you might expect from CakePHP) including an
$order SQL ORDER BY statement. So, whatever reorder() is supposed to
do, this is actually not the way to organize your tree structure for
display.

Hope that helps someone!! It's been a heck of a struggle for me,
personally.

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 POPULATE DATA INTO COMBOBOX?

2010-07-16 Thread Anthony
In your view:

echo $this->Form->input('parent_id');

In your controllers action:

$parents = $this->User->Parents->find('list');
$this->set(compact('parents'));




On Jul 15, 9:27 pm, Cruisine  wrote:
> hi,i'm still newbie in cakePHP
> i have a problem to populate my data into combobox.
> i have one table named Category which have function to manage account
> (in finance) and sub account..
> the logic are account have many sub account,and sub account have many
> child..the field of the table represented in followings :
> id                  --->id of the account data
> parent_id       --->id parent of the account data
> name            --->name of the account
> when i want to make a new account (it can account,sub account and
> child) i want to select the parent of that account..it will get from
> field id..
> i tried to write the followings script into the controller :
>
> function categoryParent(){
>                 $parentinfo = 
> $this->Category->find('list',array('fields'=>array('Category.id','Category.name')));
>
>                 $this->set('idparent',$parentinfo);
>
> }
>
> but i still dont know how to call the variable "idparent" in "add"
> view...so i can populate all "id" (not parent_id) in combobox..
> can sombody help me to solve this problem?
>
> i've been attached my App to this link 
> :http://www.ziddu.com/download/10730967/CategoryApp.rar.html

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


Model Callback beforeDelete

2010-07-16 Thread Warren
I'm trying to delete images when deleting the container of those
images with a cascading model::delete

The cascading works fine, but I can't get the model call back
afterDelete to work properly so I can delete the actual image files
when doing the delete.

function beforeDelete() {
$containerId = $this->id;
$numberOfImages = $this->RelatedImage->find('count',
array('conditions' => array('RelatedImage.container_id' =>
'containerId')));
if ($numberOfImages > 0){
$relatedImages = $this->RelatedImage->find('all',
array('conditions' => array('RelatedImage.container_id' =>
'containerId')));
foreach ($relatedImages as $image) {
$myFile = WWW_ROOT . 'image' . $containerId . '_i' .
$image['RelatedImage']['id']  . '.jpg';
unlink($myFile);
$myThumb = WWW_ROOT . 'img/' . $image['RelatedImage']
['thumbnail'];
unlink($myThumb);
}
return true;
} else{
return false;
}
}

The if statement fails each time, even though I know there are images
in the table.

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 helpers not loaded

2010-07-16 Thread Ragnis
After I moved from a shared hosting to a VPS cake 1.3.2 does not load
custom helpers.
All core helpers are loaded, but not my custom helpers.

I my controller i have
public $helpers = array('Session', 'Html', 'Form', 'Access',
'Recaptcha');

When i try to use a custom helper from view, i get an error message:
Fatal error: Call to undefined method stdClass::setCurrentUserData()
in /var/www/***.git/app/views/layouts/default.ctp on line 5

I also used debug($this); in my view and my custom helpers aren't
shown there either.

It is also possible that the problem is somewhere in my php.ini.
My php.ini file: http://gist.github.com/478241
And i'm using php version 5.3.x

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: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread xamako
First I am trying to migrate to version 1.2

Thanks

On Jul 16, 12:38 pm, xamako  wrote:
> I am trying to upgrade to version 1.3, but there are many errors, you
> know someone guide
>
> I've looked at:
>
> http://mark-story.com/posts/view/getting-a-new-oven-migrating-from-ca...
>
> http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2
>
> Thanks
>
> On Jul 16, 9:35 am, xamako  wrote:
>
> > Ok
>
> > I'm try upgrade to 1.2.
>
> > Thanks!
>
> > On Jul 16, 9:33 am, mike karthauser  wrote:
>
> > > Cake 1.1.* is not compatible with php5.3.
>
> > > You are either going to need to upgrade your app to a recent version of 
> > > 1.2.* or find a version of php < 5.3
>
> > > Mike Karthauser
> > > Brightstorm limited
> > > Tel: 07939252144
>
> > > On 16 Jul 2010, at 08:26, xamako  wrote:
>
> > > > Hi!
>
> > > > I'm trying to run a project written in cakephp 1.1.11.4064 on a server
> > > > PHP 5.3.2, but fails.
>
> > > > These are the errors:
>
> > > > Strict Standards: Redefining already defined constructor for class
> > > > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake
> > > > \libs\object.php on line 69
>
> > > > Deprecated: Assigning the return value of new by reference is
> > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > > \cake\libs\object.php on line 94
>
> > > > Deprecated: Assigning the return value of new by reference is
> > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > > \cake\libs\security.php on line 48
>
> > > > Deprecated: Assigning the return value of new by reference is
> > > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > > \cake\libs\configure.php on line 82
>
> > > > Strict Standards: Non-static method Configure::getInstance() should
> > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > > > \amyadler\new_site\cake\bootstrap.php on line 43
>
> > > > Strict Standards: Non-static method Configure::write() should not be
> > > > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler
> > > > \new_site\cake\bootstrap.php on line 82
>
> > > > Strict Standards: Non-static method Configure::getInstance() should
> > > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > > > \amyadler\new_site\cake\libs\configure.php on line 102
>
> > > > Any solution?
>
> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > > 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 athttp://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: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread Jon Bennett
http://book.cakephp.org/view/1561/Migrating-from-CakePHP-1-2-to-1-3

j

On 16 July 2010 11:38, xamako  wrote:
> I am trying to upgrade to version 1.3, but there are many errors, you
> know someone guide
>
> I've looked at:
>
> http://mark-story.com/posts/view/getting-a-new-oven-migrating-from-cakephp-1-1-to-1-2
>
> http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2
>
> Thanks
>
> On Jul 16, 9:35 am, xamako  wrote:
>> Ok
>>
>> I'm try upgrade to 1.2.
>>
>> Thanks!
>>
>> On Jul 16, 9:33 am, mike karthauser  wrote:
>>
>> > Cake 1.1.* is not compatible with php5.3.
>>
>> > You are either going to need to upgrade your app to a recent version of 
>> > 1.2.* or find a version of php < 5.3
>>
>> > Mike Karthauser
>> > Brightstorm limited
>> > Tel: 07939252144
>>
>> > On 16 Jul 2010, at 08:26, xamako  wrote:
>>
>> > > Hi!
>>
>> > > I'm trying to run a project written in cakephp 1.1.11.4064 on a server
>> > > PHP 5.3.2, but fails.
>>
>> > > These are the errors:
>>
>> > > Strict Standards: Redefining already defined constructor for class
>> > > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake
>> > > \libs\object.php on line 69
>>
>> > > Deprecated: Assigning the return value of new by reference is
>> > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
>> > > \cake\libs\object.php on line 94
>>
>> > > Deprecated: Assigning the return value of new by reference is
>> > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
>> > > \cake\libs\security.php on line 48
>>
>> > > Deprecated: Assigning the return value of new by reference is
>> > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
>> > > \cake\libs\configure.php on line 82
>>
>> > > Strict Standards: Non-static method Configure::getInstance() should
>> > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
>> > > \amyadler\new_site\cake\bootstrap.php on line 43
>>
>> > > Strict Standards: Non-static method Configure::write() should not be
>> > > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler
>> > > \new_site\cake\bootstrap.php on line 82
>>
>> > > Strict Standards: Non-static method Configure::getInstance() should
>> > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
>> > > \amyadler\new_site\cake\libs\configure.php on line 102
>>
>> > > Any solution?
>>
>> > > 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.com For more options, visit this group 
>> > > athttp://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
>



-- 
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: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread xamako
I am trying to upgrade to version 1.3, but there are many errors, you
know someone guide

I've looked at:

http://mark-story.com/posts/view/getting-a-new-oven-migrating-from-cakephp-1-1-to-1-2

http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2

Thanks

On Jul 16, 9:35 am, xamako  wrote:
> Ok
>
> I'm try upgrade to 1.2.
>
> Thanks!
>
> On Jul 16, 9:33 am, mike karthauser  wrote:
>
> > Cake 1.1.* is not compatible with php5.3.
>
> > You are either going to need to upgrade your app to a recent version of 
> > 1.2.* or find a version of php < 5.3
>
> > Mike Karthauser
> > Brightstorm limited
> > Tel: 07939252144
>
> > On 16 Jul 2010, at 08:26, xamako  wrote:
>
> > > Hi!
>
> > > I'm trying to run a project written in cakephp 1.1.11.4064 on a server
> > > PHP 5.3.2, but fails.
>
> > > These are the errors:
>
> > > Strict Standards: Redefining already defined constructor for class
> > > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake
> > > \libs\object.php on line 69
>
> > > Deprecated: Assigning the return value of new by reference is
> > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > \cake\libs\object.php on line 94
>
> > > Deprecated: Assigning the return value of new by reference is
> > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > \cake\libs\security.php on line 48
>
> > > Deprecated: Assigning the return value of new by reference is
> > > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > > \cake\libs\configure.php on line 82
>
> > > Strict Standards: Non-static method Configure::getInstance() should
> > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > > \amyadler\new_site\cake\bootstrap.php on line 43
>
> > > Strict Standards: Non-static method Configure::write() should not be
> > > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler
> > > \new_site\cake\bootstrap.php on line 82
>
> > > Strict Standards: Non-static method Configure::getInstance() should
> > > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > > \amyadler\new_site\cake\libs\configure.php on line 102
>
> > > Any solution?
>
> > > 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.com For more options, visit this group 
> > > athttp://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: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread Tilen Majerle
haha true...
--
LP,
Tilen Majerle http://majerle.eu


2010/7/16 Jon Bennett 

> > I'm try upgrade to 1.2.
>
> Why not upgrade to 1.3?
>
> j
>
> --
> jon bennett - www.jben.net - blog.jben.net
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.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: FULL TEXT SEARCH

2010-07-16 Thread Jon Bennett
>   i am using ordinary search functionality in my business controller . but
> now need to implement FULL TEXT SEARCH.
> can any one give idea ?? Thanks in advance
>

take a look at http://code.google.com/p/searchable-behaviour-for-cakephp/

j

-- 
jon bennett - www.jben.net - blog.jben.net

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

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


Re: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread Jon Bennett
> I'm try upgrade to 1.2.

Why not upgrade to 1.3?

j

-- 
jon bennett - www.jben.net - blog.jben.net

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

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


Re: FULL TEXT SEARCH

2010-07-16 Thread Annamalai
Yes i following like this only.. thanx lot

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: Cake POPUP new window

2010-07-16 Thread grigri
If it's static, put the `help.htm` file inside `app/webroot/`, then
link like so:

'onclick' => 'newPopup("' . $html->url('/help.htm') . '");',

hth
grigri

On Jul 16, 8:37 am, Master Ram  wrote:
> there is no. action is to be done in the help file. that help file is
> static. and it contain only information about the related page.
>
> On Jul 16, 12:31 pm, mike karthauser  wrote:
>
> > You can't load HTML files out of a views folder. The file extension needs 
> > to be .ctp . Also check you have and action defined with the same name as 
> > your view
>
> > Mike Karthauser
> > Brightstorm limited
> > Tel: 07939252144
>
> > On 16 Jul 2010, at 08:23, Master Ram  wrote:
>
> > > hi..
>
> > > i want to popup new window in my ctp. file
>
> > > i am using the link. and i want to call "help.htm" file,
>
> > > my HTML file contain in the "promoters" view folder
>
> > > the file name is help.htm.
>
> > > i use this code
>
> > > link('Add/edit languages',
> > >                                        'javascript:void(0)',
> > >                                         array(
> > >                      'onclick' => "newPopup('http://localhost/
> > > promodiary_mvc/promoters/languages_help' );",
> > >                                        'class' => 'result_text',
> > >                                        'style' => 'text-
> > > decoration:none;')));
> > >                    ?>
>
> > > but i am getting file not found in this server .
>
> > > 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.com For more options, visit this group 
> > > athttp://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: Cake POPUP new window

2010-07-16 Thread Master Ram
there is no. action is to be done in the help file. that help file is
static. and it contain only information about the related page.








On Jul 16, 12:31 pm, mike karthauser  wrote:
> You can't load HTML files out of a views folder. The file extension needs to 
> be .ctp . Also check you have and action defined with the same name as your 
> view
>
> Mike Karthauser
> Brightstorm limited
> Tel: 07939252144
>
> On 16 Jul 2010, at 08:23, Master Ram  wrote:
>
> > hi..
>
> > i want to popup new window in my ctp. file
>
> > i am using the link. and i want to call "help.htm" file,
>
> > my HTML file contain in the "promoters" view folder
>
> > the file name is help.htm.
>
> > i use this code
>
> > link('Add/edit languages',
> >                                        'javascript:void(0)',
> >                                         array(
> >                      'onclick' => "newPopup('http://localhost/
> > promodiary_mvc/promoters/languages_help' );",
> >                                        'class' => 'result_text',
> >                                        'style' => 'text-
> > decoration:none;')));
> >                    ?>
>
> > but i am getting file not found in this server .
>
> > 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.com For more options, visit this group 
> > athttp://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: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread xamako
Ok

I'm try upgrade to 1.2.

Thanks!

On Jul 16, 9:33 am, mike karthauser  wrote:
> Cake 1.1.* is not compatible with php5.3.
>
> You are either going to need to upgrade your app to a recent version of 1.2.* 
> or find a version of php < 5.3
>
> Mike Karthauser
> Brightstorm limited
> Tel: 07939252144
>
> On 16 Jul 2010, at 08:26, xamako  wrote:
>
> > Hi!
>
> > I'm trying to run a project written in cakephp 1.1.11.4064 on a server
> > PHP 5.3.2, but fails.
>
> > These are the errors:
>
> > Strict Standards: Redefining already defined constructor for class
> > Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake
> > \libs\object.php on line 69
>
> > Deprecated: Assigning the return value of new by reference is
> > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > \cake\libs\object.php on line 94
>
> > Deprecated: Assigning the return value of new by reference is
> > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > \cake\libs\security.php on line 48
>
> > Deprecated: Assigning the return value of new by reference is
> > deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> > \cake\libs\configure.php on line 82
>
> > Strict Standards: Non-static method Configure::getInstance() should
> > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > \amyadler\new_site\cake\bootstrap.php on line 43
>
> > Strict Standards: Non-static method Configure::write() should not be
> > called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler
> > \new_site\cake\bootstrap.php on line 82
>
> > Strict Standards: Non-static method Configure::getInstance() should
> > not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> > \amyadler\new_site\cake\libs\configure.php on line 102
>
> > Any solution?
>
> > 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.com For more options, visit this group 
> > athttp://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: Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread mike karthauser
Cake 1.1.* is not compatible with php5.3.

You are either going to need to upgrade your app to a recent version of 1.2.* 
or find a version of php < 5.3

Mike Karthauser
Brightstorm limited
Tel: 07939252144

On 16 Jul 2010, at 08:26, xamako  wrote:

> Hi!
> 
> I'm trying to run a project written in cakephp 1.1.11.4064 on a server
> PHP 5.3.2, but fails.
> 
> These are the errors:
> 
> Strict Standards: Redefining already defined constructor for class
> Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake
> \libs\object.php on line 69
> 
> Deprecated: Assigning the return value of new by reference is
> deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> \cake\libs\object.php on line 94
> 
> Deprecated: Assigning the return value of new by reference is
> deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> \cake\libs\security.php on line 48
> 
> Deprecated: Assigning the return value of new by reference is
> deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
> \cake\libs\configure.php on line 82
> 
> Strict Standards: Non-static method Configure::getInstance() should
> not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> \amyadler\new_site\cake\bootstrap.php on line 43
> 
> Strict Standards: Non-static method Configure::write() should not be
> called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler
> \new_site\cake\bootstrap.php on line 82
> 
> Strict Standards: Non-static method Configure::getInstance() should
> not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
> \amyadler\new_site\cake\libs\configure.php on line 102
> 
> Any solution?
> 
> 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: Cake POPUP new window

2010-07-16 Thread mike karthauser
You can't load HTML files out of a views folder. The file extension needs to be 
.ctp . Also check you have and action defined with the same name as your view

Mike Karthauser
Brightstorm limited
Tel: 07939252144

On 16 Jul 2010, at 08:23, Master Ram  wrote:

> hi..
> 
> i want to popup new window in my ctp. file
> 
> i am using the link. and i want to call "help.htm" file,
> 
> my HTML file contain in the "promoters" view folder
> 
> the file name is help.htm.
> 
> i use this code
> 
> link('Add/edit languages',
>'javascript:void(0)',
> array(
>  'onclick' => "newPopup('http://localhost/
> promodiary_mvc/promoters/languages_help' );",
>'class' => 'result_text',
>'style' => 'text-
> decoration:none;')));
>?>
> 
> but i am getting file not found in this server .
> 
> 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


Cakephp 1.1.11.4064 and PHP 5.3.2 fails

2010-07-16 Thread xamako
Hi!

I'm trying to run a project written in cakephp 1.1.11.4064 on a server
PHP 5.3.2, but fails.

These are the errors:

Strict Standards: Redefining already defined constructor for class
Object in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site\cake
\libs\object.php on line 69

Deprecated: Assigning the return value of new by reference is
deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
\cake\libs\object.php on line 94

Deprecated: Assigning the return value of new by reference is
deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
\cake\libs\security.php on line 48

Deprecated: Assigning the return value of new by reference is
deprecated in C:\Program Files\EasyPHP-5.3.2i\www\amyadler\new_site
\cake\libs\configure.php on line 82

Strict Standards: Non-static method Configure::getInstance() should
not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
\amyadler\new_site\cake\bootstrap.php on line 43

Strict Standards: Non-static method Configure::write() should not be
called statically in C:\Program Files\EasyPHP-5.3.2i\www\amyadler
\new_site\cake\bootstrap.php on line 82

Strict Standards: Non-static method Configure::getInstance() should
not be called statically in C:\Program Files\EasyPHP-5.3.2i\www
\amyadler\new_site\cake\libs\configure.php on line 102

Any solution?

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


Cake POPUP new window

2010-07-16 Thread Master Ram
hi..

i want to popup new window in my ctp. file

i am using the link. and i want to call "help.htm" file,

my HTML file contain in the "promoters" view folder

the file name is help.htm.

i use this code

link('Add/edit languages',
'javascript:void(0)',
 array(
  'onclick' => "newPopup('http://localhost/
promodiary_mvc/promoters/languages_help' );",
'class' => 'result_text',
'style' => 'text-
decoration:none;')));
?>

but i am getting file not found in this server .

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