Re: Help me design the database structure

2016-04-01 Thread mike karthauser
information about google docs can be found in their support section.
http://lmgtfy.com/?q=google+docs+version+control

On Fri, Apr 1, 2016 at 1:55 PM, Clement Crownrise <
clementcrownr...@gmail.com> wrote:

> @Mike, does google has this type of feature? please do enlighten me the
> more
>
> On Fri, Apr 1, 2016 at 1:51 PM, mike karthauser 
> wrote:
>
>> probably best to look at something like google docs which already has
>> this functionality before you start building something from scratch to
>> handle this.
>>
>> --
>> Sign up for our Newsletter for updates.
>> http://cakephp.org/newsletter/signup
>>
>> We will soon be closing this Google Group. But don't worry, we have
>> something better coming. Stay tuned for an updated from the CakePHP Team
>> soon.
>>
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Follow us on Twitter http://twitter.com/CakePHP
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "CakePHP" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/cake-php/mKJ3a07u1wg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> cake-php+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> http://www.clementcrownrise.name/images/nameing.gif
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help me design the database structure

2016-04-01 Thread Clement Crownrise
@Mike, does google has this type of feature? please do enlighten me the more

On Fri, Apr 1, 2016 at 1:51 PM, mike karthauser 
wrote:

> probably best to look at something like google docs which already has this
> functionality before you start building something from scratch to handle
> this.
>
> --
> Sign up for our Newsletter for updates.
> http://cakephp.org/newsletter/signup
>
> We will soon be closing this Google Group. But don't worry, we have
> something better coming. Stay tuned for an updated from the CakePHP Team
> soon.
>
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Follow us on Twitter http://twitter.com/CakePHP
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/mKJ3a07u1wg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cake-php+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.clementcrownrise.name/images/nameing.gif

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help me design the database structure

2016-04-01 Thread mike karthauser
probably best to look at something like google docs which already has this
functionality before you start building something from scratch to handle
this.

-- 
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup

We will soon be closing this Google Group. But don't worry, we have something 
better coming. Stay tuned for an updated from the CakePHP Team soon.

Like Us on FaceBook https://www.facebook.com/CakePHP
Follow us on Twitter http://twitter.com/CakePHP
--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-29 Thread Clement Crownrise
Thanks @John

On Tue, Dec 29, 2015 at 8:53 AM, John Andersen 
wrote:

> As Matthew wrote, use the Neighbor function. See the CakePHP book in this
> page:
>
> http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-neighbors
>
> Enjoy, John
>
>
> On Tuesday, 29 December 2015 00:54:37 UTC+2, Clement Crownrise wrote:
>>
>> Thanks for your response, but please what is the neighbour function?
>>
>> Can you please paste the sytax here.
>>
>> Thanks
>>
>>
>> On Monday, December 28, 2015 at 11:35:36 PM UTC+1, Matthew Kaufman wrote:
>>>
>>> Use the get neighbors function.
>>>
>>> On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise <
>>> clementc...@gmail.com> wrote:
>>>
 Hello everyone, below is the first page of my list page, The first
 attachment..

 On clicking on any of the data on the first page, it will open up and
 show like the second attachment.

 Now the problem is, I want to add a "Next " and "Previous" button to
 the second attachment, so that I will not need to go to the first
 page(first attachment ) in order to access the next or previous record.

 HOW CAN I ACHIEVE THIS?

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google
 Groups "CakePHP" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to cake-php+u...@googlegroups.com.
 To post to this group, send email to cake...@googlegroups.com.
 Visit this group at https://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "CakePHP" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/cake-php/HYSgunvislo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at https://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
http://www.clementcrownrise.name/images/nameing.gif

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-28 Thread Matthew Kaufman
Use the get neighbors function.

On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise <
clementcrownr...@gmail.com> wrote:

> Hello everyone, below is the first page of my list page, The first
> attachment..
>
> On clicking on any of the data on the first page, it will open up and show
> like the second attachment.
>
> Now the problem is, I want to add a "Next " and "Previous" button to the
> second attachment, so that I will not need to go to the first page(first
> attachment ) in order to access the next or previous record.
>
> HOW CAN I ACHIEVE THIS?
>
> --
> Like Us on FaceBook https://www.facebook.com/CakePHP
> Find us on Twitter http://twitter.com/CakePHP
>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cake-php+unsubscr...@googlegroups.com.
> To post to this group, send email to cake-php@googlegroups.com.
> Visit this group at https://groups.google.com/group/cake-php.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-28 Thread Clement Crownrise
Thanks for your response, but please what is the neighbour function?

Can you please paste the sytax here.

Thanks


On Monday, December 28, 2015 at 11:35:36 PM UTC+1, Matthew Kaufman wrote:
>
> Use the get neighbors function.
>
> On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise  > wrote:
>
>> Hello everyone, below is the first page of my list page, The first 
>> attachment..
>>
>> On clicking on any of the data on the first page, it will open up and 
>> show like the second attachment. 
>>
>> Now the problem is, I want to add a "Next " and "Previous" button to the 
>> second attachment, so that I will not need to go to the first page(first 
>> attachment ) in order to access the next or previous record.
>>
>> HOW CAN I ACHIEVE THIS? 
>>
>> -- 
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to cake-php+u...@googlegroups.com .
>> To post to this group, send email to cake...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/cake-php.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Cakephp 2.x pagination

2015-12-28 Thread John Andersen
As Matthew wrote, use the Neighbor function. See the CakePHP book in this 
page:
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#find-neighbors

Enjoy, John

On Tuesday, 29 December 2015 00:54:37 UTC+2, Clement Crownrise wrote:
>
> Thanks for your response, but please what is the neighbour function?
>
> Can you please paste the sytax here.
>
> Thanks
>
>
> On Monday, December 28, 2015 at 11:35:36 PM UTC+1, Matthew Kaufman wrote:
>>
>> Use the get neighbors function.
>>
>> On Mon, Dec 28, 2015 at 5:32 PM, Clement Crownrise > > wrote:
>>
>>> Hello everyone, below is the first page of my list page, The first 
>>> attachment..
>>>
>>> On clicking on any of the data on the first page, it will open up and 
>>> show like the second attachment. 
>>>
>>> Now the problem is, I want to add a "Next " and "Previous" button to the 
>>> second attachment, so that I will not need to go to the first page(first 
>>> attachment ) in order to access the next or previous record.
>>>
>>> HOW CAN I ACHIEVE THIS? 
>>>
>>> -- 
>>> Like Us on FaceBook https://www.facebook.com/CakePHP
>>> Find us on Twitter http://twitter.com/CakePHP
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "CakePHP" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to cake-php+u...@googlegroups.com.
>>> To post to this group, send email to cake...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/cake-php.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at https://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help Installing CakePHP 3

2015-06-23 Thread Sebastiao Marcos
go to Xamp panel, 'config' apache select - 'php.ini' find search intl 
uncoment, reboot service, and comanda again.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help Installing CakePHP 3

2015-06-14 Thread McBuck DGAF
After your initial Xampp install, you should be able to go to the standard 
phpinfo screen (I think xampp serves one up at 
http://localhost/xampp/phpinfo.php).  The location of the current php.ini 
file in use by the system will be listed there under the title Loaded 
configuration file  (for example: /etc/php5/apache2/php.ini).  There will 
also be listing for a directory to be scanned for additional .ini files 
(example, /etc/php5/apache2/conf.d), and then a full listing of all .ini 
files parsed.  If modifying the correct php.ini file does not work for some 
reason (you restarted Apache afterwards, right?), then maybe there are 
conflicting settings in one of the other .ini files.  Good luck!

On Sunday, June 14, 2015 at 10:55:00 PM UTC-4, Daniel Travelstead wrote:

  
 Hi all,

 I have just recently gotten into PHP and want to install CakePHP 3 through 
 Xampp. There's many tutorials on how to do so, but for whatever reason non 
 of them work. I keep getting the problem when running through Terminal:

 cakephp/cakephp 3.0.x-dev requires ext-intl * - the requested PHP 
 extension intl is missing from your system.

 The most obvious explanation is to simply uncomment the intl extension in 
 the php.ini file but that still doesn't solve the problem. Most users I 
 have come across say the php.ini file should be under 
 xamppfiles/php/php.ini but my path is different for some reason: 
 /Applications/XAMPP/xamppfiles/etc/php.ini.

 I've tried everything I can think of including a fresh install of Xampp. 
 If anyone has run into the same or a similar problem I would sure 
 appreciate some help.

 I am currently running on Mac OS X Yosemite. 


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help with Breadcrumbs

2015-06-02 Thread Christian Quispe
Hola

Después del foreach has un pr($cat);
Nos muestras los resultados

Saludos

Enviado desde Gmail para Android en Moto G

www.oxicode.io
El may. 31, 2015 4:39 PM, Jekill CR pcma...@gmail.com escribió:




 *Hi! friends i am  from Costa Rica and need some help with the breadcrumbs
 This is the problem im trying to generate the breadcrumbs with this code in
 my view:*

 ?php foreach ($category as $cat): ?


  ?php $this-Html-addCrumb('Categorias', array('controller' =
 'categories', 'action' = 'index'));?
  ?php $this-Html-addCrumb($cat['name'], array('controller' =
 'categories', 'action' = 'view',$cat['id']));?



 ?php
 echo $this-Html-getCrumbs(' ► ', array(
 'text'='Inicio',
 'url' = array('controller' = 'anuncios', 'action' = 'index'),
 'escape' = false));
 ?
 ?php endforeach ?


 *but jump a Notice:*

 Inicio http://localhost/cakephp/anuncios ► Categorias
 http://localhost/cakephp/categories ► Juguetes  Well formed
 breadcrumb http://localhost/cakephp/categories/view/16

 *Notice* (8): Undefined index: name [*APP\View\Categories\view.ctp*, line 
 *276*]

 *Notice* (8): Undefined index: id [*APP\View\Categories\view.ctp*, line *276*]

 Inicio http://localhost/cakephp/anuncios ► Categorias
 http://localhost/cakephp/categories ► Juguetes
 http://localhost/cakephp/categories/view/16 ► Categorias
 http://localhost/cakephp/categories ►  Bad formed breadcrumb
 http://localhost/cakephp/categories/view/16

 If you can help me with this error.

 Thanks in advance!!!


  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/d/optout.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help

2015-03-26 Thread José Lorenzo
Follow this tutorial http://book.cakephp.org/3.0/en/quickstart.html

On Wednesday, March 25, 2015 at 4:53:57 PM UTC+1, Musa Dima wrote:

 Dear All I'm very new for cakePhP i want to learn cake php from Scratch 
 any body who can give me link for full video tutorial and other material.
 warmly regards


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: HELP - Session Files not created on ISP but created on localhost ??

2015-01-21 Thread kdubya
Dave,

I was having (what seems like) the exact same problem. You can read the 
thread about it 
here: https://groups.google.com/forum/#!topic/cake-php/ORfK1b9AYTU

My solution was to put CakeSession::start() in the beforeFilter() method in 
my AppController. Everything seems to work fine then. However, I don't 
believe this should be necessary so I will continue to try to determine why 
it's needed. 

When you do this, as long as 'default'='cake' is set in your core.php 
file, you should then see the session cookies in app/tmp/sessions.

Can you post the details of your server configure (the one you were having 
the problem on)? Specifically, Apache, PHP, and CakePHP versions and 
settings concerning session. The output of phpinfo() would do nicely (with 
anything sensitive redacted, of course :-)

Thanks,
Ken

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: HELP - Session Files not created on ISP but created on localhost ??

2015-01-21 Thread David Watson
Hi Ken 

Thanks for your help, I found the solution after a bit more Investigation 
after taling to someone on the irc chat line .. The solution turned out to 
be some of the debugging statements that I had put in to find out what was 
going on.. The session start that is used by cake-php checks for headers 
being sent before it actually starts the session in 
lib/Cake/Model/Datasource/CakeSession.php.. 

On my localhost development station, the version of php and apache  does 
not consider an echo statement as a header that is being sent to the web 
server.. However, on my ISP, the version of php and apache considers echo 
and pr output as headers so the session was never started, and there was 
no indication why the session was not started .. 

So, the big thing is that you can't put debug statements before the session 
starts or  cake will not start up the session variable and authentication 
is not possible because the session was not started ..

A very difficult issue to find, but finally explains the strange lack of 
session starting and no error message for the session start other than the 
message

This web page has been black holed 

and a debug trace that was useless 
 

I hope if any one else has the same problem, my solution will be able to 
help .. 

Cheers

Dave W

On Wednesday, January 21, 2015 at 12:13:02 PM UTC-5, Ken Winans wrote:

 Dave,

 I was having (what seems like) the exact same problem. You can read the 
 thread about it here: 
 https://groups.google.com/forum/#!topic/cake-php/ORfK1b9AYTU

 My solution was to put CakeSession::start() in the beforeFilter() method 
 in my AppController. Everything seems to work fine then. However, I don't 
 believe this should be necessary so I will continue to try to determine why 
 it's needed. 

 When you do this, as long as 'default'='cake' is set in your core.php 
 file, you should then see the session cookies in app/tmp/sessions.

 Can you post the details of your server configure (the one you were having 
 the problem on)? Specifically, Apache, PHP, and CakePHP versions and 
 settings concerning session. The output of phpinfo() would do nicely (with 
 anything sensitive redacted, of course :-)

 Thanks,
 Ken


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help me for First Application with CakePHP!

2014-06-25 Thread Jeremy Burns : Class Outfit
Sure. What would like us to build for you?

On 25 Jun 2014, at 06:30, Sankar V san...@vettritech.com wrote:

 
 
 -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
 
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/d/optout.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help me for First Application with CakePHP!

2014-06-25 Thread John Andersen
For your first application using CakePHP, please follow this tutorial in 
the CakePHP book:
http://book.cakephp.org/2.0/en/getting-started.html#blog-tutorial

Enjoy, John


On Wednesday, 25 June 2014 08:30:56 UTC+3, Sankar V wrote:




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.


Re: Help! Auth Component in Lib directory

2014-02-25 Thread Ben Kennedy
Can't edit my first post, so just be aware that this line:
$result = $Auth-identify($userArr,$resp);

should be :

$result = $Auth-identify($userObj,$resp);

And I'm using Cake 2.4.4

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help saving data with CakePHP 3.0 ORM

2014-02-05 Thread Alberto Pagliarini
Yeah!

using Entity class and $_accessible property all works as expected!

thanks
José


2014-02-04 José Lorenzo jose@gmail.com:

 Currently that is the most confusing part of the ORM and I'd like to make
 it easier to understand in the next release preview. By default entities
 are protected agains mass assignment, this means that you cannot create
 them without configuring what properties can be set from the request. You
 need to create the entity class and set the properties that are accessible
 for mass assignment. Please read this section in the book:

 http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment


 On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving
 data.

 I have two simple tables:

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't
 understand why.
 Am I missing something?
 I have following http://book.cakephp.org/3.0/en/orm/table-objects.
 html#converting-request-data-into-entities

 best regards
 alberto




  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to a topic in the
 Google Groups CakePHP group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/cake-php/vSUI_dJRueg/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- bato ---

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help saving data with CakePHP 3.0 ORM

2014-02-05 Thread Alberto Pagliarini
Hi Carlos,

PHP 5.4 permits the ['key' = 'value'] array syntax. The issue I had was
resolved by using Entity class and $_accessible property.




2014-02-04 Carlos Javier Baeza Negroni carlos.ba...@gmail.com:

 Also check the array:
 $data = ['name' = 'Walter White'];

 Should be:
 $data = array('name' = 'Walter White');


 best regards.


 2014-02-04 José Lorenzo jose@gmail.com:

 Currently that is the most confusing part of the ORM and I'd like to make
 it easier to understand in the next release preview. By default entities
 are protected agains mass assignment, this means that you cannot create
 them without configuring what properties can be set from the request. You
 need to create the entity class and set the properties that are accessible
 for mass assignment. Please read this section in the book:

 http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment


 On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving
 data.

 I have two simple tables:

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't
 understand why.
 Am I missing something?
 I have following http://book.cakephp.org/3.0/en/orm/table-objects.
 html#converting-request-data-into-entities

 best regards
 alberto




  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.

 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




 --
 *Carlos Baeza Negroni*
 +56985644026
 http://carlosbaeza.net
 @cjbaezilla
 http://cl.linkedin.com/in/cjbaeza
  http://cl.linkedin.com/in/cjbaeza

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to a topic in the
 Google Groups CakePHP group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/cake-php/vSUI_dJRueg/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
-- bato ---

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread José Lorenzo
Currently that is the most confusing part of the ORM and I'd like to make 
it easier to understand in the next release preview. By default entities 
are protected agains mass assignment, this means that you cannot create 
them without configuring what properties can be set from the request. You 
need to create the entity class and set the properties that are accessible 
for mass assignment. Please read this section in the book:

http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment

On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving 
 data.

 I have two simple tables: 

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try 
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and 

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an 
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't understand 
 why.
 Am I missing something?
 I have following 
 http://book.cakephp.org/3.0/en/orm/table-objects.html#converting-request-data-into-entities

 best regards
 alberto






-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help saving data with CakePHP 3.0 ORM

2014-02-04 Thread Carlos Javier Baeza Negroni
Also check the array:
$data = ['name' = 'Walter White'];

Should be:
$data = array('name' = 'Walter White');


best regards.


2014-02-04 José Lorenzo jose@gmail.com:

 Currently that is the most confusing part of the ORM and I'd like to make
 it easier to understand in the next release preview. By default entities
 are protected agains mass assignment, this means that you cannot create
 them without configuring what properties can be set from the request. You
 need to create the entity class and set the properties that are accessible
 for mass assignment. Please read this section in the book:

 http://book.cakephp.org/3.0/en/orm/entities.html#mass-assignment


 On Tuesday, February 4, 2014 5:16:31 PM UTC+1, bato wrote:

 Hi,

 I'm starting to play with 3.0 ORM and I encountered some issues saving
 data.

 I have two simple tables:

- authors with fields id and name
- posts with fields id, title, text and author_id


 I have fill tables with two authors and some posts by hand to try
 retrieving data with cake.

 I have set up two Table class as:

 App/Model/Table/AuhtorsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class AuthorsTable extends Table {

 public function initialize(array $config) {
 $this-hasMany('Posts');
 }

 }

 and

 App/Model/Table/PostsTable.php

 ?php

 namespace App\Model\Table;

 use Cake\ORM\Table;

 class PostsTable extends Table {

 public function initialize(array $config) {
 $this-belongsTo('Authors');
 }

 }

 In App/Controller/PagesController.php I'm trying to save data from an
 array.

 $data = ['name' = 'Walter White'];
 $authors = TableRegistry::get('Authors');
 $author = $authors-newEntity($data);
 $authors-save($author);

 The data aren't saved. The save method return false but I don't
 understand why.
 Am I missing something?
 I have following http://book.cakephp.org/3.0/en/orm/table-objects.
 html#converting-request-data-into-entities

 best regards
 alberto




  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
*Carlos Baeza Negroni*
+56985644026
http://carlosbaeza.net
@cjbaezilla
http://cl.linkedin.com/in/cjbaeza
http://cl.linkedin.com/in/cjbaeza

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help setting up 3.0

2014-01-12 Thread Reuben
Because CakePHP 3 doesn't have a stable release yet, try the --dev flag.

On Saturday, 11 January 2014 10:34:15 UTC+10, advantage+ wrote:

 I am trying to set this up with Composer install as outlined in the first 
 step.

  

 I want to play around locally, I am on windows 7 using wamp. Upgraded wamp 
 to the php 5.4 version. 

 Downloaded the Composer windows installer. 

 It does not give me the option where to install / save Composer to so it 
 ends up on installed on C: drive, yet all my work / wamp is on a separate 
 drive K: , the path to php / apache is K:wamp/bin

  

 The openSSL is enabled in php.ini, restarted.

  

  

 K:\wamp\www\dev\3.xphp -r eval('?'.file_get_contents('
 https://getcomposer.

 org/installer'));

 PHP Warning:  file_get_contents(): Unable to find the wrapper https - 
 did you

 forget to enable it when you configured PHP? in Command line code on line 1

 PHP Stack trace:

 PHP   1. {main}() Command line code:0

 PHP   2. file_get_contents() Command line code:1

  

 Warning: file_get_contents(): Unable to find the wrapper https - did you 
 forge

 t to enable it when you configured PHP? in Command line code on line 1

  

 Call Stack:

 0.0003 222528   1. {main}() Command line code:0

 0.0003 223240   2. file_get_contents() Command line code:1

  

 PHP Warning:  file_get_contents(https://getcomposer.org/installer): 
 failed to op

 en stream: Invalid argument in Command line code on line 1

 PHP Stack trace:

 PHP   1. {main}() Command line code:0

 PHP   2. file_get_contents() Command line code:1

  

 Warning: file_get_contents(https://getcomposer.org/installer): failed to 
 open st

 ream: Invalid argument in Command line code on line 1

  

 Call Stack:

 0.0003 222528   1. {main}() Command line code:0

 0.0003 223240   2. file_get_contents() Command line code:1

  

  

 K:\wamp\www\dev\3.xcomposer.phar update

  

 K:\wamp\www\dev\3.xcurl -s http://getcomposer.org/installer | php

 'curl' is not recognized as an internal or external command,

 operable program or batch file.

  

 K:\wamp\www\dev\3.xphp composer.phar create-project cakephp/app

 Could not open input file: composer.phar

  

 K:\wamp\www\dev\3.xphp composer.phar create-project cakephp/app

  

   [InvalidArgumentException]

   Could not find package cakephp/app with stability stable.

  

 create-project [-s|--stability=...] [--prefer-source] [--prefer-dist] 
 [--repos

 itory-url=...] [--dev] [--no-dev] [--no-plugins] 
 [--no-custom-installers] [--n

 o-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] 
 [directory] [ve

 rsion]

  

  

 C:\Users\MovePixelsphp composer.phar create-project 
 k:/wamp/www/dev/3.x/app

 Could not open input file: composer.phar

  

  

 K:\wamp\www\dev\3.xphp composer.phar create-project app

  

   [InvalidArgumentException]

   Could not find package app with stability stable.

  

 create-project [-s|--stability=...] [--prefer-source] [--prefer-dist] 
 [--repos

 itory-url=...] [--dev] [--no-dev] [--no-plugins] 
 [--no-custom-installers] [--n

 o-scripts] [--no-progress] [--keep-vcs] [--no-install] [package] 
 [directory] [ve

 rsion]

  

  

 Anyone have any ideas how to go about this. 

  

 Thanks,

 Dave

  


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help / Source code for Simple Authentication tutorial

2014-01-01 Thread Squix

 This error appears at every syntax or logic errors with the Auth 
component. To fix it, simply track the errors (it can be a semi-colon !)

 Squix

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help with controller

2013-09-11 Thread ravage1984
Hi, Joshua

Please if you double post, mark both posts as such (through edit or answer 
to the post ).
Also please provide additional information that others can actually help 
you.

Other post:
https://groups.google.com/forum/#!topic/cake-php/ut4tW4gWQrQ

Thanks
Marc

Am Sonntag, 8. September 2013 06:10:46 UTC+2 schrieb Joshua Song:

 Hey Guys,

 I'm new to cakephp, but I made a website using both cakephp and bootstrap.
 When I made the website on localhost, it was perfectly fine.
 But for some reason when I moved it to my web host, one of the pages 
 wouldn't load
 due to a missing controller error. But the controller file was there. Any 
 ideas?

 Thank You


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Help with threaded

2013-09-08 Thread angelxmoreno
1) make sure TaskNote belongsTo User
2) set $this-Task-recursive = 2;

As a side note, you might want to use the Containable behavior to get more 
control of the queries.


On Sunday, September 8, 2013 12:23:44 PM UTC-4, April DeRossett wrote:


 https://lh4.googleusercontent.com/-mrtYQE5nTDA/Uiyjbwgw8CI/AEM/F266lPJCSZ4/s1600/CropperCapture%5B1%5D.png
 Can someone point me in the right direction on this?

 I have a tasks table in my application - Tasks can be owned by the person 
 who creates them or the task can be assigned to another user.  Users can 
 make notes on the task as they work through the task.  The tasks care 
 displayed as in the image -- My problem is with the 3: in the task note.  
 I want to display the fullname field of the user who entered the note but I 
 can't figure out how to return that data.

 *Here is what is in my controller:*
 $options = array('OR' = array('Task.user_id =' = 
 $this-Auth-user('id'),'Task.assigned_id =' = $this-Auth-user('id') ));
 $this-set('tasks', $this-Task-find('threaded', 
 array('conditions' = array('or' = array('Task.user_id =' = 
 $this-Auth-user('id'), 'Task.assigned_id =' = 
 $this-Auth-user('id'));
 *
 Here is the output:*

 (int) 0 = array(
 'Task' = array(
 'id' = '1',
 'user_id' = '3',
 'task_name' = 'Test Task',
 'created' = '2013-08-29',
 'due' = '2013-08-31',
 'modified' = '2013-08-29',
 'description' = 'test the task system',
 'task_status_id' = '1',
 'assigned_id' = '4'
 ),
 'User' = array(
 'id' = '3',
 'username' = 'april.derossett',
 'created' = '2013-08-08',
 'fullname' = 'April DeRossett'
 ),
 'Assigned' = array(
 'id' = '4',
 'username' = 'jim.pryor',
 'created' = '2013-08-14',
 'fullname' = 'Jim Pryor',
 ),
 'TaskStatus' = array(
 'id' = '1',
 'name' = 'Active'
 ),
 'TaskNote' = array(
 (int) 0 = array(
 'id' = '7',
 'task_id' = '1',
* 'user_id' = '3',*
 'note' = 'Second Task Note',
 'created' = '2013-09-08',
 'modified' = '2013-09-08'
 ),
 (int) 1 = array(
 'id' = '6',
 'task_id' = '1',
 *'user_id' = '3',*
 'note' = 'First task note',
 'created' = '2013-09-08',
 'modified' = '2013-09-08'
 )
 ),

 I want to return the fullname field from the users table for the id shown 
 in red.  Any ideas?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Help with Model associations and find

2013-09-06 Thread Nikki McMahon
Hi there,

 

Thanks for this. I tried it out and what I got was a list of ClientData with
the DataImport, but none of the other data. So I set recursive to 3 and I
still get back DataImport (under ClientData) with all of the ClientData
under that. I see the 'contain' field. Is there a way to stop it containing
something on the nth level of recursion? My data suggests that the contain
is not working properly.

 

$this-DataImport-find(

 
'first',

 
array(

 
'order' = array(

 
$this-alias.'created' = 'DESC'

 
),

 
'contain' = array(

 
'TelemetryData' = array(

 
'Hospital' = array(

 
'Province'

 
)

 
)

 
),

 
'recursive' = 3

 
)

 
)

Thanks for the help!

 

 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of lowpass
Sent: 06 September 2013 01:51 AM
To: cake-php@googlegroups.com
Subject: Re: Help with Model associations and find

 

If I understand correctly, you want the latest DataImport record, and all of
its associated ClientData records, each of which should include Hospital and
Province. If that's correct, you should be calling find() on the DataImport
model, which you can do because they're chained due to the association.
Using Containable:

 

$this-set('data', $this-ClientData-DataImport-getLatest());

 

DatImport model:

 

public function getLatest() {

return $this-find(

'first',

array(

'order' = array(

$this-alias.'.created' =
'DESC'

),

'contain' = array(

'ClientData' = array(

'Hospital' =
array(

 
'Province'

)

)

)

)

);

}

 

 

We use 'order' but 'limit' is unnecessary, as it turns out, because of
'first'. At least, I'm pretty sure I discovered that one time. If you get
strange results, try adding 'limit' = 1 atthe same level as the limit 
contain arrays.

 

On Wed, Sep 4, 2013 at 6:22 PM, Nikki McMahon cf.ma...@gmail.com wrote:

Hi Anja,

Thanks for replying.

I actually want all ClientData with its related data. But, on the final
level I only want the Province data and not the DataImport data, since
DataImport is associated to ClientData and so then each DataImport holds all
the ClientData associated to it as well.

Something along these lines is what I get back now if I want to get Province
data (I get it by setting recursive to a higher value)

ClientData:
ClientData[1]['id'] = 4;
ClientData[1]['name'] = 'Client Name';
ClientData[1]['DataImport']['id'] = 10;
ClientData[1]['DataImport']['ClientData'][1] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][2] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][3] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][4] = object;// excessive and
unnecessary data
ClientData[1]['Hospital']['id'] = 5;
ClientData[1]['Hospital']['Province']['id'] = 9;
ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
ClientData[2]['id'] = 6;
ClientData[2]['name'] = 'Client Name 2';
ClientData[2]['DataImport']['id'] = 10;
ClientData[2]['DataImport']['ClientData'][1] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][2] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][3] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][4] = object;// excessive and
unnecessary data
ClientData[2]['Hospital']['id'] = 8;
ClientData[2]['Hospital']['Province']['id'] = 4;
ClientData[2]['Hospital']['Province']['name'] = 'Eastern Cape';

This is what I would like it to look like - excessive ClientData removed.
Because of the level of recursion, the DataImport object loops back in on
itself, where the Hospital object expands to its logical end.

ClientData[1]['id'] = 4;
ClientData[1]['name'] = 'Client Name';
ClientData[1]['DataImport']['id'] = 10;
ClientData[1]['Hospital']['id'] = 5;
ClientData[1]['Hospital']['Province']['id'] = 9;
ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
ClientData[2]['id'] = 6;
ClientData[2]['name'] = 'Client Name 2';
ClientData[2]['DataImport']['id'] = 10;
ClientData[2]['Hospital']['id'] = 8;
ClientData[2]['Hospital']['Province']['id'] = 4;
ClientData[2]['Hospital']['Province']['name'] = 'Eastern Cape';

I'm not sure if this helps at all?
I basically loop through ClientData after pulling this, adjust some values
according to algorithms and then print it out into a table. In that table I
need to print the Province name, which is why I need to pull the province.

I am beginning to think I might

RE: Help with Model associations and find

2013-09-06 Thread Nikki McMahon
Hi Again,

 

With your suggestion and Anja's suggestion of containable behaviour I have
gotten this working. Thanks so much! HUGELY appreciated J

 

Below is the code. All that was missing was to tell the Model to use
containable behaviour:

 

$this-DataImport-Behaviors-load('Containable');



return $this-DataImport-find(

'first',

array(

'order' = array(

'created' =
'DESC'

),

'contain' = array(

 
'TelemetryData' = array(

 
'Hospital' = array(

 
'Province'

 
)

)

),

'recursive' = 3

)

)

);


 

From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of lowpass
Sent: 06 September 2013 01:51 AM
To: cake-php@googlegroups.com
Subject: Re: Help with Model associations and find

 

If I understand correctly, you want the latest DataImport record, and all of
its associated ClientData records, each of which should include Hospital and
Province. If that's correct, you should be calling find() on the DataImport
model, which you can do because they're chained due to the association.
Using Containable:

 

$this-set('data', $this-ClientData-DataImport-getLatest());

 

DatImport model:

 

public function getLatest() {

return $this-find(

'first',

array(

'order' = array(

$this-alias.'.created' =
'DESC'

),

'contain' = array(

'ClientData' = array(

'Hospital' =
array(

 
'Province'

)

)

)

)

);

}

 

 

We use 'order' but 'limit' is unnecessary, as it turns out, because of
'first'. At least, I'm pretty sure I discovered that one time. If you get
strange results, try adding 'limit' = 1 atthe same level as the limit 
contain arrays.

 

On Wed, Sep 4, 2013 at 6:22 PM, Nikki McMahon cf.ma...@gmail.com wrote:

Hi Anja,

Thanks for replying.

I actually want all ClientData with its related data. But, on the final
level I only want the Province data and not the DataImport data, since
DataImport is associated to ClientData and so then each DataImport holds all
the ClientData associated to it as well.

Something along these lines is what I get back now if I want to get Province
data (I get it by setting recursive to a higher value)

ClientData:
ClientData[1]['id'] = 4;
ClientData[1]['name'] = 'Client Name';
ClientData[1]['DataImport']['id'] = 10;
ClientData[1]['DataImport']['ClientData'][1] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][2] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][3] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][4] = object;// excessive and
unnecessary data
ClientData[1]['Hospital']['id'] = 5;
ClientData[1]['Hospital']['Province']['id'] = 9;
ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
ClientData[2]['id'] = 6;
ClientData[2]['name'] = 'Client Name 2';
ClientData[2]['DataImport']['id'] = 10;
ClientData[2]['DataImport']['ClientData'][1] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][2] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][3] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][4] = object;// excessive and
unnecessary data
ClientData[2]['Hospital']['id'] = 8;
ClientData[2]['Hospital']['Province']['id'] = 4;
ClientData[2]['Hospital']['Province']['name'] = 'Eastern Cape';

This is what I would like it to look like - excessive ClientData removed.
Because of the level of recursion, the DataImport object loops back in on
itself, where the Hospital object expands to its logical end.

ClientData[1]['id'] = 4;
ClientData[1]['name'] = 'Client Name';
ClientData[1]['DataImport']['id'] = 10;
ClientData[1]['Hospital']['id'] = 5;
ClientData[1]['Hospital']['Province']['id'] = 9;
ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
ClientData[2]['id'] = 6;
ClientData[2]['name'] = 'Client Name 2';
ClientData[2]['DataImport']['id'] = 10;
ClientData[2]['Hospital']['id'] = 8;
ClientData[2]['Hospital']['Province']['id'] = 4;
ClientData[2

Re: Help with Model associations and find

2013-09-05 Thread lowpass
If I understand correctly, you want the latest DataImport record, and all
of its associated ClientData records, each of which should include Hospital
and Province. If that's correct, you should be calling find() on the
DataImport model, which you can do because they're chained due to the
association. Using Containable:

$this-set('data', $this-ClientData-DataImport-getLatest());

DatImport model:

public function getLatest() {
return $this-find(
'first',
array(
'order' = array(
$this-alias.'.created' = 'DESC'
),
'contain' = array(
'ClientData' = array(
'Hospital' = array(
'Province'
)
)
)
)
);
}


We use 'order' but 'limit' is unnecessary, as it turns out, because of
'first'. At least, I'm pretty sure I discovered that one time. If you get
strange results, try adding 'limit' = 1 atthe same level as the limit 
contain arrays.


On Wed, Sep 4, 2013 at 6:22 PM, Nikki McMahon cf.ma...@gmail.com wrote:

 Hi Anja,

 Thanks for replying.

 I actually want all ClientData with its related data. But, on the final
 level I only want the Province data and not the DataImport data, since
 DataImport is associated to ClientData and so then each DataImport holds
 all
 the ClientData associated to it as well.

 Something along these lines is what I get back now if I want to get
 Province
 data (I get it by setting recursive to a higher value)

 ClientData:
 ClientData[1]['id'] = 4;
 ClientData[1]['name'] = 'Client Name';
 ClientData[1]['DataImport']['id'] = 10;
 ClientData[1]['DataImport']['ClientData'][1] = object;// excessive and
 unnecessary data
 ClientData[1]['DataImport']['ClientData'][2] = object;// excessive and
 unnecessary data
 ClientData[1]['DataImport']['ClientData'][3] = object;// excessive and
 unnecessary data
 ClientData[1]['DataImport']['ClientData'][4] = object;// excessive and
 unnecessary data
 ClientData[1]['Hospital']['id'] = 5;
 ClientData[1]['Hospital']['Province']['id'] = 9;
 ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
 ClientData[2]['id'] = 6;
 ClientData[2]['name'] = 'Client Name 2';
 ClientData[2]['DataImport']['id'] = 10;
 ClientData[2]['DataImport']['ClientData'][1] = object;// excessive and
 unnecessary data
 ClientData[2]['DataImport']['ClientData'][2] = object;// excessive and
 unnecessary data
 ClientData[2]['DataImport']['ClientData'][3] = object;// excessive and
 unnecessary data
 ClientData[2]['DataImport']['ClientData'][4] = object;// excessive and
 unnecessary data
 ClientData[2]['Hospital']['id'] = 8;
 ClientData[2]['Hospital']['Province']['id'] = 4;
 ClientData[2]['Hospital']['Province']['name'] = 'Eastern Cape';

 This is what I would like it to look like - excessive ClientData removed.
 Because of the level of recursion, the DataImport object loops back in on
 itself, where the Hospital object expands to its logical end.

 ClientData[1]['id'] = 4;
 ClientData[1]['name'] = 'Client Name';
 ClientData[1]['DataImport']['id'] = 10;
 ClientData[1]['Hospital']['id'] = 5;
 ClientData[1]['Hospital']['Province']['id'] = 9;
 ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
 ClientData[2]['id'] = 6;
 ClientData[2]['name'] = 'Client Name 2';
 ClientData[2]['DataImport']['id'] = 10;
 ClientData[2]['Hospital']['id'] = 8;
 ClientData[2]['Hospital']['Province']['id'] = 4;
 ClientData[2]['Hospital']['Province']['name'] = 'Eastern Cape';

 I'm not sure if this helps at all?
 I basically loop through ClientData after pulling this, adjust some values
 according to algorithms and then print it out into a table. In that table I
 need to print the Province name, which is why I need to pull the province.

 I am beginning to think I might just do the ugly thing and import the
 hospital model and pull the name in the loop. Time constraints are a big
 issue on this project.

 Thanks again for replying,
 Nikki

 -Original Message-
 From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On
 Behalf
 Of Anja Liebermann
 Sent: 04 September 2013 07:44 PM
 To: cake-php@googlegroups.com
 Subject: Re: Help with Model associations and find

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi Nikki,

 if I undestand it correctly this might be a case for the Containable
 behaviour.

 But I am not sure what your fields information will do. What do you get
 back, if you leave that out?

 Is it correct, that you want to have all your clientData but not the
 complete range of connected data?


 Anja


 Am 03.09.2013 22:14, schrieb Nif:
  Hi All,
 
  I have something I am struggling with and hoping someone can help?
  I've used Cake for some simple tools and site structure in the past
  and I'm currently working on my first complex db design within the
 framework.
 
  I know how to do this in mySQL, but cannot figure out how to use
  Cake's Model associations and find method to get it done. - All
  associations are set up in the Models already.
 
  I have a table 'ClientData'. It has foreign keys to 2 other tables,
  Hospital and DataImport. This is a manyToOne relationship (I

Re: Help with Model associations and find

2013-09-04 Thread Anja Liebermann
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Nikki,

if I undestand it correctly this might be a case for the Containable
behaviour.

But I am not sure what your fields information will do. What do you get
back, if you leave that out?

Is it correct, that you want to have all your clientData but not the
complete range of connected data?


Anja


Am 03.09.2013 22:14, schrieb Nif:
 Hi All,
 
 I have something I am struggling with and hoping someone can help? I've 
 used Cake for some simple tools and site structure in the past and I'm 
 currently working on my first complex db design within the framework.
 
 I know how to do this in mySQL, but cannot figure out how to use Cake's 
 Model associations and find method to get it done. - All associations are 
 set up in the Models already.
 
 I have a table 'ClientData'. It has foreign keys to 2 other tables, 
 Hospital and DataImport. This is a manyToOne relationship (I think - 
 basically, many ClientData's can have one Hospital and DataImport).
 Hospital then has a foreign key to the Province table (Many Hospitals can 
 have one Province).
 
 so:
 [1]['id'] = 4;
 [1]['name'] = 'Client Name';
 [1]['DataImport']['id'] = 10;
 [1]['Hospital']['id'] = 5;
 [1]['Hospital']['Province']['id'] = 9;
 
 That's the basic layout (minus lots of the actual data) where [i] is the 
 ClientData row and the result will have many ClientData rows.
 
 I want to select all of the ClientData's that are associated to the latest 
 created DataImport and get back The ClientData with the Hospital data 
 associated to the ClientData and then subsequently the Province data 
 associated to the Hospital - Much like the structure above.
 
 I am using this code:
 $latestData = $this-ClientData-find('all',array('fields'=array('MAX(Dat
 aImport.created)','*'),'recursive' = 1));
 But all I receive is one ClientData row and the MAX created field. If I 
 increase recursive to 3 then I get 1 ClientData row with associated data 
 alongside (Hospital and DataImport) and then inside the DataImport row are 
 all the ClientDatas I want and under those are DataImport data and Hospital 
 Data.
 
 This is part of the way correct, however, I don't feel it is right... seems 
 odd to have that top level return of one ClientData and it's associations 
 and then have the rest under the DataImport associated to that one 
 ClientData, all with their own DataImport data.
 
 Also, I still don't have the Province data I want. If I increase recursive 
 to 4 then I get teh hospital data but also the very sub level DataImport 
 under each ClientData brings back all the ClientData once again.
 
 I am sure there must be a better way to do this, but I just cannot find out 
 how.
 I can import the Hospital Model and then create a function to pull it's 
 data which will bring the Province data associated, but this just isn't 
 good practice and I really want to use the Model associations properly.
 
 Sorry, I know this is long winded and possibly not well described. I hope 
 it makes sense.
 Any advice or help would be very much appreciated.
 Thanks in advance,
 Nikki
 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlIncUoACgkQbOdiIJzHNKHS/wCfbkLt10XB7WclFcLuHQo78N2n
21EAn1AIVhWr1Vd9BuAgyZi1vPa82ya4
=UQ/b
-END PGP SIGNATURE-

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


RE: Help with Model associations and find

2013-09-04 Thread Nikki McMahon
Hi Anja,

Thanks for replying.

I actually want all ClientData with its related data. But, on the final
level I only want the Province data and not the DataImport data, since
DataImport is associated to ClientData and so then each DataImport holds all
the ClientData associated to it as well.

Something along these lines is what I get back now if I want to get Province
data (I get it by setting recursive to a higher value)

ClientData:
ClientData[1]['id'] = 4;
ClientData[1]['name'] = 'Client Name';
ClientData[1]['DataImport']['id'] = 10;
ClientData[1]['DataImport']['ClientData'][1] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][2] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][3] = object;// excessive and
unnecessary data
ClientData[1]['DataImport']['ClientData'][4] = object;// excessive and
unnecessary data
ClientData[1]['Hospital']['id'] = 5;
ClientData[1]['Hospital']['Province']['id'] = 9;
ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
ClientData[2]['id'] = 6;
ClientData[2]['name'] = 'Client Name 2';
ClientData[2]['DataImport']['id'] = 10;
ClientData[2]['DataImport']['ClientData'][1] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][2] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][3] = object;// excessive and
unnecessary data
ClientData[2]['DataImport']['ClientData'][4] = object;// excessive and
unnecessary data
ClientData[2]['Hospital']['id'] = 8;
ClientData[2]['Hospital']['Province']['id'] = 4;
ClientData[2]['Hospital']['Province']['name'] = 'Eastern Cape';

This is what I would like it to look like - excessive ClientData removed.
Because of the level of recursion, the DataImport object loops back in on
itself, where the Hospital object expands to its logical end.

ClientData[1]['id'] = 4;
ClientData[1]['name'] = 'Client Name';
ClientData[1]['DataImport']['id'] = 10;
ClientData[1]['Hospital']['id'] = 5;
ClientData[1]['Hospital']['Province']['id'] = 9;
ClientData[1]['Hospital']['Province']['name'] = 'Gauteng';
ClientData[2]['id'] = 6;
ClientData[2]['name'] = 'Client Name 2';
ClientData[2]['DataImport']['id'] = 10;
ClientData[2]['Hospital']['id'] = 8;
ClientData[2]['Hospital']['Province']['id'] = 4;
ClientData[2]['Hospital']['Province']['name'] = 'Eastern Cape';

I'm not sure if this helps at all?
I basically loop through ClientData after pulling this, adjust some values
according to algorithms and then print it out into a table. In that table I
need to print the Province name, which is why I need to pull the province.

I am beginning to think I might just do the ugly thing and import the
hospital model and pull the name in the loop. Time constraints are a big
issue on this project.

Thanks again for replying,
Nikki

-Original Message-
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Anja Liebermann
Sent: 04 September 2013 07:44 PM
To: cake-php@googlegroups.com
Subject: Re: Help with Model associations and find

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Nikki,

if I undestand it correctly this might be a case for the Containable
behaviour.

But I am not sure what your fields information will do. What do you get
back, if you leave that out?

Is it correct, that you want to have all your clientData but not the
complete range of connected data?


Anja


Am 03.09.2013 22:14, schrieb Nif:
 Hi All,
 
 I have something I am struggling with and hoping someone can help? 
 I've used Cake for some simple tools and site structure in the past 
 and I'm currently working on my first complex db design within the
framework.
 
 I know how to do this in mySQL, but cannot figure out how to use 
 Cake's Model associations and find method to get it done. - All 
 associations are set up in the Models already.
 
 I have a table 'ClientData'. It has foreign keys to 2 other tables, 
 Hospital and DataImport. This is a manyToOne relationship (I think - 
 basically, many ClientData's can have one Hospital and DataImport).
 Hospital then has a foreign key to the Province table (Many Hospitals 
 can have one Province).
 
 so:
 [1]['id'] = 4;
 [1]['name'] = 'Client Name';
 [1]['DataImport']['id'] = 10;
 [1]['Hospital']['id'] = 5;
 [1]['Hospital']['Province']['id'] = 9;
 
 That's the basic layout (minus lots of the actual data) where [i] is 
 the ClientData row and the result will have many ClientData rows.
 
 I want to select all of the ClientData's that are associated to the 
 latest created DataImport and get back The ClientData with the 
 Hospital data associated to the ClientData and then subsequently the 
 Province data associated to the Hospital - Much like the structure above.
 
 I am using this code:
 $latestData = 
 $this-ClientData-find('all',array('fields'=array('MAX(Dat
 aImport.created)','*'),'recursive' = 1)); But all I receive is one 
 ClientData row and the MAX created field. If I increase recursive to 3

Re: Help calculated field in model

2013-07-02 Thread 清水紘己
1. use virtualFields
2. modify results in afterFind() Callback
3. create Helper and its method
4. use Entity(plugin) and define price() method(or magic property)

 I will perhaps choose 3 or 4 because assumed that the user for calculation
is on the context of actions.
e.g. function price($item, $user = null) = $user = AuthComponent::user()
when no user given.


2013/7/2 frocco faro...@gmail.com

 Hello,

 I have 4 price fields in my model.
 price1
 price2
 price3
 price4

 I only want to return a field called price for any queries.

 price will be one of the 4 price fields based on a condition.

 if userlevel is 'A' return price1
 if userlevel is 'B' return price2

 How can I do this in cakephp?

 Thanks

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Help in simple query!

2013-05-31 Thread gonzela2006
@Dr. Drijk @resting
Model names must be singular.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help in simple query!

2013-05-31 Thread gonzela2006
@Dakota
I'm already setting the relation as below

class Student extends AppModel {
var $name = 'Student';
var $hasMany = array('StudentAttendance');

AND

class StudentAttendance extends AppModel {
var $name = 'StudentAttendance';
var $belongsTo = 'Student';


On Thursday, May 30, 2013 8:26:28 AM UTC+2, Dakota wrote:

 That would be the expected result for that query. You aren't including the 
 'SudentAttendance' model in your query. Looking how to use Containable, or 
 custom join. You don't say what kind of relation there is between 
 StudentAttendance and Student. CakePHP can't guess what you are trying to 
 do, you need to tell it (The guessing part is coming up in version 4 as 
 part of the MRD featureset)



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help in simple query!

2013-05-30 Thread Dakota
That would be the expected result for that query. You aren't including the 
'SudentAttendance' model in your query. Looking how to use Containable, or 
custom join. You don't say what kind of relation there is between 
StudentAttendance and Student. CakePHP can't guess what you are trying to 
do, you need to tell it (The guessing part is coming up in version 4 as 
part of the MRD featureset)

On Thursday, 30 May 2013 01:46:53 UTC+2, gonzela2006 wrote:

 Hello,

 I used the following code in StudentAttendances controller:

 $students = $this -StudentAttendance-Student- find('all', array(
 'conditions' = array(
 'NOT' = array('StudentAttendance.date' = 
 array($year.'-'.$month.'-'.$day))
 ),
 'fields' = array('Student.id', 'Student.name'),
 'order' = 'Student.name ASC'
 ));


 On Wednesday, May 29, 2013 8:02:29 AM UTC+2, resting wrote:

 It will be helpful if you show us what you had done to produce that error.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help in simple query!

2013-05-29 Thread resting
It will be helpful if you show us what you had done to produce that error.


On Wednesday, 29 May 2013 04:53:39 UTC+8, gonzela2006 wrote:

 Hello,
 As you can see on the below image


 https://lh3.googleusercontent.com/-_Q29P1DXHlQ/UaUWfBmdtYI/AX8/CbEsouqCcCg/s1600/Presentation1.jpg
 I want to display students that didn't attendance on date 2013-03-01 so 
 the result should be as the following:
 *id name*
 2 Marta Simon
 4 Rex Maxwell
 6 Vivian Ellis

 I know this is simple query but I got this error
 Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 
 'StudentAttendance.date' in 'where clause'

 Thanks,


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help in simple query!

2013-05-29 Thread Dr. Drijk
Checkup for typo's can be helpfull.
:)

Op dinsdag 28 mei 2013 22:53:39 UTC+2 schreef gonzela2006 het volgende:

 Hello,
 As you can see on the below image


 https://lh3.googleusercontent.com/-_Q29P1DXHlQ/UaUWfBmdtYI/AX8/CbEsouqCcCg/s1600/Presentation1.jpg
 I want to display students that didn't attendance on date 2013-03-01 so 
 the result should be as the following:
 *id name*
 2 Marta Simon
 4 Rex Maxwell
 6 Vivian Ellis

 I know this is simple query but I got this error
 Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 
 'StudentAttendance.date' in 'where clause'

 Thanks,


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help in simple query!

2013-05-29 Thread gonzela2006
Hello,

I used the following code in StudentAttendances controller:

$students = $this -StudentAttendance-Student- find('all', array(
'conditions' = array(
'NOT' = array('StudentAttendance.date' = array($year.'-'.$month.'-'.$day))
),
'fields' = array('Student.id', 'Student.name'),
'order' = 'Student.name ASC'
));


On Wednesday, May 29, 2013 8:02:29 AM UTC+2, resting wrote:

 It will be helpful if you show us what you had done to produce that error.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help in simple query!

2013-05-29 Thread resting
Have to agree with Dr. Drijk to check on typos.
Is it StudentAttendances.date instead?

On Thursday, 30 May 2013 07:46:53 UTC+8, gonzela2006 wrote:

 Hello,

 I used the following code in StudentAttendances controller:

 $students = $this -StudentAttendance-Student- find('all', array(
 'conditions' = array(
 'NOT' = array('StudentAttendance.date' = 
 array($year.'-'.$month.'-'.$day))
 ),
 'fields' = array('Student.id', 'Student.name'),
 'order' = 'Student.name ASC'
 ));


 On Wednesday, May 29, 2013 8:02:29 AM UTC+2, resting wrote:

 It will be helpful if you show us what you had done to produce that error.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help with Cake Auth - Manual Login

2013-04-30 Thread Shahruk Khan
This is the working code I have:

if($this-Auth-login($user['User']))

Using this, I was able to force log my users in via Facebook. Do a find for 
the user and pass the User array.

On Tuesday, April 30, 2013 5:22:18 PM UTC-4, James Lukensow wrote:

 I'm running into a issue here, trying to get Cake to manually log a user 
 in. Here is what I am trying to accomplish.

 I'm using a XML-RPC to log the user in to Vbulletin from Cakephp, what I 
 get back are some cookies, and user info. On the CakePhp Side of things, I 
 have a Users table, which contains:

 1. id
 2. vbulletinid
 3. username
 4. avatar
 5. created
 6. modified

 Now, when you're on the Cake side of things, and you log in, within my 
 login() method, I grab the following, for the xml-rpc call:

 $username = $this-request-data['User']['username'];
 $password = $this-request-data['User']['password'];

 If the response is valid, and the user is logged in remotely to vbulletin, 
 I then insert the user into the Users table. If they're already in there, I 
 just update the username and avatar, etc.

 So, I was trying to do the following, to force the login:

 $this-Auth-login($user)

 Where $user contained:

 Array
 (
 [User] = Array
 (
 [id] = 13
 [username] = testuser
 )

 )

 I thought everything was working, until I turned off the Debugkit plugin. 
 Then, it seems like my login is not working actually. With it turned off, I 
 can't force Cake to log my current user in.

 Anyone have any ideas on how to force a login?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help with Cake Auth - Manual Login

2013-04-30 Thread James Lukensow
What values are you passing inside of the $user array. I assume just a 
username and what else?

On Tuesday, April 30, 2013 9:01:45 PM UTC-6, Shahruk Khan wrote:

 This is the working code I have:

 if($this-Auth-login($user['User']))

 Using this, I was able to force log my users in via Facebook. Do a find 
 for the user and pass the User array.

 On Tuesday, April 30, 2013 5:22:18 PM UTC-4, James Lukensow wrote:

 I'm running into a issue here, trying to get Cake to manually log a user 
 in. Here is what I am trying to accomplish.

 I'm using a XML-RPC to log the user in to Vbulletin from Cakephp, what I 
 get back are some cookies, and user info. On the CakePhp Side of things, I 
 have a Users table, which contains:

 1. id
 2. vbulletinid
 3. username
 4. avatar
 5. created
 6. modified

 Now, when you're on the Cake side of things, and you log in, within my 
 login() method, I grab the following, for the xml-rpc call:

 $username = $this-request-data['User']['username'];
 $password = $this-request-data['User']['password'];

 If the response is valid, and the user is logged in remotely to 
 vbulletin, I then insert the user into the Users table. If they're already 
 in there, I just update the username and avatar, etc.

 So, I was trying to do the following, to force the login:

 $this-Auth-login($user)

 Where $user contained:

 Array
 (
 [User] = Array
 (
 [id] = 13
 [username] = testuser
 )

 )

 I thought everything was working, until I turned off the Debugkit plugin. 
 Then, it seems like my login is not working actually. With it turned off, I 
 can't force Cake to log my current user in.

 Anyone have any ideas on how to force a login?



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help with Cake Auth - Manual Login

2013-04-30 Thread James Lukensow
Okay, was able to get it working by adding the following to my beforefilter:

$this-set('user', $this-Auth-user());


On Tuesday, April 30, 2013 9:01:45 PM UTC-6, Shahruk Khan wrote:

 This is the working code I have:

 if($this-Auth-login($user['User']))

 Using this, I was able to force log my users in via Facebook. Do a find 
 for the user and pass the User array.

 On Tuesday, April 30, 2013 5:22:18 PM UTC-4, James Lukensow wrote:

 I'm running into a issue here, trying to get Cake to manually log a user 
 in. Here is what I am trying to accomplish.

 I'm using a XML-RPC to log the user in to Vbulletin from Cakephp, what I 
 get back are some cookies, and user info. On the CakePhp Side of things, I 
 have a Users table, which contains:

 1. id
 2. vbulletinid
 3. username
 4. avatar
 5. created
 6. modified

 Now, when you're on the Cake side of things, and you log in, within my 
 login() method, I grab the following, for the xml-rpc call:

 $username = $this-request-data['User']['username'];
 $password = $this-request-data['User']['password'];

 If the response is valid, and the user is logged in remotely to 
 vbulletin, I then insert the user into the Users table. If they're already 
 in there, I just update the username and avatar, etc.

 So, I was trying to do the following, to force the login:

 $this-Auth-login($user)

 Where $user contained:

 Array
 (
 [User] = Array
 (
 [id] = 13
 [username] = testuser
 )

 )

 I thought everything was working, until I turned off the Debugkit plugin. 
 Then, it seems like my login is not working actually. With it turned off, I 
 can't force Cake to log my current user in.

 Anyone have any ideas on how to force a login?



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help With Classes and Objects

2013-03-08 Thread lowpass
On Wed, Mar 6, 2013 at 11:03 AM, Karl Smith barnun...@hotmail.com wrote:
 I am currently taking on a medium sized application and I need a few
 pointers as far as the design process goes. The project I am working on is
 going to be a new version of a website written with the ASP.NET 1.1
 framework. The application I am working with is very straightforward ,but I
 want to know what should be considered a class. There is one class that I am
 sure that I will have and that is Users. Now with that said, the application
 will have three types of users, which are Agency, Individuals, and last but
 not least Admin. Now the only thing that my application will be really used
 for is to submit data via forms, and once submitted the users will have to
 the ability to view the data submitted and export the data to an excel
 spreadsheet. Now my question is by looking at the legacy website, how should
 I know what should be considered a class, and also what should be considered
 an object. With that said, this is my first real project and I just need a
 little guidance. Thanks in advance!!

You may want to consider User and Role classes and implementing ACL.
The latter may seem intimidating but it's not to hard to understand.
Just be patient when reading up on it. Here's a good tutorial:

http://mark-story.com/posts/view/auth-and-acl-an-end-to-end-tutorial-pt-1

As for classes and objects, they're the same thing (more or less). An
object is an instance of a class. The class defines the object. The
object is what you call the class methods on.

class MyClass {
  public $bar = 'foo bar';
}

$Foo = new Mylass(); // $Foo is an object now; let's do something with it

echo $Foo-bar();

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help / Source code for Simple Authentication tutorial

2013-02-28 Thread Scott Tobias
I had this problem and fixed it

in my AppController.php file  I had:
 class AppController extends Controller {

  public $components=array('DebugKit.Toolbar');
  public $helpers = array('Html', 'Form', 'Session');
  public $components = array('Session');

Removing the last 2 lines to a different controller (UsersController.php in 
my case)   got rid of the error :)



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: help for cakephp2.x template

2013-02-28 Thread Julien Itard
hi,
go here : /app/Views/Layouts/default.ctp  HTML file
go here : /app/webroot/css/  CSS file

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help / Source code for Simple Authentication tutorial

2013-02-03 Thread Omega
I'm having the exact same error message and can't seem to resolve it. 
Did you ever find the solution? It sounds like you went through the same 
trouble.

  

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

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




Re: Help! Complex tree model pagination and paginateCount with wrong results

2013-01-07 Thread marcus33cz
Hi Nikola,

have you tried using 'contain' (Containable behavior) instead of the 
'joins' you mention? 

Marek

Dne pondělí, 7. ledna 2013 14:36:59 UTC+1 Salines napsal(a):

 Hi there,

 I'm working on a complex site, where the model 'post' has a tree 
 structure. This structure allows me to organize the cascading content.

 Table posts has a field 'type' by which a content type, 0 tells us that 
 the order is a group of articles, and 1 represents article.

 I also have another table 'levels_posts' (self HABTM related), which 
 allows me from any deep-level of parent, to retrieve all child articles.

 I have the following piece of code that works correctly:


 $this - Post - recursive = -1;
 $this - paginate = array(
 'joins' = array(
 array(
 'table' = 'levels_posts',  // self HABTM or posts HABTM posts
 'alias' = 'Level',
 'type' = 'inner',
 'conditions' = array(
 'Level.level_id ' = $check_post['Post']['id'],
 ),
 ),
 array(
 'table' = 'posts',
 'alias' = 'Related', // children post
 'type' = 'inner',
 'conditions' = array(
 'Related.id = Level.post_id',
 'Related.type' = 1, // where is post type 1 (article)
 ),
 ),
 array(
 'table' = 'posts',
 'alias' = 'Parent', / return first parent level
 'type' = 'inner',
 'conditions' = array(
 'Parent.id = Related.parent_id',
 ),
 ),
 array(
 'table' = 'pictures',
 'alias' = 'Picture',
 'type' = 'left',
 'conditions' = array(
 'Picture.post_id = Related.id',
 ),
 ),
 ), 
 'group' = 'Related.id',
 'fields' = array('Related.*','Picture.*','Parent.title'),
 'limit' = 20,
 );
 $this - set('posts', $this - paginate());

 But the problem is that we paginateCount returns an incorrect result,

 Instead of this query

 SELECT COUNT(*) AS `count` FROM `farm_ba`.`posts` AS `Post` inner JOIN 
 `farm_ba`.`levels_posts` AS `Level` ON (`Level`.`level_id` = '1') inner 
 JOIN `farm_ba`.`posts` AS `Related` ON (`Related`.`id` = `Level`.`post_id` 
 AND `Related`.`type` = 1) inner JOIN `farm_ba`.`posts` AS `Parent` ON 
 (`Parent`.`id` = `Related`.`parent_id`) left JOIN `farm_ba`.`pictures` AS 
 `Picture` ON (`Picture`.`post_id` = `Related`.`id`) WHERE 1 = 1 GROUP BY 
 `Related`.`id`

 I need a simple query like this

 SELECT COUNT( * ) AS  `count` FROM  `farm_ba`.`levels_posts` AS  `Level` 
 WHERE  `Level`.`level_id` = 17;  // $check_post['Post']['id'];

 This query gives me the correct number of children articles.

 I need help to solve this, please point me where I am wrong. Thank you 
 very much.

 Nikola




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help! Complex tree model pagination and paginateCount with wrong results

2013-01-07 Thread Salines
Hi, Marek

I have not found the right way to use 'Containable behavior'

Dana ponedjeljak, 7. siječnja 2013. 15:49:50 UTC+1, korisnik marcus33cz 
napisao je:

 Hi Nikola,

 have you tried using 'contain' (Containable behavior) instead of the 
 'joins' you mention? 

 Marek


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
Hi @jsundquist.

This is my rootappviews folder contents

C:\xampp\htdocs\divinghorse\app\views
C:\xampp\htdocs\divinghorse\app\views\administrators
C:\xampp\htdocs\divinghorse\app\views\categories
C:\xampp\htdocs\divinghorse\app\views\elements
C:\xampp\htdocs\divinghorse\app\views\errors
C:\xampp\htdocs\divinghorse\app\views\events
C:\xampp\htdocs\divinghorse\app\views\galleries
C:\xampp\htdocs\divinghorse\app\views\helpers
C:\xampp\htdocs\divinghorse\app\views\images
C:\xampp\htdocs\divinghorse\app\views\layouts
C:\xampp\htdocs\divinghorse\app\views\layouts\js
C:\xampp\htdocs\divinghorse\app\views\layouts\rss
C:\xampp\htdocs\divinghorse\app\views\layouts\xml
C:\xampp\htdocs\divinghorse\app\views\news
C:\xampp\htdocs\divinghorse\app\views\newsdetail
C:\xampp\htdocs\divinghorse\app\views\ourevents
C:\xampp\htdocs\divinghorse\app\views\ourgalleries
C:\xampp\htdocs\divinghorse\app\views\pagecontent
C:\xampp\htdocs\divinghorse\app\views\pages
C:\xampp\htdocs\divinghorse\app\views\scaffolds

This is the admin panel online from panel login view thru setting up a new 
event and what it looks like on the web.

Admin Panel
http://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

Add New Event
http://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

Event Added in HTML editor mode.Then saved
http://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

Event view on web page, the guestflo widget script and stripped
http://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.comjavascript: 
 wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this site 
 http://guestflo.com/ to create promotional ads for their website. 

 I would post the site but it's an adult site for a strip club in Atlantic 
 City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event it 
 doesn't allow me to embed that widget code. It only allows for basic HTML 
 and upload of an image to be posted under Managed Events on the CMS. 

 I've told the customer this may not be possible to post the widget mainly 
 because the version they are using is cakePHP vers 1.3. Which I believe is 
 old and doesn't support the jquery scripts. If there is a work around 
 without ruining their CMS framework, I'll try it but I really don't think 
 they want to have the code changed entirely in order to make the widget 
 work.

 Hopefully this all makes sense and I'm not rambling. Any help you can 
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp 
 Google Groups but nothing showed up. I clicked new cakephp Google group, 
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;**
  script 
 src=http://guestflo.com/**venue-widget.phphttp://guestflo.com/venue-widget.php
 ?
 VenueID=31limit=30a_link=**614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

  -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 cake-php+u...@googlegroups.com javascript:.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
  
  



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 

Re: Help please with Guestflo widget

2012-12-28 Thread Jonathan Sundquist
So your pasting html into a tinymxe editor which Will convert a  into lt;
and a  gt;.

If you are trying to add this static widget to the events page you Will
need to modify the ctp file within the /app/views/events directory.
Possibly an index.ctp file.

I would suggest checking out the docs for cakephp at docs.cakephp.org.
also in order to figure out which version of cakephp you are using check
out the /cake directory. If you view any file in there it should give you
an idea as to the version.
On Dec 28, 2012 6:35 AM, mrfugimoto r...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\app\views
 C:\xampp\htdocs\divinghorse\app\views\administrators
 C:\xampp\htdocs\divinghorse\app\views\categories
 C:\xampp\htdocs\divinghorse\app\views\elements
 C:\xampp\htdocs\divinghorse\app\views\errors
 C:\xampp\htdocs\divinghorse\app\views\events
 C:\xampp\htdocs\divinghorse\app\views\galleries
 C:\xampp\htdocs\divinghorse\app\views\helpers
 C:\xampp\htdocs\divinghorse\app\views\images
 C:\xampp\htdocs\divinghorse\app\views\layouts
 C:\xampp\htdocs\divinghorse\app\views\layouts\js
 C:\xampp\htdocs\divinghorse\app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\app\views\news
 C:\xampp\htdocs\divinghorse\app\views\newsdetail
 C:\xampp\htdocs\divinghorse\app\views\ourevents
 C:\xampp\htdocs\divinghorse\app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\app\views\pagecontent
 C:\xampp\htdocs\divinghorse\app\views\pages
 C:\xampp\htdocs\divinghorse\app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a new
 event and what it looks like on the web.

 Admin Panel

 http://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event

 http://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved

 http://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped

 http://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in
 itself. It might help to understand this admin panel you speak of.
 Honestly it sounds to me like you need to modify the layout file which is
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo
 customers. This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this
 site http://guestflo.com/ to create promotional ads for their website.

 I would post the site but it's an adult site for a strip club in
 Atlantic City New Jersey USA.

 Basically when I go into the cakePHP management console Add event it
 doesn't allow me to embed that widget code. It only allows for basic HTML
 and upload of an image to be posted under Managed Events on the CMS.

 I've told the customer this may not be possible to post the widget
 mainly because the version they are using is cakePHP vers 1.3. Which I
 believe is old and doesn't support the jquery scripts. If there is a work
 around without ruining their CMS framework, I'll try it but I really don't
 think they want to have the code changed entirely in order to make the
 widget work.

 Hopefully this all makes sense and I'm not rambling. Any help you can
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp
 Google Groups but nothing showed up. I clicked new cakephp Google group,
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script 
 src=http://guestflo.com/**venue**-widget.phphttp://guestflo.com/venue-widget.php
 ?
 VenueID=31limit=30a_link=**614** type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHPhttps://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are 

Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
Hi @jsundquist, it's cake version 1.3Old. I have read through 
everything I think there is in the cookbooks. It seems not even the 
developers of cakePHP know how to get the widget to work. It's not a knock 
against the developers. I just don't see any references to adding scripts 
in their documentation. Not even on the google groups. 

Any idea if the newest version supports embedding scripts?

Thank you for your help.

On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into 
 lt; and a  gt;. 

 If you are trying to add this static widget to the events page you Will 
 need to modify the ctp file within the /app/views/events directory. 
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.  
 also in order to figure out which version of cakephp you are using check 
 out the /cake directory. If you view any file in there it should give you 
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.comjavascript: 
 wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\app\views
 C:\xampp\htdocs\divinghorse\app\views\administrators
 C:\xampp\htdocs\divinghorse\app\views\categories
 C:\xampp\htdocs\divinghorse\app\views\elements
 C:\xampp\htdocs\divinghorse\app\views\errors
 C:\xampp\htdocs\divinghorse\app\views\events
 C:\xampp\htdocs\divinghorse\app\views\galleries
 C:\xampp\htdocs\divinghorse\app\views\helpers
 C:\xampp\htdocs\divinghorse\app\views\images
 C:\xampp\htdocs\divinghorse\app\views\layouts
 C:\xampp\htdocs\divinghorse\app\views\layouts\js
 C:\xampp\htdocs\divinghorse\app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\app\views\news
 C:\xampp\htdocs\divinghorse\app\views\newsdetail
 C:\xampp\htdocs\divinghorse\app\views\ourevents
 C:\xampp\htdocs\divinghorse\app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\app\views\pagecontent
 C:\xampp\htdocs\divinghorse\app\views\pages
 C:\xampp\htdocs\divinghorse\app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a 
 new event and what it looks like on the web.

 Admin Panel

 http://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event

 http://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved

 http://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped

 http://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this 
 site http://guestflo.com/ to create promotional ads for their website. 

 I would post the site but it's an adult site for a strip club in 
 Atlantic City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event it 
 doesn't allow me to embed that widget code. It only allows for basic HTML 
 and upload of an image to be posted under Managed Events on the CMS. 

 I've told the customer this may not be possible to post the widget 
 mainly because the version they are using is cakePHP vers 1.3. Which I 
 believe is old and doesn't support the jquery scripts. If there is a work 
 around without ruining their CMS framework, I'll try it but I really don't 
 think they want to have the code changed entirely in order to make the 
 widget work.

 Hopefully this all makes sense and I'm not rambling. Any help you can 
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp 
 Google Groups but nothing showed up. I clicked new cakephp Google group, 
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on 

Re: Help please with Guestflo widget

2012-12-28 Thread Jonathan Sundquist
This really isn't a cakephp problem.  Someone built a cms on top of cakephp
and you are relaying heavily on that.  In order to add this new, from what
I can understand from the initial post, static widget you will need to
modify one of the view files.  This doesn't sound like some thing you will
be able to accomplish via the admin panel. If you would like help walking
you through what is required feel free to email me directly and I will try
to help you out.


On Fri, Dec 28, 2012 at 8:57 AM, mrfugimoto r...@nhlfightclub.com wrote:

 Hi @jsundquist, it's cake version 1.3Old. I have read through
 everything I think there is in the cookbooks. It seems not even the
 developers of cakePHP know how to get the widget to work. It's not a knock
 against the developers. I just don't see any references to adding scripts
 in their documentation. Not even on the google groups.

 Any idea if the newest version supports embedding scripts?

 Thank you for your help.


 On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into
 lt; and a  gt;.

 If you are trying to add this static widget to the events page you Will
 need to modify the ctp file within the /app/views/events directory.
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.
 also in order to figure out which version of cakephp you are using check
 out the /cake directory. If you view any file in there it should give you
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\**app\views
 C:\xampp\htdocs\divinghorse\**app\views\administrators
 C:\xampp\htdocs\divinghorse\**app\views\categories
 C:\xampp\htdocs\divinghorse\**app\views\elements
 C:\xampp\htdocs\divinghorse\**app\views\errors
 C:\xampp\htdocs\divinghorse\**app\views\events
 C:\xampp\htdocs\divinghorse\**app\views\galleries
 C:\xampp\htdocs\divinghorse\**app\views\helpers
 C:\xampp\htdocs\divinghorse\**app\views\images
 C:\xampp\htdocs\divinghorse\**app\views\layouts
 C:\xampp\htdocs\divinghorse\**app\views\layouts\js
 C:\xampp\htdocs\divinghorse\**app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\**app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\**app\views\news
 C:\xampp\htdocs\divinghorse\**app\views\newsdetail
 C:\xampp\htdocs\divinghorse\**app\views\ourevents
 C:\xampp\htdocs\divinghorse\**app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\**app\views\pagecontent
 C:\xampp\htdocs\divinghorse\**app\views\pages
 C:\xampp\htdocs\divinghorse\**app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a
 new event and what it looks like on the web.

 Admin Panel
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/1-**
 adminhome_zps366ca5cb.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/2-**
 addevent_zpsa7092e1d.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/3-**
 eventadded_saved_zps985dadb3.**jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/4-**
 pageresult_zpscd55c45a.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in
 itself. It might help to understand this admin panel you speak of.
 Honestly it sounds to me like you need to modify the layout file which is
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo
 customers. This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this
 site http://guestflo.com/ to create promotional ads for their
 website.

 I would post the site but it's an adult site for a strip club in
 Atlantic City New Jersey USA.

 Basically when I go into the cakePHP management console Add event
 it doesn't allow me to embed that widget code. It only allows for basic
 HTML and upload of an image to be posted under Managed Events on the 
 CMS.

 I've told the customer this may not be possible to post the widget
 mainly because the version they are using is cakePHP vers 1.3. Which I
 believe is old and doesn't support the jquery scripts. If there is a work
 around without ruining their CMS framework, I'll try it but I really don't
 think they want to have the code changed 

Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
If you don't mind and would like to have a look, I would like to email you 
directly. What address would you like for me to email to?

Thank you

On Friday, December 28, 2012 11:18:11 AM UTC-5, jsundquist wrote:

 This really isn't a cakephp problem.  Someone built a cms on top of 
 cakephp and you are relaying heavily on that.  In order to add this new, 
 from what I can understand from the initial post, static widget you will 
 need to modify one of the view files.  This doesn't sound like some thing 
 you will be able to accomplish via the admin panel. If you would like help 
 walking you through what is required feel free to email me directly and I 
 will try to help you out.


 On Fri, Dec 28, 2012 at 8:57 AM, mrfugimoto 
 ro...@nhlfightclub.comjavascript:
  wrote:

 Hi @jsundquist, it's cake version 1.3Old. I have read through 
 everything I think there is in the cookbooks. It seems not even the 
 developers of cakePHP know how to get the widget to work. It's not a knock 
 against the developers. I just don't see any references to adding scripts 
 in their documentation. Not even on the google groups. 

 Any idea if the newest version supports embedding scripts?

 Thank you for your help.


 On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into 
 lt; and a  gt;. 

 If you are trying to add this static widget to the events page you Will 
 need to modify the ctp file within the /app/views/events directory. 
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.  
 also in order to figure out which version of cakephp you are using check 
 out the /cake directory. If you view any file in there it should give you 
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\**app\views
 C:\xampp\htdocs\divinghorse\**app\views\administrators
 C:\xampp\htdocs\divinghorse\**app\views\categories
 C:\xampp\htdocs\divinghorse\**app\views\elements
 C:\xampp\htdocs\divinghorse\**app\views\errors
 C:\xampp\htdocs\divinghorse\**app\views\events
 C:\xampp\htdocs\divinghorse\**app\views\galleries
 C:\xampp\htdocs\divinghorse\**app\views\helpers
 C:\xampp\htdocs\divinghorse\**app\views\images
 C:\xampp\htdocs\divinghorse\**app\views\layouts
 C:\xampp\htdocs\divinghorse\**app\views\layouts\js
 C:\xampp\htdocs\divinghorse\**app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\**app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\**app\views\news
 C:\xampp\htdocs\divinghorse\**app\views\newsdetail
 C:\xampp\htdocs\divinghorse\**app\views\ourevents
 C:\xampp\htdocs\divinghorse\**app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\**app\views\pagecontent
 C:\xampp\htdocs\divinghorse\**app\views\pages
 C:\xampp\htdocs\divinghorse\**app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a 
 new event and what it looks like on the web.

 Admin Panel
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/1-**
 adminhome_zps366ca5cb.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/2-**
 addevent_zpsa7092e1d.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/3-**
 eventadded_saved_zps985dadb3.**jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/4-**
 pageresult_zpscd55c45a.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this 
 site http://guestflo.com/ to create promotional ads for their 
 website. 

 I would post the site but it's an adult site for a strip club in 
 Atlantic City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event 
 it doesn't allow me to embed that widget code. It only allows for basic 
 HTML and upload of an image to be posted under Managed Events on the 
 CMS. 

 I've told the customer this may not be possible to post the 

Re: Help please with Guestflo widget

2012-12-28 Thread lowpass
In app\views\events there is probably a file named index.ctp. Open
that in an editor. There should be some PHP code that iterates over an
array of data to create listings for the events which are stored in
the DB. Find a place somewhere within this template to paste the
widget code. Next, go to app/tmp/cache/views and delete all files
inside if your cache isn't already disabled. Load the vents page and
see if the widget is displaying correctly.

On Thu, Dec 27, 2012 at 8:37 PM, mrfugimoto r...@nhlfightclub.com wrote:
 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo customers.
 This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this site
 http://guestflo.com/ to create promotional ads for their website.

 I would post the site but it's an adult site for a strip club in Atlantic
 City New Jersey USA.

 Basically when I go into the cakePHP management console Add event it
 doesn't allow me to embed that widget code. It only allows for basic HTML
 and upload of an image to be posted under Managed Events on the CMS.

 I've told the customer this may not be possible to post the widget mainly
 because the version they are using is cakePHP vers 1.3. Which I believe is
 old and doesn't support the jquery scripts. If there is a work around
 without ruining their CMS framework, I'll try it but I really don't think
 they want to have the code changed entirely in order to make the widget
 work.

 Hopefully this all makes sense and I'm not rambling. Any help you can
 provide is greatly appreciated. Thank you


 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp
 Google Groups but nothing showed up. I clicked new cakephp Google group, and
 still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script src=http://guestflo.com/venue-widget.php?
 VenueID=31limit=30a_link=614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
nevermind I see your email address is in the autonotification.

On Friday, December 28, 2012 12:54:43 PM UTC-5, mrfugimoto wrote:

 If you don't mind and would like to have a look, I would like to email you 
 directly. What address would you like for me to email to?

 Thank you

 On Friday, December 28, 2012 11:18:11 AM UTC-5, jsundquist wrote:

 This really isn't a cakephp problem.  Someone built a cms on top of 
 cakephp and you are relaying heavily on that.  In order to add this new, 
 from what I can understand from the initial post, static widget you will 
 need to modify one of the view files.  This doesn't sound like some thing 
 you will be able to accomplish via the admin panel. If you would like help 
 walking you through what is required feel free to email me directly and I 
 will try to help you out.


 On Fri, Dec 28, 2012 at 8:57 AM, mrfugimoto ro...@nhlfightclub.comwrote:

 Hi @jsundquist, it's cake version 1.3Old. I have read through 
 everything I think there is in the cookbooks. It seems not even the 
 developers of cakePHP know how to get the widget to work. It's not a knock 
 against the developers. I just don't see any references to adding scripts 
 in their documentation. Not even on the google groups. 

 Any idea if the newest version supports embedding scripts?

 Thank you for your help.


 On Friday, December 28, 2012 9:15:25 AM UTC-5, jsundquist wrote:

 So your pasting html into a tinymxe editor which Will convert a  into 
 lt; and a  gt;. 

 If you are trying to add this static widget to the events page you Will 
 need to modify the ctp file within the /app/views/events directory. 
 Possibly an index.ctp file.

 I would suggest checking out the docs for cakephp at docs.cakephp.org.  
 also in order to figure out which version of cakephp you are using check 
 out the /cake directory. If you view any file in there it should give you 
 an idea as to the version.
 On Dec 28, 2012 6:35 AM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @jsundquist.

 This is my rootappviews folder contents

 C:\xampp\htdocs\divinghorse\**app\views
 C:\xampp\htdocs\divinghorse\**app\views\administrators
 C:\xampp\htdocs\divinghorse\**app\views\categories
 C:\xampp\htdocs\divinghorse\**app\views\elements
 C:\xampp\htdocs\divinghorse\**app\views\errors
 C:\xampp\htdocs\divinghorse\**app\views\events
 C:\xampp\htdocs\divinghorse\**app\views\galleries
 C:\xampp\htdocs\divinghorse\**app\views\helpers
 C:\xampp\htdocs\divinghorse\**app\views\images
 C:\xampp\htdocs\divinghorse\**app\views\layouts
 C:\xampp\htdocs\divinghorse\**app\views\layouts\js
 C:\xampp\htdocs\divinghorse\**app\views\layouts\rss
 C:\xampp\htdocs\divinghorse\**app\views\layouts\xml
 C:\xampp\htdocs\divinghorse\**app\views\news
 C:\xampp\htdocs\divinghorse\**app\views\newsdetail
 C:\xampp\htdocs\divinghorse\**app\views\ourevents
 C:\xampp\htdocs\divinghorse\**app\views\ourgalleries
 C:\xampp\htdocs\divinghorse\**app\views\pagecontent
 C:\xampp\htdocs\divinghorse\**app\views\pages
 C:\xampp\htdocs\divinghorse\**app\views\scaffolds

 This is the admin panel online from panel login view thru setting up a 
 new event and what it looks like on the web.

 Admin Panel
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/1-**
 adminhome_zps366ca5cb.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/1-adminhome_zps366ca5cb.jpg

 Add New Event
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/2-**
 addevent_zpsa7092e1d.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/2-addevent_zpsa7092e1d.jpg

 Event Added in HTML editor mode.Then saved
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/3-**
 eventadded_saved_zps985dadb3.**jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/3-eventadded_saved_zps985dadb3.jpg

 Event view on web page, the guestflo widget script and stripped
 http://i366.photobucket.com/**albums/oo101/johnnypiepics/4-**
 pageresult_zpscd55c45a.jpghttp://i366.photobucket.com/albums/oo101/johnnypiepics/4-pageresult_zpscd55c45a.jpg

 On Thursday, December 27, 2012 8:48:55 PM UTC-5, jsundquist wrote:

 What is Grr Cms that they are using? Cakephp is just a framework in 
 itself. It might help to understand this admin panel you speak of. 
 Honestly it sounds to me like you need to modify the layout file which 
 is 
 usually with app/Views
 On Dec 27, 2012 7:37 PM, mrfugimoto ro...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. This particular one is the only one who uses this script. 

 The business owner, (our customer) just started using guestflo, this 
 site http://guestflo.com/ to create promotional ads for their 
 website. 

 I would post the site but it's an adult site for a strip club in 
 Atlantic City New Jersey USA. 

 Basically when I go into the cakePHP management console Add event 
 it doesn't allow me to embed that widget code. It only allows for basic 
 HTML and upload of 

Re: Help please with Guestflo widget

2012-12-28 Thread mrfugimoto
Thank you @Cricket. With the assistance of @jlundquist, he was able to help 
get me situated. Everything is working, everybody is happy. 

Essentially the site I had to add the widget to is a complete train wreck. 
jlundquist created an entirely new page with the widget and I put a link on 
the menu. Working and customer is happy.

Great assistance here. Thank you both!

On Friday, December 28, 2012 1:26:20 PM UTC-5, cricket wrote:

 In app\views\events there is probably a file named index.ctp. Open 
 that in an editor. There should be some PHP code that iterates over an 
 array of data to create listings for the events which are stored in 
 the DB. Find a place somewhere within this template to paste the 
 widget code. Next, go to app/tmp/cache/views and delete all files 
 inside if your cache isn't already disabled. Load the vents page and 
 see if the widget is displaying correctly. 

 On Thu, Dec 27, 2012 at 8:37 PM, mrfugimoto 
 ro...@nhlfightclub.comjavascript: 
 wrote: 
  Hi @cricket. Thank you very much for reply. 
  
  Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo 
 customers. 
  This particular one is the only one who uses this script. 
  
  The business owner, (our customer) just started using guestflo, this 
 site 
  http://guestflo.com/ to create promotional ads for their website. 
  
  I would post the site but it's an adult site for a strip club in 
 Atlantic 
  City New Jersey USA. 
  
  Basically when I go into the cakePHP management console Add event it 
  doesn't allow me to embed that widget code. It only allows for basic 
 HTML 
  and upload of an image to be posted under Managed Events on the CMS. 
  
  I've told the customer this may not be possible to post the widget 
 mainly 
  because the version they are using is cakePHP vers 1.3. Which I believe 
 is 
  old and doesn't support the jquery scripts. If there is a work around 
  without ruining their CMS framework, I'll try it but I really don't 
 think 
  they want to have the code changed entirely in order to make the widget 
  work. 
  
  Hopefully this all makes sense and I'm not rambling. Any help you can 
  provide is greatly appreciated. Thank you 
  
  
  On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote: 
  
  Hi Please delete if this shows up twice. I posted in the old cakephp 
  Google Groups but nothing showed up. I clicked new cakephp Google 
 group, and 
  still didn't see anything. 
  
  Trying again... 
  
  Hi I am extremely unfamiliar with cakephp framework. I work for a web 
  development company who provide SEO support to customers. We inherited 
  a site which is cakephp 1.3, (I believe an old version). We have an 
  Our Events page and the customer asked me to add a widget 
  
  This is the widget below. I've tried adding this through the admin 
  panel New Event. Nothing works. It's just an empty image frame with 
  nothing to the right. Please help. I've tried everywhere on Google and 
  find nothing. 
  
  Thank you to anybody ahead of time. 
  
  code 
  div style=float:left;width:600px; 
   script src=http://guestflo.com/venue-widget.php? 
  VenueID=31limit=30a_link=614 type=text/javascript 
   /div 
   style type=text/css 
  .widget-wrapper{ 
  width:650px; 
  color:#fff; 
  } 
   /style 
  /code 
  
  -- 
  Like Us on FaceBook https://www.facebook.com/CakePHP 
  Find us on Twitter http://twitter.com/CakePHP 
  
  --- 
  You received this message because you are subscribed to the Google 
 Groups 
  CakePHP group. 
  To post to this group, send email to cake...@googlegroups.comjavascript:. 

  To unsubscribe from this group, send email to 
  cake-php+u...@googlegroups.com javascript:. 
  Visit this group at http://groups.google.com/group/cake-php?hl=en. 
  
  


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help please with Guestflo widget

2012-12-27 Thread lowpass
Is this Guestflo widget meant to replace the existing Events code?
Does it load HTML from some other site? If that's the case, it
probably shouldn't be added through the database. Rather, the existing
events code could be removed, and the index.ctp template changed to
just include the widget code, rather than iterate over the events
fetched from the DB.

On Thu, Dec 27, 2012 at 2:41 PM, mrfugimoto r...@nhlfightclub.com wrote:
 Hi Please delete if this shows up twice. I posted in the old cakephp Google
 Groups but nothing showed up. I clicked new cakephp Google group, and still
 didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script src=http://guestflo.com/venue-widget.php?
 VenueID=31limit=30a_link=614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help please with Guestflo widget

2012-12-27 Thread mrfugimoto
Hi @cricket. Thank you very much for reply.

Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo customers. 
This particular one is the only one who uses this script. 

The business owner, (our customer) just started using guestflo, this site 
http://guestflo.com/ to create promotional ads for their website. 

I would post the site but it's an adult site for a strip club in Atlantic 
City New Jersey USA. 

Basically when I go into the cakePHP management console Add event it 
doesn't allow me to embed that widget code. It only allows for basic HTML 
and upload of an image to be posted under Managed Events on the CMS. 

I've told the customer this may not be possible to post the widget mainly 
because the version they are using is cakePHP vers 1.3. Which I believe is 
old and doesn't support the jquery scripts. If there is a work around 
without ruining their CMS framework, I'll try it but I really don't think 
they want to have the code changed entirely in order to make the widget 
work.

Hopefully this all makes sense and I'm not rambling. Any help you can 
provide is greatly appreciated. Thank you

On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp 
 Google Groups but nothing showed up. I clicked new cakephp Google group, 
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;
  script src=http://guestflo.com/venue-widget.php?
 VenueID=31limit=30a_link=614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help please with Guestflo widget

2012-12-27 Thread Jonathan Sundquist
What is Grr Cms that they are using? Cakephp is just a framework in itself.
It might help to understand this admin panel you speak of. Honestly it
sounds to me like you need to modify the layout file which is usually with
app/Views
On Dec 27, 2012 7:37 PM, mrfugimoto r...@nhlfightclub.com wrote:

 Hi @cricket. Thank you very much for reply.

 Unfortunately I am very unfamiliar with cakePHP. Of our 300 seo customers.
 This particular one is the only one who uses this script.

 The business owner, (our customer) just started using guestflo, this site
 http://guestflo.com/ to create promotional ads for their website.

 I would post the site but it's an adult site for a strip club in Atlantic
 City New Jersey USA.

 Basically when I go into the cakePHP management console Add event it
 doesn't allow me to embed that widget code. It only allows for basic HTML
 and upload of an image to be posted under Managed Events on the CMS.

 I've told the customer this may not be possible to post the widget mainly
 because the version they are using is cakePHP vers 1.3. Which I believe is
 old and doesn't support the jquery scripts. If there is a work around
 without ruining their CMS framework, I'll try it but I really don't think
 they want to have the code changed entirely in order to make the widget
 work.

 Hopefully this all makes sense and I'm not rambling. Any help you can
 provide is greatly appreciated. Thank you

 On Thursday, December 27, 2012 2:41:55 PM UTC-5, mrfugimoto wrote:

 Hi Please delete if this shows up twice. I posted in the old cakephp
 Google Groups but nothing showed up. I clicked new cakephp Google group,
 and still didn't see anything.

 Trying again...

 Hi I am extremely unfamiliar with cakephp framework. I work for a web
 development company who provide SEO support to customers. We inherited
 a site which is cakephp 1.3, (I believe an old version). We have an
 Our Events page and the customer asked me to add a widget

 This is the widget below. I've tried adding this through the admin
 panel New Event. Nothing works. It's just an empty image frame with
 nothing to the right. Please help. I've tried everywhere on Google and
 find nothing.

 Thank you to anybody ahead of time.

 code
 div style=float:left;width:600px;**
  script 
 src=http://guestflo.com/**venue-widget.phphttp://guestflo.com/venue-widget.php
 ?
 VenueID=31limit=30a_link=**614 type=text/javascript
  /div
  style type=text/css
 .widget-wrapper{
 width:650px;
 color:#fff;
 }
  /style
 /code

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help! - Simple authentication tutorial? Is it broken?

2012-12-20 Thread crush
Hey,

I had this error:

Fatal error: Class declarations may not be nested in 
/srv/www/website/public_html/lib/Cake/Controller/CakeErrorController.php on 
line 31

and finally tracked it down to the beforeFilter existing on the users 
controller twice:

public function beforeFilter() {
parent::beforeFilter();
$this-Auth-allow('add');
}

I deleted the second one and everything started working properly.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help / Source code for Simple Authentication tutorial

2012-12-20 Thread OxfordRob
@cricket - thank you for that explanation of a several points. I made the 
changes as you suggested but still no joy.

Here is the Apache log from when I finished last night...

[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Fatal error:  
Class 'AppController' not found in 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Controller/CakeErrorController.php on 
line 31
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   1. {main}() 
/var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   2. 
Dispatcher-dispatch() /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:97
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   3. 
Dispatcher-_getController() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:152
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   4. 
Dispatcher-_loadController() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:228
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   5. 
class_exists() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:259
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   6. App::load() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   7. include() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:540
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   8. App::load() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   9. 
App::shutdown() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  10. 
App::_checkFatalError() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:899
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  11. 
call_user_func() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:926
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  12. 
ErrorHandler::handleError() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  13. 
ErrorHandler::handleFatalError() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:161
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  14. 
call_user_func() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:211
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  15. 
ErrorHandler::handleException() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  16. 
ExceptionRenderer-__construct() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:125
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  17. 
ExceptionRenderer-_getController() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ExceptionRenderer.php:94
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  18. App::load() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
[Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  19. include() 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:560


On Wednesday, 19 December 2012 21:57:26 UTC, cricket wrote:

 On Wed, Dec 19, 2012 at 3:13 PM, OxfordRob pest...@gmail.comjavascript: 
 wrote: 
  I have a clue... The line: 
  
  App::uses('AuthComponent', 'Controller/Component'); 

 The error msg you posted has nothing to do with AuthComponent. 

  looks as if it is referring to a library component within the folder 
  'Controller/Component'... 
  
  But I only have one file in that folder called 'empty' 

 That's for your application Components. The 'empty' file is there 
 because the Cake devs use Git, which, among other sucky things, can't 
 deal with empty folders. 

  Does that suggest something is missing? Do components have to be 
 downloaded 
  and installed separately? 

 The components that come with Cake, including Auth, are under the lib 
 directory. Store any other components you wish to use under 
 app/Controller/Components. 

 As for you AppController iussues, try setting these in 
 app/Config/core.php: 

 Configure::write('debug', 2); 
 Configure::write('Cache.disable', true); 

 Then delete all the files in the app/tmp/cache/persistent directory. 


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help! - Simple authentication tutorial? Is it broken?

2012-12-20 Thread OxfordRob
@crush - thanks for the suggestion. I have looked at that file and most of 
the others looking for repeated function declarations - but can't see 
anything like that.

On Thursday, 20 December 2012 11:34:06 UTC, crush wrote:

 Hey,

 I had this error:

 Fatal error: Class declarations may not be nested in 
 /srv/www/website/public_html/lib/Cake/Controller/CakeErrorController.php on 
 line 31

 and finally tracked it down to the beforeFilter existing on the users 
 controller twice:

 public function beforeFilter() {
 parent::beforeFilter();
 $this-Auth-allow('add');
 }

 I deleted the second one and everything started working properly.


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help! - Simple authentication tutorial? Is it broken?

2012-12-20 Thread OxfordRob
jsunquist,

Good suggestion. 

I tried moving everything up to the top level in my web server. I.e. I now 
have:

/var/www/app
/var/www/webroot
/var/www/css

etc. etc.

Is this correct? It is not what I understood from the installation 
instructions.

However, I think in the process I broke it even worse - oops. So my plan 
now is to clean everything out, and to go back the the clean install of 
cake without my tutorial code and start again from there.

I'll keep posting .but if anybody has actually made this tutorial work 
I would be very interested. I am starting to think I am in one of those 
'gumption traps' where I assume it is my own ignorance causing me problems, 
but actually there is something wrong with the tutorial and/or library code.

Rob

On Wednesday, 19 December 2012 21:15:44 UTC, jsundquist wrote:

 oxfordRob,

 I've been trying to figure out what might be your issue with little to no 
 success.  One thing I might suggest you try is to move your entire app 
 directory up to the root level instead of inside a subfolder if possible. 
  You may have a configuration issue causing cake core to not find the 
 appcontroller.  I do know you said that the blog tutorial worked for you 
 but its just a thought.


 On Wed, Dec 19, 2012 at 2:57 PM, OxfordRob pest...@gmail.comjavascript:
  wrote:

 Help! I have been trying to fix the 'Simple' Authentication tutorial for 
 10 hours today :-(

 The error messages from my Apache error log are listed below.

 I am sure I have an AppController.php file within the app/Controller 
 older. Also, that this contains a good version of the AppController class 
 from the tutorial.

 But still I get all of the errors below.

 Has anybody else successfully completed this tutorial and could give some 
 pointers?
  



 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Fatal error:  
 Class 'AppController' not found in 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Controller/CakeErrorController.php on 
 line 31
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Stack trace:
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   1. {main}() 
 /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   2. 
 Dispatcher-dispatch() /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:97
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   3. 
 Dispatcher-_getController() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:152
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   4. 
 Dispatcher-_loadController() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:228
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   5. 
 class_exists() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:259
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   6. 
 App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   7. include() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:540
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   8. 
 App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   9. 
 App::shutdown() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  10. 
 App::_checkFatalError() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:899
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  11. 
 call_user_func() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:926
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  12. 
 ErrorHandler::handleError() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  13. 
 ErrorHandler::handleFatalError() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:161
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  14. 
 call_user_func() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:211
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  15. 
 ErrorHandler::handleException() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  16. 
 ExceptionRenderer-__construct() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:125
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  17. 
 ExceptionRenderer-_getController() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ExceptionRenderer.php:94
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  18. 
 App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  19. include() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:560

 -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 

Re: Help! - Simple authentication tutorial? Is it broken?

2012-12-20 Thread lowpass
On Thu, Dec 20, 2012 at 3:12 PM, OxfordRob pestle...@gmail.com wrote:
 jsunquist,

 Good suggestion.

 I tried moving everything up to the top level in my web server. I.e. I now
 have:

 /var/www/app
 /var/www/webroot
 /var/www/css

 etc. etc.

 Is this correct? It is not what I understood from the installation
 instructions.

No, it's not correct. The css dir should be inside webroot, which
itself should be inside app.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help! - Simple authentication tutorial? Is it broken?

2012-12-20 Thread crush


 I'll keep posting .but if anybody has actually made this tutorial work 
 I would be very interested. I am starting to think I am in one of those 
 'gumption traps' where I assume it is my own ignorance causing me problems, 
 but actually there is something wrong with the tutorial and/or library code.


The tutorial does work properly. I actually just used it recently and the 
only issue that I had was a copy and paste issue. 

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help / Source code for Simple Authentication tutorial

2012-12-20 Thread Sam Sherlock
@OxfordRob where are the Controller Classes currently they (Users  App
controllers) should be in

app/Controller/

 - S


On 20 December 2012 20:03, OxfordRob pestle...@gmail.com wrote:

 @cricket - thank you for that explanation of a several points. I made the
 changes as you suggested but still no joy.

 Here is the Apache log from when I finished last night...

 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Fatal error:
 Class 'AppController' not found in
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Controller/CakeErrorController.php on
 line 31
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Stack trace:
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   1. {main}()
 /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   2.
 Dispatcher-dispatch() /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:97
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   3.
 Dispatcher-_getController()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:152
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   4.
 Dispatcher-_loadController()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:228
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   5.
 class_exists()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:259
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   6. App::load()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   7. include()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:540
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   8. App::load()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   9.
 App::shutdown() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  10.
 App::_checkFatalError() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:899
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  11.
 call_user_func() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:926
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  12.
 ErrorHandler::handleError()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  13.
 ErrorHandler::handleFatalError()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:161
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  14.
 call_user_func()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:211
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  15.
 ErrorHandler::handleException()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  16.
 ExceptionRenderer-__construct()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:125
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  17.
 ExceptionRenderer-_getController()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ExceptionRenderer.php:94
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  18. App::load()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  19. include()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:560


 On Wednesday, 19 December 2012 21:57:26 UTC, cricket wrote:

 On Wed, Dec 19, 2012 at 3:13 PM, OxfordRob pest...@gmail.com wrote:
  I have a clue... The line:
 
  App::uses('AuthComponent', 'Controller/Component');

 The error msg you posted has nothing to do with AuthComponent.

  looks as if it is referring to a library component within the folder
  'Controller/Component'...
 
  But I only have one file in that folder called 'empty'

 That's for your application Components. The 'empty' file is there
 because the Cake devs use Git, which, among other sucky things, can't
 deal with empty folders.

  Does that suggest something is missing? Do components have to be
 downloaded
  and installed separately?

 The components that come with Cake, including Auth, are under the lib
 directory. Store any other components you wish to use under
 app/Controller/Components.

 As for you AppController iussues, try setting these in
 app/Config/core.php:

 Configure::write('debug', 2);
 Configure::write('Cache.**disable', true);

 Then delete all the files in the app/tmp/cache/persistent directory.

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received 

Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread OxfordRob
As a follow upI am suspicious in this area

The tutorial says To add this component to your application *open* your 
app/Controller/AppController.php file and *add* the following lines:

But this is the first mention of an 'AppController.php' file.

So I just created an 'AppController.php' file and put in the code, but that 
does not feel right to me.

I already have a 'UsersController.php' file that contains the class 
definition:

class UsersController extends AppController 

So that makes me thing that 'AppController' is a pre-defined class in cake. 
Am I meant to be overloading this class?

Something seems wrong.

Any ideas please?


On Wednesday, 19 December 2012 12:24:34 UTC, OxfordRob wrote:

 Folks,

 I successfully worked through the blog tutorial and everything worked fine.

 I then moved onto the Authentication example / tutorial here...but can't 
 make it work..


 http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

 I get a gibberish error message when I access the page... (Copied below) 
 which does not give me any real clues about what I have done wrong.

 Does anybody know where to download the full source code for this example? 
 Or, if you have made this work, would you post it please?

 Any clues about how to read the error message below, and where I might 
 start looking would be very gratefully received!

 I have attached zip of my /app directory. 

 Thanks for any help!


 *Error message:* on accessing URL: 
 http://localhost/cakephp-2.3.0-RC1/users/add 

 Fatal error: Class declarations may not be nested in 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ExceptionRenderer.php on line 55 
 Call Stack: 0.0014 354512 1. {main}() 
 /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0 0.1175 2937464 2. 
 Dispatcher-dispatch() /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:97 
 0.1438 3490652 3. Dispatcher-_getController() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:152 0.1438 
 3490652 4. Dispatcher-_loadController() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:228 0.1440 
 3491896 5. class_exists() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:259 0.1440 
 3492168 6. App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0 
 0.1458 3537372 7. App::shutdown() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0 0.1468 3537344 8. 
 App::_checkFatalError() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:899 0.1470 3538456 9. 
 call_user_func() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:926 
 0.1470 3538500 10. ErrorHandler::handleError() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0 0.1471 3538992 11. 
 ErrorHandler::handleFatalError() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:161 0.1481 
 3548532 12. call_user_func() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:211 0.1481 
 3548560 13. ErrorHandler::handleException() 
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:0 0.1488 3550236 
 14. App::load() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0 



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread Jonathan Sundquist
The AppController.php is part of the default download of CakePHP in all
versions. I just downloaded a fresh copy of CakePHP 2.3.0-RC1 and within
the app/Controllers directory there is in fact an AppController.php file.
 You shouldn't need to re-create the file unless you deleted it.


On Wed, Dec 19, 2012 at 8:23 AM, OxfordRob pestle...@gmail.com wrote:

 As a follow upI am suspicious in this area

 The tutorial says To add this component to your application *open* your
 app/Controller/AppController.php file and *add* the following lines:

 But this is the first mention of an 'AppController.php' file.

 So I just created an 'AppController.php' file and put in the code, but
 that does not feel right to me.

 I already have a 'UsersController.php' file that contains the class
 definition:

 class UsersController extends AppController

 So that makes me thing that 'AppController' is a pre-defined class in
 cake. Am I meant to be overloading this class?

 Something seems wrong.

 Any ideas please?



 On Wednesday, 19 December 2012 12:24:34 UTC, OxfordRob wrote:

 Folks,

 I successfully worked through the blog tutorial and everything worked
 fine.

 I then moved onto the Authentication example / tutorial here...but can't
 make it work..

 http://book.cakephp.org/2.0/**en/tutorials-and-examples/**
 blog-auth-example/auth.htmlhttp://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

 I get a gibberish error message when I access the page... (Copied below)
 which does not give me any real clues about what I have done wrong.

 Does anybody know where to download the full source code for this
 example? Or, if you have made this work, would you post it please?

 Any clues about how to read the error message below, and where I might
 start looking would be very gratefully received!

 I have attached zip of my /app directory.

 Thanks for any help!


 *Error message:* on accessing URL: http://localhost/cakephp-2.3.**
 0-RC1/users/add http://localhost/cakephp-2.3.0-RC1/users/add

 Fatal error: Class declarations may not be nested in
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Error/**ExceptionRenderer.php on
 line 55 Call Stack: 0.0014 354512 1. {main}() /var/www/cakephp-2.3.0-RC1/
 **app/webroot/index.php:0 0.1175 2937464 2. Dispatcher-dispatch()
 /var/www/cakephp-2.3.0-RC1/**app/webroot/index.php:97 0.1438 3490652 3.
 Dispatcher-_getController() /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Routing/Dispatcher.**php:152 0.1438 3490652 4.
 Dispatcher-_loadController() /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Routing/Dispatcher.**php:228 0.1440 3491896 5. class_exists()
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Routing/Dispatcher.**php:259
 0.1440 3492168 6. App::load() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0
 0.1458 3537372 7. App::shutdown() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0
 0.1468 3537344 8. App::_checkFatalError() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:899
 0.1470 3538456 9. call_user_func() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:926
 0.1470 3538500 10. ErrorHandler::handleError() /var/www/cakephp-2.3.0-RC1/
 **lib/Cake/Core/App.php:0 0.1471 3538992 11. 
 ErrorHandler::**handleFatalError()
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Error/ErrorHandler.**php:161
 0.1481 3548532 12. call_user_func() /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Error/ErrorHandler.**php:211 0.1481 3548560 13.
 ErrorHandler::handleException(**) /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Error/ErrorHandler.**php:0 0.1488 3550236 14. App::load()
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0

  --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread OxfordRob
@jsundquist - that was helpful, thank you. I had deleted the file - and the 
one I had created was missing:

App::uses('Controller', 'Controller');

I am still seeing the long string of error messages however.

Fatal error: Class 'AppController' not found in 
/var/www/cakephp-2.3.0-RC1/lib/Cake/Controller/CakeErrorController.php on 
line 31 Call Stack: 0.0009 354512 1. {main}() 
/var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0 0.0896 2939480 2.  
etc

I am finding it very hard to make any sense of these error messages. They 
are no very 'diagnostic'. Is there any way of getting more useful 
information about where the error might be? I can't see any of my file 
names in there, and I can't even see where one error item starts and 
another ends







On Wednesday, 19 December 2012 14:27:34 UTC, jsundquist wrote:

 The AppController.php is part of the default download of CakePHP in all 
 versions. I just downloaded a fresh copy of CakePHP 2.3.0-RC1 and within 
 the app/Controllers directory there is in fact an AppController.php file. 
  You shouldn't need to re-create the file unless you deleted it.


 On Wed, Dec 19, 2012 at 8:23 AM, OxfordRob pest...@gmail.comjavascript:
  wrote:

 As a follow upI am suspicious in this area

 The tutorial says To add this component to your application *open* your 
 app/Controller/AppController.php file and *add* the following lines:

 But this is the first mention of an 'AppController.php' file.

 So I just created an 'AppController.php' file and put in the code, but 
 that does not feel right to me.

 I already have a 'UsersController.php' file that contains the class 
 definition:

 class UsersController extends AppController 

 So that makes me thing that 'AppController' is a pre-defined class in 
 cake. Am I meant to be overloading this class?

 Something seems wrong.

 Any ideas please?



 On Wednesday, 19 December 2012 12:24:34 UTC, OxfordRob wrote:

 Folks,

 I successfully worked through the blog tutorial and everything worked 
 fine.

 I then moved onto the Authentication example / tutorial here...but can't 
 make it work..

 http://book.cakephp.org/2.0/**en/tutorials-and-examples/**
 blog-auth-example/auth.htmlhttp://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

 I get a gibberish error message when I access the page... (Copied below) 
 which does not give me any real clues about what I have done wrong.

 Does anybody know where to download the full source code for this 
 example? Or, if you have made this work, would you post it please?

 Any clues about how to read the error message below, and where I might 
 start looking would be very gratefully received!

 I have attached zip of my /app directory. 

 Thanks for any help!


 *Error message:* on accessing URL: http://localhost/cakephp-2.3.**
 0-RC1/users/add http://localhost/cakephp-2.3.0-RC1/users/add 

 Fatal error: Class declarations may not be nested in 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Error/**ExceptionRenderer.php on 
 line 55 Call Stack: 0.0014 354512 1. {main}() /var/www/cakephp-2.3.0-RC1/
 **app/webroot/index.php:0 0.1175 2937464 2. Dispatcher-dispatch() 
 /var/www/cakephp-2.3.0-RC1/**app/webroot/index.php:97 0.1438 3490652 3. 
 Dispatcher-_getController() /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Routing/Dispatcher.**php:152 0.1438 3490652 4. 
 Dispatcher-_loadController() /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Routing/Dispatcher.**php:228 0.1440 3491896 5. class_exists() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Routing/Dispatcher.**php:259 
 0.1440 3492168 6. App::load() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0 
 0.1458 3537372 7. App::shutdown() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0 
 0.1468 3537344 8. App::_checkFatalError() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:899 
 0.1470 3538456 9. call_user_func() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:926 
 0.1470 3538500 10. ErrorHandler::handleError() /var/www/cakephp-2.3.0-RC1/
 **lib/Cake/Core/App.php:0 0.1471 3538992 11. 
 ErrorHandler::**handleFatalError() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Error/ErrorHandler.**php:161 
 0.1481 3548532 12. call_user_func() /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Error/ErrorHandler.**php:211 0.1481 3548560 13. 
 ErrorHandler::handleException(**) /var/www/cakephp-2.3.0-RC1/**
 lib/Cake/Error/ErrorHandler.**php:0 0.1488 3550236 14. App::load() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0 

  -- 
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 cake-php+u...@googlegroups.com javascript:.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.
  
  




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find 

Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread Jonathan Sundquist
The message is still pretty clear. That's a standard php debug message. No
way of changing the information present.

As far as what that is telling you, its saying it still cannot find your
AppController.
On Dec 19, 2012 12:55 PM, OxfordRob pestle...@gmail.com wrote:

 @jsundquist - that was helpful, thank you. I had deleted the file - and
 the one I had created was missing:

 App::uses('Controller', 'Controller');

 I am still seeing the long string of error messages however.

 Fatal error: Class 'AppController' not found in
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Controller/CakeErrorController.php on
 line 31 Call Stack: 0.0009 354512 1. {main}()
 /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0 0.0896 2939480 2. 
 etc

 I am finding it very hard to make any sense of these error messages. They
 are no very 'diagnostic'. Is there any way of getting more useful
 information about where the error might be? I can't see any of my file
 names in there, and I can't even see where one error item starts and
 another ends







 On Wednesday, 19 December 2012 14:27:34 UTC, jsundquist wrote:

 The AppController.php is part of the default download of CakePHP in all
 versions. I just downloaded a fresh copy of CakePHP 2.3.0-RC1 and within
 the app/Controllers directory there is in fact an AppController.php file.
  You shouldn't need to re-create the file unless you deleted it.


 On Wed, Dec 19, 2012 at 8:23 AM, OxfordRob pest...@gmail.com wrote:

 As a follow upI am suspicious in this area

 The tutorial says To add this component to your application *open*your
 app/Controller/AppController.**php file and *add* the following lines:

 But this is the first mention of an 'AppController.php' file.

 So I just created an 'AppController.php' file and put in the code, but
 that does not feel right to me.

 I already have a 'UsersController.php' file that contains the class
 definition:

 class UsersController extends AppController

 So that makes me thing that 'AppController' is a pre-defined class in
 cake. Am I meant to be overloading this class?

 Something seems wrong.

 Any ideas please?



 On Wednesday, 19 December 2012 12:24:34 UTC, OxfordRob wrote:

 Folks,

 I successfully worked through the blog tutorial and everything worked
 fine.

 I then moved onto the Authentication example / tutorial here...but
 can't make it work..

 http://book.cakephp.org/2.0/**en**/tutorials-and-examples/**blog-**
 auth-example/auth.htmlhttp://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

 I get a gibberish error message when I access the page... (Copied
 below) which does not give me any real clues about what I have done wrong.

 Does anybody know where to download the full source code for this
 example? Or, if you have made this work, would you post it please?

 Any clues about how to read the error message below, and where I might
 start looking would be very gratefully received!

 I have attached zip of my /app directory.

 Thanks for any help!


 *Error message:* on accessing URL: http://localhost/cakephp-2.3.**0**
 -RC1/users/add http://localhost/cakephp-2.3.0-RC1/users/add

 Fatal error: Class declarations may not be nested in
 /var/www/cakephp-2.3.0-RC1/**lib**/Cake/Error/**ExceptionRenderer.**php
 on line 55 Call Stack: 0.0014 354512 1. {main}() 
 /var/www/cakephp-2.3.0-RC1/
 **app**/webroot/index.php:0 0.1175 2937464 2. Dispatcher-dispatch()
 /var/www/cakephp-2.3.0-RC1/**app**/webroot/index.php:97 0.1438 3490652
 3. Dispatcher-_getController() /var/www/cakephp-2.3.0-RC1/**lib**
 /Cake/Routing/Dispatcher.**php:**152 0.1438 3490652 4.
 Dispatcher-_loadController() /var/www/cakephp-2.3.0-RC1/**lib**
 /Cake/Routing/Dispatcher.**php:**228 0.1440 3491896 5. class_exists()
 /var/www/cakephp-2.3.0-RC1/**lib**/Cake/Routing/Dispatcher.**php:**259
 0.1440 3492168 6. App::load() 
 /var/www/cakephp-2.3.0-RC1/**lib**/Cake/Core/App.php:0
 0.1458 3537372 7. App::shutdown() 
 /var/www/cakephp-2.3.0-RC1/**lib**/Cake/Core/App.php:0
 0.1468 3537344 8. App::_checkFatalError() /var/www/cakephp-2.3.0-RC1/**
 lib**/Cake/Core/App.php:899 0.1470 3538456 9. call_user_func()
 /var/www/cakephp-2.3.0-RC1/**lib**/Cake/Core/App.php:926 0.1470
 3538500 10. ErrorHandler::handleError() /var/www/cakephp-2.3.0-RC1/**
 lib**/Cake/Core/App.php:0 0.1471 3538992 11. ErrorHandler::**
 handleFatalError**() /var/www/cakephp-2.3.0-RC1/**lib**
 /Cake/Error/ErrorHandler.**php:**161 0.1481 3548532 12.
 call_user_func() /var/www/cakephp-2.3.0-RC1/**lib**
 /Cake/Error/ErrorHandler.**php:**211 0.1481 3548560 13.
 ErrorHandler::handleException() /var/www/cakephp-2.3.0-RC1/**lib**
 /Cake/Error/ErrorHandler.**php:0 0.1488 3550236 14. App::load()
 /var/www/cakephp-2.3.0-RC1/**lib**/Cake/Core/App.php:0

  --
 Like Us on FaceBook 
 https://www.facebook.com/**CakePHPhttps://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google
 Groups CakePHP 

Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread Jonathan Sundquist
What does your current AppController look like?

A stripped down version should look like this

?php
App::uses('Controller','Controller');
class AppController extends Controller{
}



On Wed, Dec 19, 2012 at 1:38 PM, OxfordRob pestle...@gmail.com wrote:

 @jsundquist - Thank you - that makes sense, I can see that information at
 the part of the error string.

 If I look at my cake folder structure, the file seems to be there (see
 attached picture). I am sure that file contains the class definition:

 class AppController extends Controller { ... etc.

 But it does not seem to be found by cake.

 I would think that somehow I have set it up so that cake is looking in the
 wrong place for this file. But that seems odd as the early part of the blog
 tutorial was working before I stated adding the authentication code.




 On Wednesday, 19 December 2012 19:04:10 UTC, jsundquist wrote:

 The message is still pretty clear. That's a standard php debug message.
 No way of changing the information present.

 As far as what that is telling you, its saying it still cannot find your
 AppController.
 On Dec 19, 2012 12:55 PM, OxfordRob pest...@gmail.com wrote:

 @jsundquist - that was helpful, thank you. I had deleted the file - and
 the one I had created was missing:

 App::uses('Controller', 'Controller');

 I am still seeing the long string of error messages however.

 Fatal error: Class 'AppController' not found in
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Controller/**CakeErrorController.php
 on line 31 Call Stack: 0.0009 354512 1. {main}() /var/www/cakephp-2.3.0-RC1/
 **app/webroot/index.php:0 0.0896 2939480 2.  etc

 I am finding it very hard to make any sense of these error messages.
 They are no very 'diagnostic'. Is there any way of getting more useful
 information about where the error might be? I can't see any of my file
 names in there, and I can't even see where one error item starts and
 another ends







 On Wednesday, 19 December 2012 14:27:34 UTC, jsundquist wrote:

 The AppController.php is part of the default download of CakePHP in all
 versions. I just downloaded a fresh copy of CakePHP 2.3.0-RC1 and within
 the app/Controllers directory there is in fact an AppController.php file.
  You shouldn't need to re-create the file unless you deleted it.


 On Wed, Dec 19, 2012 at 8:23 AM, OxfordRob pest...@gmail.com wrote:

 As a follow upI am suspicious in this area

 The tutorial says To add this component to your application *open*your
 app/Controller/AppController.**p**hp file and *add* the following
 lines:

 But this is the first mention of an 'AppController.php' file.

 So I just created an 'AppController.php' file and put in the code, but
 that does not feel right to me.

 I already have a 'UsersController.php' file that contains the class
 definition:

 class UsersController extends AppController

 So that makes me thing that 'AppController' is a pre-defined class in
 cake. Am I meant to be overloading this class?

 Something seems wrong.

 Any ideas please?



 On Wednesday, 19 December 2012 12:24:34 UTC, OxfordRob wrote:

 Folks,

 I successfully worked through the blog tutorial and everything worked
 fine.

 I then moved onto the Authentication example / tutorial here...but
 can't make it work..

 http://book.cakephp.org/2.0/**en/tutorials-and-examples/**blog-**
 a**uth-example/auth.htmlhttp://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html

 I get a gibberish error message when I access the page... (Copied
 below) which does not give me any real clues about what I have done 
 wrong.

 Does anybody know where to download the full source code for this
 example? Or, if you have made this work, would you post it please?

 Any clues about how to read the error message below, and where I
 might start looking would be very gratefully received!

 I have attached zip of my /app directory.

 Thanks for any help!


 *Error message:* on accessing URL: http://localhost/cakephp-2.3.**0**
 **-RC1/users/add http://localhost/cakephp-2.3.0-RC1/users/add

 Fatal error: Class declarations may not be nested in
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Error/**ExceptionRenderer.*
 ***php on line 55 Call Stack: 0.0014 354512 1. {main}()
 /var/www/cakephp-2.3.0-RC1/**app/webroot/index.php:0 0.1175
 2937464 2. Dispatcher-dispatch() /var/www/cakephp-2.3.0-RC1/**app***
 */webroot/index.php:97 0.1438 3490652 3.
 Dispatcher-_getController() /var/www/cakephp-2.3.0-RC1/**lib
 /Cake/Routing/Dispatcher.**php:**1**52 0.1438 3490652 4.
 Dispatcher-_loadController() /var/www/cakephp-2.3.0-RC1/**lib
 /Cake/Routing/Dispatcher.**php:**2**28 0.1440 3491896 5.
 class_exists() /var/www/cakephp-2.3.0-RC1/**lib
 /Cake/Routing/Dispatcher.**php:**2**59 0.1440 3492168 6. App::load()
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0 0.1458
 3537372 7. App::shutdown() 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Core/App.php:0
 0.1468 3537344 8. App::_checkFatalError() 

Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread OxfordRob
Here it is:

?php
/**
 * Application level Controller
 *
 * This file is application-wide controller file. You can put all
 * application-wide controller-related methods here.
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. 
(http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. 
(http://cakefoundation.org)
 * @link  http://cakephp.org CakePHP(tm) Project
 * @package   app.Controller
 * @since CakePHP(tm) v 0.2.9
 * @license   MIT License 
(http://www.opensource.org/licenses/mit-license.php)
 */


/**
 * Application Controller
 *
 * Add your application-wide methods in the class below, your controllers
 * will inherit them.
 *
 * @package   app.Controller
 * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
 */

App::uses('Controller', 'Controller');

class AppController extends Controller {

public $components = array(
'Session',
'Auth' = array(
'loginRedirect' = array('controller' = 'posts', 'action' = 
'index'),
'logoutRedirect' = array('controller' = 'pages', 'action' = 
'display', 'home')
'authorize' = array('Controller') // Added this line
)
);

public function beforeFilter() {
$this-Auth-allow('index', 'view');
}

public function isAuthorized($user) {
// Admin can access every action
if (isset($user['role'])  $user['role'] === 'admin') {
return true;
}

// Default deny
return false;
}
}

On Wednesday, 19 December 2012 19:46:02 UTC, jsundquist wrote:

 What does your current AppController look like?

 A stripped down version should look like this

 ?php
 App::uses('Controller','Controller');
 class AppController extends Controller{
 }



 On Wed, Dec 19, 2012 at 1:38 PM, OxfordRob pest...@gmail.comjavascript:
  wrote:

 @jsundquist - Thank you - that makes sense, I can see that information at 
 the part of the error string.

 If I look at my cake folder structure, the file seems to be there (see 
 attached picture). I am sure that file contains the class definition:

 class AppController extends Controller { ... etc.

 But it does not seem to be found by cake.

 I would think that somehow I have set it up so that cake is looking in 
 the wrong place for this file. But that seems odd as the early part of the 
 blog tutorial was working before I stated adding the authentication code.




 On Wednesday, 19 December 2012 19:04:10 UTC, jsundquist wrote:

 The message is still pretty clear. That's a standard php debug message. 
 No way of changing the information present. 

 As far as what that is telling you, its saying it still cannot find your 
 AppController.
 On Dec 19, 2012 12:55 PM, OxfordRob pest...@gmail.com wrote:

 @jsundquist - that was helpful, thank you. I had deleted the file - and 
 the one I had created was missing:

 App::uses('Controller', 'Controller');

 I am still seeing the long string of error messages however.

 Fatal error: Class 'AppController' not found in 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Controller/**CakeErrorController.php 
 on line 31 Call Stack: 0.0009 354512 1. {main}() 
 /var/www/cakephp-2.3.0-RC1/
 **app/webroot/index.php:0 0.0896 2939480 2.  etc

 I am finding it very hard to make any sense of these error messages. 
 They are no very 'diagnostic'. Is there any way of getting more useful 
 information about where the error might be? I can't see any of my file 
 names in there, and I can't even see where one error item starts and 
 another ends







 On Wednesday, 19 December 2012 14:27:34 UTC, jsundquist wrote:

 The AppController.php is part of the default download of CakePHP in 
 all versions. I just downloaded a fresh copy of CakePHP 2.3.0-RC1 and 
 within the app/Controllers directory there is in fact an 
 AppController.php 
 file.  You shouldn't need to re-create the file unless you deleted it.


 On Wed, Dec 19, 2012 at 8:23 AM, OxfordRob pest...@gmail.com wrote:

 As a follow upI am suspicious in this area

 The tutorial says To add this component to your application *open*your 
 app/Controller/AppController.**p**hp file and *add* the following 
 lines:

 But this is the first mention of an 'AppController.php' file.

 So I just created an 'AppController.php' file and put in the code, 
 but that does not feel right to me.

 I already have a 'UsersController.php' file that contains the class 
 definition:

 class UsersController extends AppController 

 So that makes me thing that 'AppController' is a pre-defined class in 
 cake. Am I meant to be overloading this class?

 Something seems wrong.

 Any ideas please?



 On Wednesday, 19 December 2012 12:24:34 UTC, OxfordRob wrote:

 Folks,

 I successfully worked through 

Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread OxfordRob
I have a clue... The line:

App::uses('AuthComponent', 'Controller/Component');

looks as if it is referring to a library component within the folder 
'Controller/Component'...

But I only have one file in that folder called 'empty' 

Does that suggest something is missing? Do components have to be downloaded 
and installed separately?


On Wednesday, 19 December 2012 19:57:07 UTC, OxfordRob wrote:

 Here it is:

 ?php
 /**
  * Application level Controller
  *
  * This file is application-wide controller file. You can put all
  * application-wide controller-related methods here.
  *
  * PHP 5
  *
  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  * Copyright 2005-2012, Cake Software Foundation, Inc. (
 http://cakefoundation.org)
  *
  * Licensed under The MIT License
  * Redistributions of files must retain the above copyright notice.
  *
  * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (
 http://cakefoundation.org)
  * @link  http://cakephp.org CakePHP(tm) Project
  * @package   app.Controller
  * @since CakePHP(tm) v 0.2.9
  * @license   MIT License (
 http://www.opensource.org/licenses/mit-license.php)
  */


 /**
  * Application Controller
  *
  * Add your application-wide methods in the class below, your controllers
  * will inherit them.
  *
  * @package   app.Controller
  * @link 
 http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
  */

 App::uses('Controller', 'Controller');

 class AppController extends Controller {

 public $components = array(
 'Session',
 'Auth' = array(
 'loginRedirect' = array('controller' = 'posts', 'action' = 
 'index'),
 'logoutRedirect' = array('controller' = 'pages', 'action' = 
 'display', 'home')
 'authorize' = array('Controller') // Added this line
 )
 );

 public function beforeFilter() {
 $this-Auth-allow('index', 'view');
 }

 public function isAuthorized($user) {
 // Admin can access every action
 if (isset($user['role'])  $user['role'] === 'admin') {
 return true;
 }

 // Default deny
 return false;
 }
 }

 On Wednesday, 19 December 2012 19:46:02 UTC, jsundquist wrote:

 What does your current AppController look like?

 A stripped down version should look like this

 ?php
 App::uses('Controller','Controller');
 class AppController extends Controller{
 }



 On Wed, Dec 19, 2012 at 1:38 PM, OxfordRob pest...@gmail.com wrote:

 @jsundquist - Thank you - that makes sense, I can see that information 
 at the part of the error string.

 If I look at my cake folder structure, the file seems to be there (see 
 attached picture). I am sure that file contains the class definition:

 class AppController extends Controller { ... etc.

 But it does not seem to be found by cake.

 I would think that somehow I have set it up so that cake is looking in 
 the wrong place for this file. But that seems odd as the early part of the 
 blog tutorial was working before I stated adding the authentication code.




 On Wednesday, 19 December 2012 19:04:10 UTC, jsundquist wrote:

 The message is still pretty clear. That's a standard php debug message. 
 No way of changing the information present. 

 As far as what that is telling you, its saying it still cannot find 
 your AppController.
 On Dec 19, 2012 12:55 PM, OxfordRob pest...@gmail.com wrote:

 @jsundquist - that was helpful, thank you. I had deleted the file - 
 and the one I had created was missing:

 App::uses('Controller', 'Controller');

 I am still seeing the long string of error messages however.

 Fatal error: Class 'AppController' not found in 
 /var/www/cakephp-2.3.0-RC1/**lib/Cake/Controller/**CakeErrorController.php
  
 on line 31 Call Stack: 0.0009 354512 1. {main}() 
 /var/www/cakephp-2.3.0-RC1/
 **app/webroot/index.php:0 0.0896 2939480 2.  etc

 I am finding it very hard to make any sense of these error messages. 
 They are no very 'diagnostic'. Is there any way of getting more useful 
 information about where the error might be? I can't see any of my file 
 names in there, and I can't even see where one error item starts and 
 another ends







 On Wednesday, 19 December 2012 14:27:34 UTC, jsundquist wrote:

 The AppController.php is part of the default download of CakePHP in 
 all versions. I just downloaded a fresh copy of CakePHP 2.3.0-RC1 and 
 within the app/Controllers directory there is in fact an 
 AppController.php 
 file.  You shouldn't need to re-create the file unless you deleted it.


 On Wed, Dec 19, 2012 at 8:23 AM, OxfordRob pest...@gmail.com wrote:

 As a follow upI am suspicious in this area

 The tutorial says To add this component to your application *open*your 
 app/Controller/AppController.**p**hp file and *add* the following 
 lines:

 But this is the first mention of an 'AppController.php' file.

 So I just created an 'AppController.php' file and put in 

Re: Help! - Simple authentication tutorial? Is it broken?

2012-12-19 Thread Jonathan Sundquist
oxfordRob,

I've been trying to figure out what might be your issue with little to no
success.  One thing I might suggest you try is to move your entire app
directory up to the root level instead of inside a subfolder if possible.
 You may have a configuration issue causing cake core to not find the
appcontroller.  I do know you said that the blog tutorial worked for you
but its just a thought.


On Wed, Dec 19, 2012 at 2:57 PM, OxfordRob pestle...@gmail.com wrote:

 Help! I have been trying to fix the 'Simple' Authentication tutorial for
 10 hours today :-(

 The error messages from my Apache error log are listed below.

 I am sure I have an AppController.php file within the app/Controller
 older. Also, that this contains a good version of the AppController class
 from the tutorial.

 But still I get all of the errors below.

 Has anybody else successfully completed this tutorial and could give some
 pointers?




 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Fatal error:
 Class 'AppController' not found in
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Controller/CakeErrorController.php on
 line 31
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP Stack trace:
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   1. {main}()
 /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   2.
 Dispatcher-dispatch() /var/www/cakephp-2.3.0-RC1/app/webroot/index.php:97
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   3.
 Dispatcher-_getController()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:152
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   4.
 Dispatcher-_loadController()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:228
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   5.
 class_exists()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Routing/Dispatcher.php:259
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   6. App::load()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   7. include()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:540
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   8. App::load()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP   9.
 App::shutdown() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  10.
 App::_checkFatalError() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:899
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  11.
 call_user_func() /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:926
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  12.
 ErrorHandler::handleError()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  13.
 ErrorHandler::handleFatalError()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:161
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  14.
 call_user_func()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:211
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  15.
 ErrorHandler::handleException()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  16.
 ExceptionRenderer-__construct()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ErrorHandler.php:125
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  17.
 ExceptionRenderer-_getController()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Error/ExceptionRenderer.php:94
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  18. App::load()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:0
 [Wed Dec 19 20:49:25 2012] [error] [client 127.0.0.1] PHP  19. include()
 /var/www/cakephp-2.3.0-RC1/lib/Cake/Core/App.php:560

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.




-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help / Source code for Simple Authentication tutorial

2012-12-19 Thread lowpass
On Wed, Dec 19, 2012 at 3:13 PM, OxfordRob pestle...@gmail.com wrote:
 I have a clue... The line:

 App::uses('AuthComponent', 'Controller/Component');

The error msg you posted has nothing to do with AuthComponent.

 looks as if it is referring to a library component within the folder
 'Controller/Component'...

 But I only have one file in that folder called 'empty'

That's for your application Components. The 'empty' file is there
because the Cake devs use Git, which, among other sucky things, can't
deal with empty folders.

 Does that suggest something is missing? Do components have to be downloaded
 and installed separately?

The components that come with Cake, including Auth, are under the lib
directory. Store any other components you wish to use under
app/Controller/Components.

As for you AppController iussues, try setting these in app/Config/core.php:

Configure::write('debug', 2);
Configure::write('Cache.disable', true);

Then delete all the files in the app/tmp/cache/persistent directory.

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help with Deployment: CakePHP App (AppServer) behind Firewall with a Seperate WebServer

2012-10-26 Thread lowpass
I don't think there's anything special that's specific to Cake. It
shouldn't be any different than if you were using anything else.

On Thu, Oct 25, 2012 at 8:10 PM, Blues Clues bluesclu...@gmail.com wrote:
 Hi
 I am lost here. We need to deploy our first CakePHP application using 3-tier
 architecture as follows. My CakePHP already works on my localhost however,
 we need to place CakePHP app inside firewall and have webserver outside
 firewall that actually processes user requests.

 How can we deploy something like this?. We need to protect all the code
 written (Controllers, Models, Views) in CakePHP by keeping it behind
 firewall.

 Required Architecture:

 1. Web Server -  Just receives requests/sends responses back to the user.
 This is outside firewall.

 2. App Server - This is where we have CakePHP code. Receives Requests 'Only'
 from webserver and processes requests using CakePHP M-V-C and responds to
 WebServer.

 3. Database Server - This is where we have Database engine running. This
 server receives requests from AppServer. CakePHP AppServer simply connects
 to this Database Server.

 As of now, my localhost has Web/AppServer running. I don't like this
 architecture as my localhost has CakePHP code developed by us.

 Any ideas...I thought this is no brainer but now, I am perplexed as how I
 can split WebServer and AppServer(CakePHP).

 Thanks
 Blues Clues

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: Help, strange issue with controller

2012-10-09 Thread lowpass
Do you have a FinanceiroCategorium model? If not, it looks like a
problem with Cake's pluralisation rules, though It's not quite clear
to me why it would do that. Basically, models are named in the
singular, and controllers use the plural version of the model name. In
English, it would be (model) FinancialCategory and
FinancialCategoriesController. So Cake would be expecting a controller
named FinanceiroCategoriumController. But why it would use the ium
for the model is confusing.

Anyway, try adding this line (and leaving the controller name as is):

class FinanceiroCategoriaController extends AppController {
 public $uses = array('FinanceiroCategoria');

On Tue, Oct 9, 2012 at 2:44 PM, Newton Pasqualini
newtonpasqual...@gmail.com wrote:
 Hi folks,

 I need help here with a strange problem.

 I am a newbie in CakePHP sorry if this is some stupid mistake.

 So, my envirorment MySQL 5.1, PHP 5.3, CakePHP 2.2

 Model/FinanceiroCategoria.php
 ?php
 class FinanceiroCategoria extends AppModel {
 public $useTable = 'financeiro_categoria';
 public $name = 'FinanceiroCategoria';
 public $validate = array(
 'nome' = array(
 'required' = array(
 'rule' = array('notEmpty'),
 'message' = 'Digite um nome para a Categoria.',
 )
 ),
 );
 public $paginate = array(
 'fields' = array('FinanceiroCategoria.id',
 'FinanceiroCategoria.nome'),
 'paramType' = 'querystring',
 'limit' = 25,
 'order' = array(
 'FinanceiroCategoria.id' = 'desc'
 )
 );
 }

 Controller/FinanceiroCategoriaController.php
 ?php
 class FinanceiroCategoriaController extends AppController {
 public function index() {
 $this-set('categorias', $this-paginate());
 }

 public function view($id = null) {
 $this-FinanceiroCategoria-id = $id;
 if (!$this-FinanceiroCategoria-exists()) {
 throw new NotFoundException(__('Categoria Inválida'));
 }
 $this-set('categoria', $this-FinanceiroCategoria-read(null,
 $id));
 }

 public function add() {
 if ($this-request-is('post')) {
 $this-FinanceiroCategoria-create();
 if ($this-FinanceiroCategoria-save($this-request-data)) {
 $this-Session-setFlash(__('Categoria Salva!'));
 $this-redirect(array('action' = 'index'));
 } else {
 $this-Session-setFlash(__('Não foi possível processar sua
 solicitação, tente mais tarde.'));
 }
 }
 }

 public function edit($id = null) {
 $this-FinanceiroCategoria-id = $id;
 if (!$this-FinanceiroCategoria-exists()) {
 throw new NotFoundException(__('Categoria inválida!'));
 }
 if ($this-request-is('post') || $this-request-is('put')) {
 if ($this-FinanceiroCategoria-save($this-request-data)) {
 $this-Session-setFlash(__('Categoria Salvo!'));
 $this-redirect(array('action' = 'index'));
 } else {
 $this-Session-setFlash(__('Verifique os erros abaixo e
 tente novamente.'));
 }
 } else {
 $this-request-data = $this-FinanceiroCategoria-read(null,
 $id);
 unset($this-request-data['FinanceiroCategoria']['senha']);
 }
 }

 public function delete($id = null) {
 if ($this-request-is('post')) {
 throw new MethodNotAllowedException();
 }
 $this-FinanceiroCategoria-id = $id;
 if (!$this-FinanceiroCategoria-exists()) {
 throw new NotFoundException(__('Categoria inválida!'));
 }
 if ($this-FinanceiroCategoria-delete()) {
 $this-Session-setFlash(__('Categoria Removida!'));
 $this-redirect(array('action' = 'index'));
 }
 $this-Session-setFlash(__('A categoria não foi removida!'));
 $this-redirect(array('action' = 'index'));
 }
 }

 So, I think the controller is not properly bridged to the respective model,
 why? Because my Validation in model is not visible in the form, and in the
 index action the view load in $categorias the Pagination for the model
 FinanceiroCategorium and not FinanceiroCategoria.

 The question, is there a way to tell for the controller use
 FinanceiroCategoria model?

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 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.
 Visit this group at http://groups.google.com/group/cake-php?hl=en.



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google 

Re: Help with getting data

2012-08-11 Thread Daren W
Thanks for the reply, can you give me a example of how I can do this please.


On Wednesday, August 8, 2012 2:22:18 PM UTC-4, Daren W wrote:

 I am in the learning process and would like to know how to write the two 
 below statements in cake format, could someone please advise.

 SELECT SUM(credit) - SUM(debit) AS total FROM `bids` AS `Bid` WHERE 
 `Bid`.`user_id` = 3 LIMIT 1


 SELECT SUM(bids) AS total FROM `bidbutlers` AS `Bidbutler` LEFT JOIN 
 `auctions` AS `Auction` ON (`Bidbutler`.`auction_id` = `Auction`.`id`) 
 WHERE `Auction`.`closed` = 0 AND `Bidbutler`.`user_id` = 3

 Thanks,
 Daren


-- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Help with getting data

2012-08-11 Thread euromark
you do realize that links are to be clicked on?
there are plenty of well written and beautiful colored examples on the link 
I gave you
cheese


Am Samstag, 11. August 2012 11:19:30 UTC+2 schrieb Daren W:

 Thanks for the reply, can you give me a example of how I can do this 
 please.


 On Wednesday, August 8, 2012 2:22:18 PM UTC-4, Daren W wrote:

 I am in the learning process and would like to know how to write the two 
 below statements in cake format, could someone please advise.

 SELECT SUM(credit) - SUM(debit) AS total FROM `bids` AS `Bid` WHERE 
 `Bid`.`user_id` = 3 LIMIT 1


 SELECT SUM(bids) AS total FROM `bidbutlers` AS `Bidbutler` LEFT JOIN 
 `auctions` AS `Auction` ON (`Bidbutler`.`auction_id` = `Auction`.`id`) 
 WHERE `Auction`.`closed` = 0 AND `Bidbutler`.`user_id` = 3

 Thanks,
 Daren



-- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Help with getting data

2012-08-08 Thread euromark
virtual fields are your friend:
http://book.cakephp.org/2.0/en/models/virtual-fields.html 

Am Mittwoch, 8. August 2012 20:22:18 UTC+2 schrieb Daren W:

 I am in the learning process and would like to know how to write the two 
 below statements in cake format, could someone please advise.

 SELECT SUM(credit) - SUM(debit) AS total FROM `bids` AS `Bid` WHERE 
 `Bid`.`user_id` = 3 LIMIT 1


 SELECT SUM(bids) AS total FROM `bidbutlers` AS `Bidbutler` LEFT JOIN 
 `auctions` AS `Auction` ON (`Bidbutler`.`auction_id` = `Auction`.`id`) 
 WHERE `Auction`.`closed` = 0 AND `Bidbutler`.`user_id` = 3

 Thanks,
 Daren


-- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




Re: Help getting started with CakePHP 2.1.3

2012-06-16 Thread DiabloGeto
Hi

Installation procedure could be diff for diff platforms, however , first u 
can try the default setting as mostly it works by itself.
Just access the path of your cake folder from browser through local host If 
these is a page with some red of green stripes , which instruction to 
set some salt and security , or database setting , your in the right 
direction. 

http://www.phpeveryday.com/articles/CakePHP-Installation-Quick-Start-P624.html  
  , or follow this link. Its for old version of cake , so dont be concerned 
bout the dir structure and name conventions. rather follow conventions for 
2.X only from the book.

On Friday, June 15, 2012 5:12:22 AM UTC+5:30, BasementJack wrote:

 I'm trying to follow the tutorial at 
 http://book.cakephp.org/2.0/en/installation.html
 I've downloaded CakePHP-2.1.3.tgz from http://pear.cakephp.org/
 My folder structure doesn't match at all.

 I've got a 
 /bin and 
 /cake folder - 
 the cake folder appears to have all the good stuff (folders for cache, 
 config, console, controller, core, error, etc)

 The install guide says my folder should look like this:
 /cake_2_0
   /app
   /lib
   /vendors
   /plugins
   .htaccess
   index.php
   /readme


 What needs to happen next?


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help on URLs

2012-06-14 Thread thanat
you use the cake router /app/config/routes.php


if you want to redirect to specific action in controller
Router::connect('/about_me', array('controller' = 'pages', 'action'
= 'about_me'));

or if you want to handle all in one action
Router::connect('/:ident', array('controller' = 'pages', 'action' =
'show_page'), array('pass' = array('ident'));


read more:
cakephp 1.3: http://book.cakephp.org/1.3/en/view/945/Routes-Configuration
cakephp 2.x: http://book.cakephp.org/2.0/en/development/routing.html



On Jun 14, 3:15 am, pxm c...@pixelmai.com wrote:
 Hi,

 A client recently requested me to migrate his website from using Wordpress
 to CakePHP. But I have to make sure that the URLs is still the same as his
 Wordpress site. So I am now having problems since the urls are like this:

 Wordpress:
 domain.com/*about-me*

 CakePHP:
 domain.com/*about_me*

 Somehow I need help even just to redirect it to the _ urls.

 I tried with .htaccess, but my efforts didn't seem to work.

 Thanks!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help getting started with CakePHP 2.1.3

2012-06-14 Thread lowpass
I vaguely remember something about a Pear channel but haven't used it.
I don't know why the structure would be different. Go here for the
goods:

https://github.com/cakephp/cakephp/archives/2.1

You'll get an archive -- and subsequent folder -- with Git's supremely
annoying naming convention but the current stable is indeed 2.1.3.

On Thu, Jun 14, 2012 at 7:42 PM, BasementJack basementja...@gmail.com wrote:
 I'm trying to follow the tutorial
 at http://book.cakephp.org/2.0/en/installation.html
 I've downloaded CakePHP-2.1.3.tgz from http://pear.cakephp.org/
 My folder structure doesn't match at all.

 I've got a
 /bin and
 /cake folder -
 the cake folder appears to have all the good stuff (folders for cache,
 config, console, controller, core, error, etc)

 The install guide says my folder should look like this:
 /cake_2_0
   /app
   /lib
   /vendors
   /plugins
   .htaccess
   index.php
   /readme


 What needs to happen next?

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help Regarding ACL

2012-03-19 Thread jeremyharris
That error is because it's looking for Group.1, which is missing from your 
posted ARO tree.

On Sunday, March 18, 2012 4:41:12 AM UTC-7, mohit wrote:

 Hi Experts,

 Need some help,
 I am in process of learning of Cake PHP. I was creating an app which needs 
 ACL feature.
 While reading various docs this is what I have learn. Please correct me if 
 I am wrong

 ACL has 2 components, ACO  and ARO

 Object(ARO)  Requests - Object(ACO)

 Now using the bake tool , i was able to add various tables and aco and aro 
 tables.
 I have added  2 groups to ARO

 Aro tree:
 ---
   [1] Group.2
   [2] Group.3
 ---

 Now i am not able to figure out how to add objects to ACO?

 another thing is I am getting the following error, is this due to the fact 
 i have not added any object to ACO

 *Warning* (512): AclNode::node() - Couldn't find Aro node identified by Array
 (
 [Aro0.model] = Group
 [Aro0.foreign_key] = 1
 )
  [*CORE\Cake\Model\AclNode.php*, line *176*]

 *Warning* (512): DbAcl::check() - Failed ARO/ACO node lookup in permissions 
 check.  Node references:
 Aro: Array
 (
 [User] = Array
 (
 [id] = 1
 [username] = mohit
 [group_id] = 1
 [created] = 2012-03-18 11:02:07
 [modified] = 2012-03-18 11:02:07
 )

 )

 Aco: controllers/Pages/display 
 [*CORE\Cake\Controller\Component\AclComponent.php*, line *303*]

 Thanks for help.

 Regards,
 Mohit









 -- 
 Best Regards,
 Mohit Kumar




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help with testing different things

2012-03-11 Thread andrewperk
In case someone finds this post later, I found an easier way to test html 
tags rather than using assertTags from the view by using assertRegExp or 
assertPattern:

$result = $this-testAction('url', array('return'='view'));
$this-assertRegExp('/input name=data\[Model\]\[field\]/', $result);

Just remember the pattern passed in as the first param if it uses any 
brackets like the data[Model][field] does you need to escape them first 
otherwise it picks it up as a delimiter. 

I still haven't found a way to test what the setFlash messages are, only 
that the method has been called.

$this-view and $this-contents are always null as well when using redirect.

On Saturday, March 10, 2012 7:56:37 PM UTC-8, andrewperk wrote:

 Hello, 

 I have a couple of questions about testing certain things: 

 Flash Messages: I know how to test that the setFlash method has ran 
 using mocks, but is there a way to verify that it contains the correct 
 message? 

 assertTags() Views: I use testAction to return the view then use 
 assertTags to test that the view contains certain HTML. But, Is there 
 a way to just test that the view contains only a part of the html 
 rather than having to test the whole view? 

 Currently when I use assertTags I have to be exact, all the way down 
 to the attribute of the element and any nested elements. I would just 
 like to test that a view contains just a few elements on the page, not 
 every single one with all attributes as this takes forever to build 
 out this array on a complex view. 

 For instance, I would just like to test that the view contains a 
 certain input with an id of post_id, but I can't do this if any html 
 comes before it, it wants me to match the entire thing. 

 $result = $this-testAction('/url/page_with_form', 
 array('return'='view')); 
 $expected = array( 
 array('input'=array('id'='post_id')), 
 ); 

 This will not work because I didn't include the array structure for 
 the form thats wrapped around it, if I add the entire form and all the 
 divs that the form helper generates it works just fine. 

 Thanks, 

 Andrew 






-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help with testing different things

2012-03-11 Thread andrewperk
I figured out how to test for an exact flash message. For instance a mocked 
up Posts controllers add action, testing a flash message of 'Post 
successfully saved':

$Posts-Session-expects($this-once())-method('setFlash')-with($this-equalTo('Post
 
successfully saved'));

$Posts of course is your mock.

This may help someone some day. 

On Saturday, March 10, 2012 7:56:37 PM UTC-8, andrewperk wrote:

 Hello, 

 I have a couple of questions about testing certain things: 

 Flash Messages: I know how to test that the setFlash method has ran 
 using mocks, but is there a way to verify that it contains the correct 
 message? 

 assertTags() Views: I use testAction to return the view then use 
 assertTags to test that the view contains certain HTML. But, Is there 
 a way to just test that the view contains only a part of the html 
 rather than having to test the whole view? 

 Currently when I use assertTags I have to be exact, all the way down 
 to the attribute of the element and any nested elements. I would just 
 like to test that a view contains just a few elements on the page, not 
 every single one with all attributes as this takes forever to build 
 out this array on a complex view. 

 For instance, I would just like to test that the view contains a 
 certain input with an id of post_id, but I can't do this if any html 
 comes before it, it wants me to match the entire thing. 

 $result = $this-testAction('/url/page_with_form', 
 array('return'='view')); 
 $expected = array( 
 array('input'=array('id'='post_id')), 
 ); 

 This will not work because I didn't include the array structure for 
 the form thats wrapped around it, if I add the entire form and all the 
 divs that the form helper generates it works just fine. 

 Thanks, 

 Andrew 






-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help with testing different things

2012-03-11 Thread majna
To test flash message, check session:


$this-assertEqual($this-TestController-Session-read('Message.flash.message'),
 __('Saved.'));

On Sunday, March 11, 2012 10:13:10 PM UTC+1, andrewperk wrote:

 In case someone finds this post later, I found an easier way to test html 
 tags rather than using assertTags from the view by using assertRegExp or 
 assertPattern:

 $result = $this-testAction('url', array('return'='view'));
 $this-assertRegExp('/input name=data\[Model\]\[field\]/', $result);

 Just remember the pattern passed in as the first param if it uses any 
 brackets like the data[Model][field] does you need to escape them first 
 otherwise it picks it up as a delimiter. 

 I still haven't found a way to test what the setFlash messages are, only 
 that the method has been called.

 $this-view and $this-contents are always null as well when using 
 redirect.

 On Saturday, March 10, 2012 7:56:37 PM UTC-8, andrewperk wrote:

 Hello, 

 I have a couple of questions about testing certain things: 

 Flash Messages: I know how to test that the setFlash method has ran 
 using mocks, but is there a way to verify that it contains the correct 
 message? 

 assertTags() Views: I use testAction to return the view then use 
 assertTags to test that the view contains certain HTML. But, Is there 
 a way to just test that the view contains only a part of the html 
 rather than having to test the whole view? 

 Currently when I use assertTags I have to be exact, all the way down 
 to the attribute of the element and any nested elements. I would just 
 like to test that a view contains just a few elements on the page, not 
 every single one with all attributes as this takes forever to build 
 out this array on a complex view. 

 For instance, I would just like to test that the view contains a 
 certain input with an id of post_id, but I can't do this if any html 
 comes before it, it wants me to match the entire thing. 

 $result = $this-testAction('/url/page_with_form', 
 array('return'='view')); 
 $expected = array( 
 array('input'=array('id'='post_id')), 
 ); 

 This will not work because I didn't include the array structure for 
 the form thats wrapped around it, if I add the entire form and all the 
 divs that the form helper generates it works just fine. 

 Thanks, 

 Andrew 






-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help needed for developing ACL

2012-02-24 Thread Allan Douglas
use the cookbook official of cakephp, there all what do you need

2012/2/24 konda guthakond...@gmail.com:
 I am new to cakePHP. Please give me guidelines or your suggestions to
 create and work with ACL.

 Below is my requirement.

 1. Registered user
 2. Moderator
 3. Supervisor
 4. Admin

 Here admin or supervisor will assign permissions to moderator or
 registered user.

 --
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.


 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



-- 
Fraternalmente
Allan Douglas de A. Silva
Desenvolvedor de Sistemas
Técnico em Informatica - Escola Técnica Redentorista.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help making a query to select all Posts which have lots of Comments

2012-02-07 Thread andrewperk
I made a typo in the 2nd paragraph. I meant:

What I'm trying to do is select only Posts which have 5 or more
comments using pagination.

On Feb 7, 3:22 pm, andrewperk andrewp...@gmail.com wrote:
 Hello, I have a Post model with each Post can have many Comments and
 each Comment belongs to a Post.

 What I'm trying to do is select only Posts which have 5 more comments
 using Pagination.

 I'm confused on how to construct this query and how to do it using
 Pagination. I know I need to get a count of how many comments each
 post has, but how with the paginator?

 Can anyone point me in the right direction, something like
 Post.comments  5, this doesn't work obviously.

 $this-Post-recursive = 1;
         $this-paginate = array(
                 'conditions'=array(
                         'status'='published',
                         'Post.comments  5'
                 ),
                 'limit'=10,
                 'order'='published_on DESC'
         );
 $this-set('posts', $this-paginate('Post'));

 Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help making a query to select all Posts which have lots of Comments

2012-02-07 Thread Andras Kende
Hello,

You could do it easily with counterCache

http://book.cakephp.org/1.3/view/1033/counterCache-Cache-your-count


Andras Kende
http://www.kende.com


On Feb 7, 2012, at 5:22 PM, andrewperk wrote:

 Hello, I have a Post model with each Post can have many Comments and
 each Comment belongs to a Post.
 
 What I'm trying to do is select only Posts which have 5 more comments
 using Pagination.
 
 I'm confused on how to construct this query and how to do it using
 Pagination. I know I need to get a count of how many comments each
 post has, but how with the paginator?
 
 Can anyone point me in the right direction, something like
 Post.comments  5, this doesn't work obviously.
 
 $this-Post-recursive = 1;
   $this-paginate = array(
   'conditions'=array(
   'status'='published',
   'Post.comments  5'
   ),
   'limit'=10,
   'order'='published_on DESC'
   );
 $this-set('posts', $this-paginate('Post'));
 
 Thanks.
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help Understanding Fat Models

2012-01-31 Thread Marius
Great explaniation Jeremy! +1

I recently got my head around the principle too. I'd recomend it
included in the cookbook alongside MVC introduction to reinforce the
DRY concept. Essential learning for more complex systems.

On Jan 30, 9:52 pm, jeremyharris funeralm...@gmail.com wrote:
 The best advice is to keep things DRY (Don't Repeat Yourself). Generally,
 this results in thin controllers (small controller functions) and fat
 models (more methods on the models). Any functionality that you will find
 yourself reusing across different controllers that appropriately relate to
 a model should be on that model, instead.

 As an example (typical blog example).

 //posts_controller
 function edit($id) {
 // check if user is the creator of this post and is therefore allowed to
 edit
 $post = $this-Post-read(null, $id);
 if (empty($post) || $post['Post']['created_by'] != $this-Auth-user('id'))
 {
 //redirect
 return;

 }
 }

 function delete($id) {
 // check if user has rights to delete
 $post = $this-Post-read(null, $id);
 if (empty($post) || $post['Post']['created_by'] != $this-Auth-user('id'))
 {
 //redirect
 return;

 }
 }

 Your controller would be considered fat because you duplicated code and
 this is logic that belongs in the model. Instead, something like this looks
 better:

 // post model
 function userOwnsPost($userId, $postId) {
 return $this-hasAny(array(
 'id' = $postId,
 'created_by' = $userId
 ));

 }

 // posts controller
 function edit($id) {
 if (!$this-Post-userOwnsPost($this-Auth-user('id'), $id)) {
 //redirect

 }
 }

 function delete($id) {
 if (!$this-Post-userOwnsPost($this-Auth-user('id'), $id)) {
 //redirect

 }
 }

 Perhaps not the *best* example, but you get the idea. This code is also
 much easier to test. If you ever change the behavior of userOwnsPost, it
 will change across the app. It's also very specific, which makes writing
 tests really easy.

 If you find yourself writing long, complex find conditions and using them
 over and over again, they probably belong in model. Remember, many small
 functions are easier to test and predict the outcome than large functions.

 Another example might be finding a list of posts that belong to a tag. You
 would place this in your Post or Tag model, and might call it in
 /posts/index, /pages/home, /posts/view,
 /users/posts_in_tags_i_have_created, etc.

 For small apps, it may not be necessary to move these functions around!
 But, I'd say the more you have in models the better, even if only for
 testing's sake. It's easier to find out what went wrong when your methods
 are smaller and very specific. Controller methods are usually less specific
 than model methods.

 Hope that clears it up a bit.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help Understanding Fat Models

2012-01-30 Thread jeremyharris
The best advice is to keep things DRY (Don't Repeat Yourself). Generally, 
this results in thin controllers (small controller functions) and fat 
models (more methods on the models). Any functionality that you will find 
yourself reusing across different controllers that appropriately relate to 
a model should be on that model, instead.

As an example (typical blog example).

//posts_controller
function edit($id) {
// check if user is the creator of this post and is therefore allowed to 
edit
$post = $this-Post-read(null, $id);
if (empty($post) || $post['Post']['created_by'] != $this-Auth-user('id')) 
{
//redirect
return;
}
}

function delete($id) {
// check if user has rights to delete
$post = $this-Post-read(null, $id);
if (empty($post) || $post['Post']['created_by'] != $this-Auth-user('id')) 
{
//redirect
return;
}
}

Your controller would be considered fat because you duplicated code and 
this is logic that belongs in the model. Instead, something like this looks 
better:

// post model
function userOwnsPost($userId, $postId) {
return $this-hasAny(array(
'id' = $postId,
'created_by' = $userId
));
}

// posts controller
function edit($id) {
if (!$this-Post-userOwnsPost($this-Auth-user('id'), $id)) {
//redirect
}
}

function delete($id) {
if (!$this-Post-userOwnsPost($this-Auth-user('id'), $id)) {
//redirect
}
}

Perhaps not the *best* example, but you get the idea. This code is also 
much easier to test. If you ever change the behavior of userOwnsPost, it 
will change across the app. It's also very specific, which makes writing 
tests really easy.

If you find yourself writing long, complex find conditions and using them 
over and over again, they probably belong in model. Remember, many small 
functions are easier to test and predict the outcome than large functions.

Another example might be finding a list of posts that belong to a tag. You 
would place this in your Post or Tag model, and might call it in 
/posts/index, /pages/home, /posts/view, 
/users/posts_in_tags_i_have_created, etc.

For small apps, it may not be necessary to move these functions around! 
But, I'd say the more you have in models the better, even if only for 
testing's sake. It's easier to find out what went wrong when your methods 
are smaller and very specific. Controller methods are usually less specific 
than model methods.

Hope that clears it up a bit.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help Understanding Fat Models

2012-01-30 Thread Chooch Schubert
Thank you Jeremy. This is a great, concise description and the example code
helps a lot to see the difference.

 {c}


On Mon, Jan 30, 2012 at 4:52 PM, jeremyharris funeralm...@gmail.com wrote:

 The best advice is to keep things DRY (Don't Repeat Yourself). Generally,
 this results in thin controllers (small controller functions) and fat
 models (more methods on the models). Any functionality that you will find
 yourself reusing across different controllers that appropriately relate to
 a model should be on that model, instead.

 As an example (typical blog example).

 //posts_controller
 function edit($id) {
 // check if user is the creator of this post and is therefore allowed to
 edit
 $post = $this-Post-read(null, $id);
 if (empty($post) || $post['Post']['created_by'] !=
 $this-Auth-user('id')) {
 //redirect
 return;
 }
 }

 function delete($id) {
 // check if user has rights to delete
 $post = $this-Post-read(null, $id);
 if (empty($post) || $post['Post']['created_by'] !=
 $this-Auth-user('id')) {
 //redirect
 return;
 }
 }

 Your controller would be considered fat because you duplicated code and
 this is logic that belongs in the model. Instead, something like this looks
 better:

 // post model
 function userOwnsPost($userId, $postId) {
 return $this-hasAny(array(
 'id' = $postId,
 'created_by' = $userId
 ));
 }

 // posts controller
 function edit($id) {
 if (!$this-Post-userOwnsPost($this-Auth-user('id'), $id)) {
 //redirect
 }
 }

 function delete($id) {
 if (!$this-Post-userOwnsPost($this-Auth-user('id'), $id)) {
 //redirect
 }
 }

 Perhaps not the *best* example, but you get the idea. This code is also
 much easier to test. If you ever change the behavior of userOwnsPost, it
 will change across the app. It's also very specific, which makes writing
 tests really easy.

 If you find yourself writing long, complex find conditions and using them
 over and over again, they probably belong in model. Remember, many small
 functions are easier to test and predict the outcome than large functions.

 Another example might be finding a list of posts that belong to a tag. You
 would place this in your Post or Tag model, and might call it in
 /posts/index, /pages/home, /posts/view,
 /users/posts_in_tags_i_have_created, etc.

 For small apps, it may not be necessary to move these functions around!
 But, I'd say the more you have in models the better, even if only for
 testing's sake. It's easier to find out what went wrong when your methods
 are smaller and very specific. Controller methods are usually less specific
 than model methods.

 Hope that clears it up a bit.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 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


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help Understanding Fat Models

2012-01-30 Thread jeremyharris
Cool, glad it helped. There are other examples around the internet too.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help - Multiple Apps, Shared Core, Dispatch Errors - CakePHP 2.0.3

2011-11-21 Thread majna
Or use

'prefix' = Inflector::slug(APP_DIR)

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help - Multiple Apps, Shared Core, Dispatch Errors - CakePHP 2.0.3

2011-11-20 Thread Andras Kende
I had similar issue before, that was tracked down to APC mixing up things
Resolved by changing each site cache prefix in core.php :

Cache::config('_cake_core_', array(
'prefix' = 'domain1.com_cake_core_',

Cache::config('_cake_model_', array(
'prefix' = 'domain1.com_cake_core_',

Andras Kende



On Nov 21, 2011, at 12:39 AM, sotin wrote:

 Hello,
 
 I'm hoping someone can help me out with this. I've got two apps using
 a shared CakePHP core (2.0.3). In Apache, I've configured each app on
 it's own subdomain. In my views, I have absolute HTML links that link
 between subdomains. I'm getting random issues where a request starts
 in one app (properly), but then ends up being dispatched to a
 controller in my other app. Here's the setup:
 
 ~/app1/...
 ~/app1/View/Pages/about.ctp
 ~/app2/...
 ~/lib/Cake/...
 
 And I have domains setup such as:
 
 http://app1.example.com (Apache DocumentRoot is ~/app1/webroot/)
 http://app2.example.com (Apache DocumentRoot is ~/app2/webroot/)
 
 On http://app2.example.com, I have a HTML link w/ absolute url
 pointing to http://app1.example.com/pages/about
 
 About 25% of the time when I click the link on http://app2.example.com
 that takes me to http://app1.example.com/pages/about, the request gets
 dispatched to controllers in the wrong app.  This causes an exception
 to be thrown since the page I'm trying to load (about.ctp) is only in
 app1. Check out this stack trace:
 
 Stack Trace
 
 #0 ~/app2/Controller/PagesController.php(49): AppController-
 beforeFilter()
 #1 ~/lib/Cake/Controller/Controller.php(605): PagesController-
 beforeFilter()
 #2 ~/lib/Cake/Routing/Dispatcher.php(104): Controller-
 startupProcess()
 #3 ~/lib/Cake/Routing/Dispatcher.php(89): Dispatcher-
 _invoke(Object(PagesController), Object(CakeRequest),
 Object(CakeResponse))
 #4 ~/app1/webroot/index.php(96): Dispatcher-
 dispatch(Object(CakeRequest), Object(CakeResponse))
 #5 {main}
 
 The request started out in /app1/webroot/index.php but ended up
 getting passed to my PagesController in app2 instead of app1!?
 
 The problem seems to be random, if I refresh the page, I'll get the
 expected result. Hit refresh 10 more times, and the request from app1
 gets handled by app2 Controllers again and an exception is thrown.
 
 Any suggestions? I'm really stuck on this.
 
 Thanks!
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help - Multiple Apps, Shared Core, Dispatch Errors - CakePHP 2.0.3

2011-11-20 Thread sotin
Some progress:

Disabling caching in both CakePHP apps (via Cache.disable in Config/
core.php) didn't seem to make any difference, but disabling APC all
together (removed PHP extension) seemed to solve the problem.

Any APC/CakePHP experts out there that can offer some insight?

Thank you!

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help - Multiple Apps, Shared Core, Dispatch Errors - CakePHP 2.0.3

2011-11-20 Thread sotin
Thank you Andras, that did the trick! APC back up and running and
requests are being dispatched to the proper controllers in each app.

You can ignore my other reply, I hadn't read your suggestion yet.

On Nov 21, 1:55 am, Andras Kende and...@kende.com wrote:
 I had similar issue before, that was tracked down to APC mixing up things
 Resolved by changing each site cache prefix in core.php :

 Cache::config('_cake_core_', array(
         'prefix' = 'domain1.com_cake_core_',

 Cache::config('_cake_model_', array(
         'prefix' = 'domain1.com_cake_core_',

 Andras Kende

 On Nov 21, 2011, at 12:39 AM, sotin wrote:







  Hello,

  I'm hoping someone can help me out with this. I've got two apps using
  a shared CakePHP core (2.0.3). In Apache, I've configured each app on
  it's own subdomain. In my views, I have absolute HTML links that link
  between subdomains. I'm getting random issues where a request starts
  in one app (properly), but then ends up being dispatched to a
  controller in my other app. Here's the setup:

  ~/app1/...
  ~/app1/View/Pages/about.ctp
  ~/app2/...
  ~/lib/Cake/...

  And I have domains setup such as:

 http://app1.example.com(Apache DocumentRoot is ~/app1/webroot/)
 http://app2.example.com(Apache DocumentRoot is ~/app2/webroot/)

  Onhttp://app2.example.com, I have a HTML link w/ absolute url
  pointing tohttp://app1.example.com/pages/about

  About 25% of the time when I click the link onhttp://app2.example.com
  that takes me tohttp://app1.example.com/pages/about, the request gets
  dispatched to controllers in the wrong app.  This causes an exception
  to be thrown since the page I'm trying to load (about.ctp) is only in
  app1. Check out this stack trace:

  Stack Trace

  #0 ~/app2/Controller/PagesController.php(49): AppController-
  beforeFilter()
  #1 ~/lib/Cake/Controller/Controller.php(605): PagesController-
  beforeFilter()
  #2 ~/lib/Cake/Routing/Dispatcher.php(104): Controller-
  startupProcess()
  #3 ~/lib/Cake/Routing/Dispatcher.php(89): Dispatcher-
  _invoke(Object(PagesController), Object(CakeRequest),
  Object(CakeResponse))
  #4 ~/app1/webroot/index.php(96): Dispatcher-
  dispatch(Object(CakeRequest), Object(CakeResponse))
  #5 {main}

  The request started out in /app1/webroot/index.php but ended up
  getting passed to my PagesController in app2 instead of app1!?

  The problem seems to be random, if I refresh the page, I'll get the
  expected result. Hit refresh 10 more times, and the request from app1
  gets handled by app2 Controllers again and an exception is thrown.

  Any suggestions? I'm really stuck on this.

  Thanks!

  --
  Our newest site for the community: CakePHP Video 
  Tutorialshttp://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help 
  others with their CakePHP related questions.

  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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: HELP! model associations lost after import

2011-11-17 Thread phpMagpie
Your first two examples will not work as models are not plural.
http://book.cakephp.org/view/936/Importing-Controllers-Models-Components-Behaviors-

HTH, Paul.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help! Validation does not work, strange thing!

2011-11-16 Thread Jeremy Burns | Class Outfit
I might be missing something, but what is the function _validationRules? Where 
is it being called from?

A normal model set up uses var $validate = array(); and that just works. Are 
you sure your validation is triggering? Are you sure that your user is really 
passing validation rules or is just saving without error? And if so, that your 
newsletter is actually failing a save at the db level when it would fail 
validation (that isn't being triggered/checked)?


Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 16 Nov 2011, at 15:23, heohni wrote:

 Hi,
 
 I have a working contact form on my project and I am about just to use
 another form within another controller.
 So I copied all from my contact model into my newsletter model:
 
 ?php
 class Newsletter extends AppModel {
   var $name = 'Newsletter';
var $useTable = 'newsletter';
 
function _validationRules() {
$this-validate = array(
'news_company' = array(
'rule' = 'notEmpty',
'message' = __('Bitte tragen Sie hier Ihren Namen
 ein.', true)
)
);
}
 
 }
 ?
 
 My Controller:
 ?php
 class NewsletterController extends AppController {
 
   var $name = 'Newsletter';
 
 function surveyfinal(){
if ($this-RequestHandler-isPost()) {
if ($this-Newsletter-validates()) {
 echo ok;
 }else{
$this-Session-setFlash(__('Ihre Anfrage konnte nicht
 versendet werden! Bitte prüfen Sie die markierten Felder.', true));
}
}
}
 
 
 The strange thing is, that this the same like my contact form, and
 there the validation works!
 But the data (is present, proofed) is not validating.
 
 debug($this-Newsletter-validate);
 
 is always empty!
 
 if I use this instead:
 var $validate = array(
'news_company' = array(
'required' = array('rule' = 'notEmpty', 'message' =
 'EmptyName')
),
 the form is validating its data, but I need to have it multilingual,
 like in my contact form.
 
 Within my controller I can work with $this-Newsletter. Means I can
 connect to my model. I have some other function where I read and save
 data from/to my database.
 
 I really don't understand, why just the validation data is not
 present??
 
 Anyone any ideas??
 
 Thanks!!
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: HELP! model associations lost after import

2011-11-16 Thread Jeremy Burns | Class Outfit
Not sure what the issue is, but in general I'd recommend that you set recursive 
to -1 in your app_model and then use the Containable behaviour; it gives you 
total control and my well solve your issue (as well as bring other 
improvements).

Jeremy Burns
Class Outfit

http://www.classoutfit.com

On 16 Nov 2011, at 23:36, billy wrote:

 Due to a client's desire to have URLs that defy Cake logic, i have
 decided to use the pages controller to organize my app.
 most the site's functionality occurs from one page through ajax so i
 thought i'd use pages as the home base and access other controllers
 and models.
 
 so i decided to import the relevant models.
 
 i have tried all three methods:
 
 
 $this-loadModel('Inventories');
 
 $Inventories = ClassRegistry::init('Inventories');
 
 App::import('Controller', 'Inventories');
 $Inventories = new InventoriesController;
 
 
 Model seems to load fine but when i try to find some records:
 
 
 $(...)-find(all, array(
 'conditions' = array('id' = '1'),
 'recursive'=2)
 );
 
 
 i only get results as if recursive had been -1
 or as if there were no other associated models
 this happens no matter what level of recursive i put
 and when i load the model in regular controllers, i get an appropriate
 response.
 
 any ideas how i can change my pages controller to retrieve associated
 models like regular controllers?
 
 -- 
 Our newest site for the community: CakePHP Video Tutorials 
 http://tv.cakephp.org 
 Check out the new CakePHP Questions site http://ask.cakephp.org and help 
 others with their CakePHP related questions.
 
 
 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


Re: Help using paginator

2011-11-11 Thread thom
On Thu, Nov 10, 2011 at 5:25 PM, euromark dereurom...@googlemail.comwrote:

 two questions:
 a)why are you using both find(all) and paginate?
 b) why do you use lowercase model name in paginate()?



+1

function index(){
  $this-paginate('Equipos');
}

-- 
Regards,,,
thom
http://mynameisthom.blogspot.com

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


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


  1   2   3   4   5   6   7   8   9   10   >