Re: Routing table

2010-08-18 Thread Bogdan Bursuc
I think there is a way. You can take a look at Router::connect, it accepts a
parameter Router which is a class that extends CakeRoute and you can
implement there something

and you do Router::connect('/some/complicated/link', array('controller' =>
'pages', 'action' => 'display', 'p2'), array('routeClass' =>
'OwnRouteClass'));

or something like that you have to do a little research maybe take a look in
the core files router.php where Router and CakeRoute are implemented and see
how it works

On Thu, Aug 19, 2010 at 2:54 AM, Steve Love  wrote:

> If you just want a simple answer to your question: Yes, there's
> probably a way. But my guess is you'd have to hack the Cake core to
> use the database for routing rather than the built-in routing class.
>
> That said, if you're editing URIs on a regular basis I wouldn't call
> that very SEO-friendly. Once you change them, URIs that were indexed
> by search engines last week would have to be marked as moved
> permanently and I don't think that will win you any points. But I may
> be mistaken about how you intend to use this functionality.
>
> Steve
>
> On Aug 18, 3:54 am, "puiumar...@gmail.com" 
> wrote:
> > Hi!
> >
> > Is there any way to create routes from a database table?
> > What I mean is this: I have a table that looks like this:
> >
> > id |   link  | controller |   action |
> > param
> >
> ---
> ---
> > 1  |  /somepage| pages | display  | p1
> > 2  |  /some/complicated/link  | pages | display  | p2
> >
> ---
> --
> > where the first row (id 1) translates to:
> > Router::connect('/somepage', array('controller' => 'pages', 'action'
> > => 'display', 'p1'));
> >
> > and the second row (id 2) translates to:
> > Router::connect('/some/complicated/link', array('controller' =>
> > 'pages', 'action' => 'display', 'p2'));
> >
> > and so on. I want this functionality so I can easily edit my links
> > (for a SEO perspective).
> >
> > Thanks!
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>



-- 
Bogdan Iulian Bursuc

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

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


Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-18 Thread ZAky
I think capital is a city attribute there for should be a column in
the cities table.
The values of the column can be 0 = not a capital, 1= state capital, 2
= country capital, 4 = state and country capital.
It also solve the empty combobox.
Another way to solve the empty combobox is to add "N/A" row to the
cities table and select this value before adding cities.
One more issue, country may have no states at all.

On Aug 19, 12:17 am, DerBjörn  wrote:
> Thanks, Dan!
>
> After I rebaked my models with followingrelations:
>
> City belongsTo State
>
> State belongsTo Country
> State belongsTo City
> State hasMany City
>
> Country belongsTo City
> Country hasMany State
>
> and updated my views, finally i got a "result"...
> Your advice with "containable" i haven't follow till now.
>
> I still have one problem that maybe i am able to solve with cricket's
> advice of using virtual models!?!
> When i want to add p.e. a new country or a new state, their comboboxes
> for capital city are empty, so i cannot choose its capital city. How
> do I solve this problem?
> Thanks a lot :)

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

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


Re: Possible to add a licenser in CakePHP?

2010-08-18 Thread John Chronus
today i'll try to write some code, and send yo tou...

it's easy... but i have to sleep now :(

see ya

On Aug 19, 2010, at 12:46 AM, weilies wrote:

> Thanks but any example for that?
> 
> On Aug 18, 10:27 pm, Jonathan Querubina 
> wrote:
>> The "informing" part must be ajax
>> By John Chronus
>> 
>> On Wed, Aug 18, 2010 at 11:15 AM, Jonathan Querubina
>> 
>>  wrote:
>>> You could set a timer in javascript, informing a php that the user is
>>> online, if the timer stops responding for a time specified, then, tell
>>> the users he's not online anymore...
>>> By John Chronus
>> 
>>> On Wed, Aug 18, 2010 at 11:07 AM, weilies  wrote:
 I am planning to create a group chatware using PHP.
 For example, user can join "Super mario" group to start discussion.
 But if he logout or directly close the browser, how can system detect
 he is no longer exist in the group and notify other user in the same
 group, to remove his name from their list?
>> 
 Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
 with their CakePHP related questions.
>> 
 You received this message because you are subscribed to the Google Groups 
 "CakePHP" group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group 
 athttp://groups.google.com/group/cake-php?hl=en
>> 
>> 
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: Possible to add a licenser in CakePHP?

2010-08-18 Thread weilies
Thanks but any example for that?

On Aug 18, 10:27 pm, Jonathan Querubina 
wrote:
> The "informing" part must be ajax
> By John Chronus
>
> On Wed, Aug 18, 2010 at 11:15 AM, Jonathan Querubina
>
>  wrote:
> > You could set a timer in javascript, informing a php that the user is
> > online, if the timer stops responding for a time specified, then, tell
> > the users he's not online anymore...
> > By John Chronus
>
> > On Wed, Aug 18, 2010 at 11:07 AM, weilies  wrote:
> >> I am planning to create a group chatware using PHP.
> >> For example, user can join "Super mario" group to start discussion.
> >> But if he logout or directly close the browser, how can system detect
> >> he is no longer exist in the group and notify other user in the same
> >> group, to remove his name from their list?
>
> >> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> >> with their CakePHP related questions.
>
> >> You received this message because you are subscribed to the Google Groups 
> >> "CakePHP" group.
> >> To post to this group, send email to cake-php@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> >> athttp://groups.google.com/group/cake-php?hl=en
>
>

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

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


Re: missing controller

2010-08-18 Thread linchuanyu
no, I changed the name but still not working~~~
:(~~~

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

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


Re: Routing table

2010-08-18 Thread Steve Love
If you just want a simple answer to your question: Yes, there's
probably a way. But my guess is you'd have to hack the Cake core to
use the database for routing rather than the built-in routing class.

That said, if you're editing URIs on a regular basis I wouldn't call
that very SEO-friendly. Once you change them, URIs that were indexed
by search engines last week would have to be marked as moved
permanently and I don't think that will win you any points. But I may
be mistaken about how you intend to use this functionality.

Steve

On Aug 18, 3:54 am, "puiumar...@gmail.com" 
wrote:
> Hi!
>
> Is there any way to create routes from a database table?
> What I mean is this: I have a table that looks like this:
>
> id |               link                  | controller |   action |
> param
> --- 
> ---
> 1  |      /somepage                | pages     | display  | p1
> 2  |  /some/complicated/link  | pages     | display  | p2
> --- 
> --
> where the first row (id 1) translates to:
> Router::connect('/somepage', array('controller' => 'pages', 'action'
> => 'display', 'p1'));
>
> and the second row (id 2) translates to:
> Router::connect('/some/complicated/link', array('controller' =>
> 'pages', 'action' => 'display', 'p2'));
>
> and so on. I want this functionality so I can easily edit my links
> (for a SEO perspective).
>
> Thanks!

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

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


Re: Not serving css or js

2010-08-18 Thread Paul Saunders
I followed this:

http://blog.aphexcreations.net/2007/10/enabling-cakephp-11-on-lighttpd-15.html

Also check the comments for improvements etc...

Thanks!


On Fri, Aug 13, 2010 at 11:32 PM, BARTCC wrote:

> if your webserver DOES'NT support mod_rewrite:
> on Apache: (1)(2)
> on windows IIS: (1)(2)(3)
>
> if your webserver DOES support mod_rewrite:
> on Apache: (4)(5)(6)
> on windows IIS: (4)(5)(6)
>
> (1) delete all .htaccess files (in root, app and webroot) cause
> they're not needed
> (2) uncomment in core.php "Configure::write(App.base_url), ..."
> (3) define "webroot" as your site's root directory
> (4) check webserver setting 'overwrite all' is set for you install
> directory, so it reads .htaccess files
> (5) make sure all .htaccess files (1) are present
> (6) comment out (2)
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: Countries, States and Cities: Which relations i'm dealing with?

2010-08-18 Thread DerBjörn
Thanks, Dan!

After I rebaked my models with following relations:

City belongsTo State

State belongsTo Country
State belongsTo City
State hasMany City

Country belongsTo City
Country hasMany State

and updated my views, finally i got a "result"...
Your advice with "containable" i haven't follow till now.

I still have one problem that maybe i am able to solve with cricket's
advice of using virtual models!?!
When i want to add p.e. a new country or a new state, their comboboxes
for capital city are empty, so i cannot choose its capital city. How
do I solve this problem?
Thanks a lot :)

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread Jeremy Burns | Class Outfit
They are a slightly different format: 
http://book.cakephp.org/view/134/Core-Validation-Rules

Jeremy Burns
Class Outfit

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

On 18 Aug 2010, at 21:19, RogerM wrote:

> Many of my modules have underscores in them. Is that the main part of
> the issue?
> 
> I was not aware their was newer validation rules.
> 
> 
> 
> On Aug 18, 3:14 pm, Jeremy Burns | Class Outfit
>  wrote:
>> I notice that you have var $name = 'Event_contact' too, and other models 
>> such as Event_contact_person. Have you changed those? It probably doesn't 
>> make any difference, but the validation rules are old school too - have you 
>> tried commenting those out, just for good measure? Also - it's probably a 
>> cut and paste thing - but there appears to be a missing > in $this-field. 
>> I'd be tempted to strip it down to the bare minimum, see if it still errors 
>> and then build it back up.
>> 
>> Do you have other models that are related to this one that also refer to it 
>> as Event_contact (e.g. Event and Event_contact_person)? That'd error too 
>> (and Event_contact_person should be EventContactPerson).
>> 
>> Jeremy Burns
>> Class Outfit
>> 
>> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>> 
>> On 18 Aug 2010, at 20:54, RogerM wrote:
>> 
>>> I did try changing to class
>>>  "EventContact extends AppModel"
>>> And cleared the /tmp/cache/ files
>> 
>>> Still have the same error
>> 
>>> On Aug 18, 2:40 pm, Sam  wrote:
 Shouldn't it be
 "class EventContact extends AppModel"
 instead of
 "class Event_contact extends AppModel"
>> 
 On Aug 18, 2:26 pm, RogerM  wrote:
>> 
> I notice that it seems the error is coming from /webroot/index.php in:
>> 
> if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
> trigger_error("CakePHP core could not be found.  Check 
> the value of
> CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to
> the directory containing your " . DS . "cake core directory and your
> " . DS . "vendors root directory.", E_USER_ERROR);
> }
>> 
> When I try to echo CORE_PATH; I get nothing. Could this be the
> problem?
>> 
> On Aug 18, 12:06 pm, AD7six  wrote:
>> 
>> On Aug 18, 3:46 pm, RogerM  wrote:
>> 
>>> I am trying to update our cakephp 1.1 app to 1.2 as I think going from
>>> 1.1 to 1.3 might be a big jump.
>>> I have debug set to 3 and all I get on the screen is this:
>> 
>>> Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
>>> class_registry.php on line 139
>> 
>>> What is going on?
>> 
>> You've got a file in the right place without that class in it.
>> 
>>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
>>> with their CakePHP related questions.
>> 
>>> You received this message because you are subscribed to the Google Groups 
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
>>> athttp://groups.google.com/group/cake-php?hl=en
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread McBuck DGAF
I don't know if it has anything to do with the error you are
experiencing, but 1.3 no longer supports debug level 3.  Have you
tried setting it to a lower value?

On Aug 18, 4:33 pm, RogerM  wrote:
> Lesson learned I guess. I had someone help out building a projects.
> Looks like it was more harm then good.
>
> Thanks for you help everyone.
>
> On Aug 18, 3:22 pm, AD7six  wrote:
>
> > On Aug 18, 9:23 pm, RogerM  wrote:
>
> > > I thought about that. I do have a event_contact.php file in models
> > > with the following in it:
>
> > >  > > class Event_contact extends AppModel
>
> > To me the puzzle is how you had this app working in 1.1 at all - best
> > check all your files 
> > againsthttp://book.cakephp.org/view/22/CakePHP-Conventions
>
> > AD

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

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


Re: Validation a la "either...or"

2010-08-18 Thread euromark
cast the value to (float) in the beforeValidate function of the model


On 18 Aug., 22:14, DerBjörn  wrote:
> Thanks a lot!...
>
> So for my example it should be the following solution:
>
> 'fieldname' => array(
>                         'numeric' => array(
>                                 'rule' => array('numeric'),
>                                 //'message' => 'Your custom message here',
>                                 'allowEmpty' => true,
>                                 //'required' => false,
>                                 //'last' => false, // Stop validation after 
> this rule
>                                 //'on' => 'create', // Limit validation to 
> 'create' or 'update'
> operations
>                         ),
>                 ),
>
> The problem i have now: If the field is null, generally the field in
> the database will be set to 0. (Decimal 15,4), but CakePHP tells
> me that the column cannot be null. CakePHP is right of course. How i
> set the field to 0 automatically when the field in the form is null?
> Thanks :)

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread RogerM
Lesson learned I guess. I had someone help out building a projects.
Looks like it was more harm then good.

Thanks for you help everyone.

On Aug 18, 3:22 pm, AD7six  wrote:
> On Aug 18, 9:23 pm, RogerM  wrote:
>
> > I thought about that. I do have a event_contact.php file in models
> > with the following in it:
>
> >  > class Event_contact extends AppModel
>
> To me the puzzle is how you had this app working in 1.1 at all - best
> check all your files 
> againsthttp://book.cakephp.org/view/22/CakePHP-Conventions
>
> AD

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread RogerM
Many of my modules have underscores in them. Is that the main part of
the issue?

I was not aware their was newer validation rules.



On Aug 18, 3:14 pm, Jeremy Burns | Class Outfit
 wrote:
> I notice that you have var $name = 'Event_contact' too, and other models such 
> as Event_contact_person. Have you changed those? It probably doesn't make any 
> difference, but the validation rules are old school too - have you tried 
> commenting those out, just for good measure? Also - it's probably a cut and 
> paste thing - but there appears to be a missing > in $this-field. I'd be 
> tempted to strip it down to the bare minimum, see if it still errors and then 
> build it back up.
>
> Do you have other models that are related to this one that also refer to it 
> as Event_contact (e.g. Event and Event_contact_person)? That'd error too (and 
> Event_contact_person should be EventContactPerson).
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 18 Aug 2010, at 20:54, RogerM wrote:
>
> > I did try changing to class
> >  "EventContact extends AppModel"
> > And cleared the /tmp/cache/ files
>
> > Still have the same error
>
> > On Aug 18, 2:40 pm, Sam  wrote:
> >> Shouldn't it be
> >> "class EventContact extends AppModel"
> >> instead of
> >> "class Event_contact extends AppModel"
>
> >> On Aug 18, 2:26 pm, RogerM  wrote:
>
> >>> I notice that it seems the error is coming from /webroot/index.php in:
>
> >>> if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
> >>>                 trigger_error("CakePHP core could not be found.  Check 
> >>> the value of
> >>> CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to
> >>> the directory containing your " . DS . "cake core directory and your
> >>> " . DS . "vendors root directory.", E_USER_ERROR);
> >>>         }
>
> >>> When I try to echo CORE_PATH; I get nothing. Could this be the
> >>> problem?
>
> >>> On Aug 18, 12:06 pm, AD7six  wrote:
>
>  On Aug 18, 3:46 pm, RogerM  wrote:
>
> > I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> > 1.1 to 1.3 might be a big jump.
> > I have debug set to 3 and all I get on the screen is this:
>
> > Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> > class_registry.php on line 139
>
> > What is going on?
>
>  You've got a file in the right place without that class in it.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread AD7six


On Aug 18, 9:23 pm, RogerM  wrote:
> I thought about that. I do have a event_contact.php file in models
> with the following in it:
>
>  class Event_contact extends AppModel

To me the puzzle is how you had this app working in 1.1 at all - best
check all your files against http://book.cakephp.org/view/22/CakePHP-Conventions

AD

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread Jeremy Burns | Class Outfit
I notice that you have var $name = 'Event_contact' too, and other models such 
as Event_contact_person. Have you changed those? It probably doesn't make any 
difference, but the validation rules are old school too - have you tried 
commenting those out, just for good measure? Also - it's probably a cut and 
paste thing - but there appears to be a missing > in $this-field. I'd be 
tempted to strip it down to the bare minimum, see if it still errors and then 
build it back up.

Do you have other models that are related to this one that also refer to it as 
Event_contact (e.g. Event and Event_contact_person)? That'd error too (and 
Event_contact_person should be EventContactPerson).

Jeremy Burns
Class Outfit

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

On 18 Aug 2010, at 20:54, RogerM wrote:

> I did try changing to class
>  "EventContact extends AppModel"
> And cleared the /tmp/cache/ files
> 
> Still have the same error
> 
> 
> 
> On Aug 18, 2:40 pm, Sam  wrote:
>> Shouldn't it be
>> "class EventContact extends AppModel"
>> instead of
>> "class Event_contact extends AppModel"
>> 
>> On Aug 18, 2:26 pm, RogerM  wrote:
>> 
>>> I notice that it seems the error is coming from /webroot/index.php in:
>> 
>>> if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
>>> trigger_error("CakePHP core could not be found.  Check the 
>>> value of
>>> CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to
>>> the directory containing your " . DS . "cake core directory and your
>>> " . DS . "vendors root directory.", E_USER_ERROR);
>>> }
>> 
>>> When I try to echo CORE_PATH; I get nothing. Could this be the
>>> problem?
>> 
>>> On Aug 18, 12:06 pm, AD7six  wrote:
>> 
 On Aug 18, 3:46 pm, RogerM  wrote:
>> 
> I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> 1.1 to 1.3 might be a big jump.
> I have debug set to 3 and all I get on the screen is this:
>> 
> Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> class_registry.php on line 139
>> 
> What is going on?
>> 
 You've got a file in the right place without that class in it.
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: Validation a la "either...or"

2010-08-18 Thread DerBjörn
Thanks a lot!...

So for my example it should be the following solution:

'fieldname' => array(
'numeric' => array(
'rule' => array('numeric'),
//'message' => 'Your custom message here',
'allowEmpty' => true,
//'required' => false,
//'last' => false, // Stop validation after 
this rule
//'on' => 'create', // Limit validation to 
'create' or 'update'
operations
),
),

The problem i have now: If the field is null, generally the field in
the database will be set to 0. (Decimal 15,4), but CakePHP tells
me that the column cannot be null. CakePHP is right of course. How i
set the field to 0 automatically when the field in the form is null?
Thanks :)

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread RogerM
I did try changing to class
  "EventContact extends AppModel"
And cleared the /tmp/cache/ files

Still have the same error



On Aug 18, 2:40 pm, Sam  wrote:
> Shouldn't it be
> "class EventContact extends AppModel"
> instead of
> "class Event_contact extends AppModel"
>
> On Aug 18, 2:26 pm, RogerM  wrote:
>
> > I notice that it seems the error is coming from /webroot/index.php in:
>
> > if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
> >                 trigger_error("CakePHP core could not be found.  Check the 
> > value of
> > CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to
> > the directory containing your " . DS . "cake core directory and your
> > " . DS . "vendors root directory.", E_USER_ERROR);
> >         }
>
> > When I try to echo CORE_PATH; I get nothing. Could this be the
> > problem?
>
> > On Aug 18, 12:06 pm, AD7six  wrote:
>
> > > On Aug 18, 3:46 pm, RogerM  wrote:
>
> > > > I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> > > > 1.1 to 1.3 might be a big jump.
> > > > I have debug set to 3 and all I get on the screen is this:
>
> > > > Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> > > > class_registry.php on line 139
>
> > > > What is going on?
>
> > > You've got a file in the right place without that class in it.

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread Sam
Shouldn't it be
"class EventContact extends AppModel"
instead of
"class Event_contact extends AppModel"

On Aug 18, 2:26 pm, RogerM  wrote:
> I notice that it seems the error is coming from /webroot/index.php in:
>
> if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
>                 trigger_error("CakePHP core could not be found.  Check the 
> value of
> CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to
> the directory containing your " . DS . "cake core directory and your
> " . DS . "vendors root directory.", E_USER_ERROR);
>         }
>
> When I try to echo CORE_PATH; I get nothing. Could this be the
> problem?
>
> On Aug 18, 12:06 pm, AD7six  wrote:
>
>
>
> > On Aug 18, 3:46 pm, RogerM  wrote:
>
> > > I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> > > 1.1 to 1.3 might be a big jump.
> > > I have debug set to 3 and all I get on the screen is this:
>
> > > Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> > > class_registry.php on line 139
>
> > > What is going on?
>
> > You've got a file in the right place without that class in it.

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread RogerM
I notice that it seems the error is coming from /webroot/index.php in:

if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) {
trigger_error("CakePHP core could not be found.  Check the 
value of
CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php.  It should point to
the directory containing your " . DS . "cake core directory and your
" . DS . "vendors root directory.", E_USER_ERROR);
}

When I try to echo CORE_PATH; I get nothing. Could this be the
problem?


On Aug 18, 12:06 pm, AD7six  wrote:
> On Aug 18, 3:46 pm, RogerM  wrote:
>
> > I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> > 1.1 to 1.3 might be a big jump.
> > I have debug set to 3 and all I get on the screen is this:
>
> > Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> > class_registry.php on line 139
>
> > What is going on?
>
> You've got a file in the right place without that class in it.

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread RogerM
I thought about that. I do have a event_contact.php file in models
with the following in it:



array('className' => 'Event',

'conditions' => '',

'order' => '',

'foreignKey' => 'event_id'

),


'Event_contact_person' =>

array('className' => 'Event_contact_person',

'conditions' => '',

'order' => '',

'foreignKey' => 'event_contact_person_id'

)
);

var $validate = array(
'name' => 
VALID_NOT_EMPTY,
'email' => 
VALID_EMAIL,
'address' => 
VALID_NOT_EMPTY,
'city' => 
VALID_NOT_EMPTY,
'state' => 
VALID_NOT_EMPTY
);

 function beforeDelete()
 {
 $this->Event_contact_person->del($this-
>field('event_contact_person_id','Event_contact.id='.$this->id));
 return true;
 }

}
?>

On Aug 18, 12:06 pm, AD7six  wrote:
> On Aug 18, 3:46 pm, RogerM  wrote:
>
> > I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> > 1.1 to 1.3 might be a big jump.
> > I have debug set to 3 and all I get on the screen is this:
>
> > Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> > class_registry.php on line 139
>
> > What is going on?
>
> You've got a file in the right place without that class in it.

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

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


Re: missing submit button

2010-08-18 Thread nurvzy
No clue, I suggest firebugging it.  Start turning off css bits until
you find the culprit. Also make sure you don't gave some rogue
javascript setting it to hide.  A quick test would be turning off
javascript and refreshing.

Hope that helps,
Nick

On Aug 18, 8:48 am, Charles Bueche  wrote:
>  I shall add that I didn't touch the relevant CSS part :
>
> input[type=submit] {
>         display: inline;
>         font-size: 110%;
>         width: auto;
>
> }
>
> On 8/18/10 16:44, Charles Bueche wrote:
>
>
>
> > Hi,
>
> > I have an app that is suddenly missing the  button on my
> > "edit" form. In fact, it's there, but not displayed :
>
> > ...
> >  > type="submit">
>
> > Any reason why I get this "display: none;" ? I don't remember having
> > touched the form generation, below is the code.
>
> > TIA for your hints,
> > Charles
>
> > 
> > Form->create('Message');?>
> >     
> >          
> >      >         echo $this->Form->input('id');
> >         echo $this->Form->input('client_id');
> >         echo $this->Form->input('client_msg_tag');
> >         echo $this->Form->input('msg_type');
> >         echo $this->Form->input('destination');
> >         echo $this->Form->input('ack_desired');
> >         echo $this->Form->input('nack_desired');
> >         echo $this->Form->input('ack_text');
> >         echo $this->Form->input('nack_text');
> >         echo $this->Form->input('msgtxt');
> >         echo $this->Form->input('subject');
> >         echo $this->Form->input('random_uuid');
> >         echo $this->Form->input('status');
> >         echo $this->Form->input('workflow');
> >         echo $this->Form->input('flooded');
> >         echo $this->Form->input('errors');
> >         echo $this->Form->input('channel');
> >     ?>
> >     
> > Form->end(__('Submit', true));?>
> > 
> > 
> >     
> >     
>
> >         Html->link(__('Delete', true),
> > array('action' => 'delete', $this->Form->value('Message.id')), null,
> >  sprintf(__('Are you sure you want to delete # %s?', true),
> > $this->Form->value('Message.id'))); ?>
> >         Html->link(__('List Messages', true),
> > array('action' => 'index'));?>
> >         Html->link(__('List Clients', true),
> > array('controller' => 'clients', 'action' => 'index')); ?>  > i>
> >         Html->link(__('New Client', true),
> > array('controller' => 'clients', 'action' => 'add')); ?> 
> >     
> > 
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google
> > Groups "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this
> > group athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: Easy cake pagination!

2010-08-18 Thread bradmaxs
What fields do you have in the Count table?  When I get this error it
is because the join was incorrect - usually. Also - when the errors
occur, usually there is a code and a context link that will show you
more of the dump when clicked on and what the conflicting code is.  It
should have also printed out the sql query at the top and you can see
the exact query and troubleshoot from there.

On Aug 17, 6:07 am, Okalany Daniel  wrote:
> the model Place hasMany Count, and Count belongs to place.
> So using the Containable behaviour, i can specify conditions for child
> fields like:
>
> $this->Place->Behaviors->attach('Containable');
>         $this->paginate['Place'] = array(
>             'contain' => array('Count'=>array(
>                 'conditions'=>array('Count.date'=>date('Y-m-d'))
>             )),
>         //'order' => 'Count.count DESC'
>         );
>         $places = $this->paginate('Place');
>
> But i'd like to order the parent Model by a field in a child model. When i
> uncomment the line that starts 'order', i get the error:
> SQL Error: 1054: Unknown column 'Count.count' in 'order clause'
>
> Thanks in advance.
>
>
>
>
>
> On Tue, Aug 17, 2010 at 10:28 AM, AD7six  wrote:
>
> > On Aug 16, 5:25 pm, Okalany Daniel  wrote:
> > > Hi, Andy Dawson,
> > > i'm having a similar problem,
>
> > How similar is your sql error or code ? I find it hard to compare to
> > things I can't see :).
>
> > > but i don't understand your fix.
>
> > I didn't get as far as to propose a fix. However I'll give you this
> > hint: the book almost certainly has a relevant example and hasMany/
> > hasAndBelongsToMany don't generate joins in the main query - hasOnes
> > do.
>
> > AD
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com > om>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> --
> OKALANY DANIEL,
> P.O BOX 26150,
> Kampala.,
> Uganda.http://okasoft.net
> --
> When confronted by our worst nightmares, the choices are few; Fight or
> flight. We hope to find the strength to stand against our fears but
> sometimes, despite ourselves, we run. What if the nightmare gives chase?
> Where can we hide then?

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread AD7six


On Aug 18, 3:46 pm, RogerM  wrote:
> I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> 1.1 to 1.3 might be a big jump.
> I have debug set to 3 and all I get on the screen is this:
>
> Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> class_registry.php on line 139
>
> What is going on?

You've got a file in the right place without that class in it.

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

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


Re: Custom setflash messages in cakephp 1.3

2010-08-18 Thread Mike Karthauser

On Wed, August 18, 2010 4:23 pm, Andras Kende wrote:
> Try this:

> controller:
>
> $this->Session->setFlash('Edited successfully', 'custom_flash',
> array('class' => 'success'));
>
>
> views/elements/custom_flash.ctp
>
> >
>   
> 
>   
> 
>
>
> css:
>
> .success {
> background-color: red;
> }


you could also use the default flash element which can handle being given
a class

eg:
 $this->Session->setFlash('Edited successfully', 'default', array('class'
=> 'success'));


> On Aug 18, 2010, at 4:37 AM, Petter Andreas Strøm wrote:
>
>> Im trying to create custom designs for setFlash messages. I've seen
>> sevral tutuorials for this, like
>> http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp
>> , but none of them seems to work for me. I've installed cake 1.3 and
>> it seems like it's looking for a element view instead of a layout
>> which i specify in the second argument in the setFlash. Anybody know
>> why? Is there any place to set where to look for the layouts for such
>> messages?
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google
>> Groups "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> at http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>


-- 
Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mi...@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel:  07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

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

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


Re: Custom setflash messages in cakephp 1.3

2010-08-18 Thread Andras Kende
Try this:


controller:

$this->Session->setFlash('Edited successfully', 'custom_flash', array('class' 
=> 'success'));


views/elements/custom_flash.ctp

>
  

  



css:

.success { 
background-color: red;
}



Andras Kende
http://www.kende.com



On Aug 18, 2010, at 4:37 AM, Petter Andreas Strøm wrote:

> Im trying to create custom designs for setFlash messages. I've seen
> sevral tutuorials for this, like
> http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp
> , but none of them seems to work for me. I've installed cake 1.3 and
> it seems like it's looking for a element view instead of a layout
> which i specify in the second argument in the setFlash. Anybody know
> why? Is there any place to set where to look for the layouts for such
> messages?
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread RogerM
Yes. I did clear out the contents of the cache folder. I just tried it
again with no luck.
Thanks,
Roger

On Aug 18, 9:35 am, Jeremy Burns | Class Outfit
 wrote:
> Have you cleared the contents of the folders in /app/tmp/cache (not the 
> folders themselves)?
>
> Jeremy Burns
> Class Outfit
>
> jeremybu...@classoutfit.comhttp://www.classoutfit.com
>
> On 18 Aug 2010, at 14:46, RogerM wrote:
>
> > I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> > 1.1 to 1.3 might be a big jump.
> > I have debug set to 3 and all I get on the screen is this:
>
> > Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> > class_registry.php on line 139
>
> > What is going on?
>
> > Thanks
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: missing submit button

2010-08-18 Thread Charles Bueche
 I shall add that I didn't touch the relevant CSS part :

input[type=submit] {
display: inline;
font-size: 110%;
width: auto;
}


On 8/18/10 16:44, Charles Bueche wrote:
> Hi,
>
> I have an app that is suddenly missing the  button on my
> "edit" form. In fact, it's there, but not displayed :
>
> ...
>  type="submit">
>
> Any reason why I get this "display: none;" ? I don't remember having
> touched the form generation, below is the code.
>
> TIA for your hints,
> Charles
>
> 
> Form->create('Message');?>
> 
>  
>  echo $this->Form->input('id');
> echo $this->Form->input('client_id');
> echo $this->Form->input('client_msg_tag');
> echo $this->Form->input('msg_type');
> echo $this->Form->input('destination');
> echo $this->Form->input('ack_desired');
> echo $this->Form->input('nack_desired');
> echo $this->Form->input('ack_text');
> echo $this->Form->input('nack_text');
> echo $this->Form->input('msgtxt');
> echo $this->Form->input('subject');
> echo $this->Form->input('random_uuid');
> echo $this->Form->input('status');
> echo $this->Form->input('workflow');
> echo $this->Form->input('flooded');
> echo $this->Form->input('errors');
> echo $this->Form->input('channel');
> ?>
> 
> Form->end(__('Submit', true));?>
> 
> 
> 
> 
>
> Html->link(__('Delete', true),
> array('action' => 'delete', $this->Form->value('Message.id')), null,
>  sprintf(__('Are you sure you want to delete # %s?', true),
> $this->Form->value('Message.id'))); ?>
> Html->link(__('List Messages', true),
> array('action' => 'index'));?>
> Html->link(__('List Clients', true),
> array('controller' => 'clients', 'action' => 'index')); ?>  i>
> Html->link(__('New Client', true),
> array('controller' => 'clients', 'action' => 'add')); ?> 
> 
> 
>
> Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>  
> You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this
> group at http://groups.google.com/group/cake-php?hl=en

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

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


missing submit button

2010-08-18 Thread Charles Bueche
 Hi,

I have an app that is suddenly missing the  button on my "edit"
form. In fact, it's there, but not displayed :

...


Any reason why I get this "display: none;" ? I don't remember having
touched the form generation, below is the code.

TIA for your hints,
Charles


Form->create('Message');?>

 
Form->input('id');
echo $this->Form->input('client_id');
echo $this->Form->input('client_msg_tag');
echo $this->Form->input('msg_type');
echo $this->Form->input('destination');
echo $this->Form->input('ack_desired');
echo $this->Form->input('nack_desired');
echo $this->Form->input('ack_text');
echo $this->Form->input('nack_text');
echo $this->Form->input('msgtxt');
echo $this->Form->input('subject');
echo $this->Form->input('random_uuid');
echo $this->Form->input('status');
echo $this->Form->input('workflow');
echo $this->Form->input('flooded');
echo $this->Form->input('errors');
echo $this->Form->input('channel');
?>

Form->end(__('Submit', true));?>





Html->link(__('Delete', true),
array('action' => 'delete', $this->Form->value('Message.id')), null,
 sprintf(__('Are you sure you want to delete # %s?', true),
$this->Form->value('Message.id'))); ?>
Html->link(__('List Messages', true),
array('action' => 'index'));?>
Html->link(__('List Clients', true),
array('controller' => 'clients', 'action' => 'index')); ?> 
Html->link(__('New Client', true),
array('controller' => 'clients', 'action' => 'add')); ?> 



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

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


Re: Class not found error on class_registry on line139

2010-08-18 Thread Jeremy Burns | Class Outfit
Have you cleared the contents of the folders in /app/tmp/cache (not the folders 
themselves)?

Jeremy Burns
Class Outfit

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

On 18 Aug 2010, at 14:46, RogerM wrote:

> I am trying to update our cakephp 1.1 app to 1.2 as I think going from
> 1.1 to 1.3 might be a big jump.
> I have debug set to 3 and all I get on the screen is this:
> 
> Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
> class_registry.php on line 139
> 
> What is going on?
> 
> Thanks
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

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

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


Re: missing controller

2010-08-18 Thread Mike Karthauser

On Wed, August 18, 2010 6:40 am, linchuanyu wrote:
> I'm totally new to cakephp
> I can get the index.php of the cakephp welcome and no error or
> warning. So I suspect all set up is ok.
>
> model: Item.php
>  create Item extends AppModel{
> var $name = 'Item';
> }
> ?>
>
> controller: Items_Controller.php
>   class ItemsController extends AppController{
>var $name = 'Items';
>var $scaffold;
>  }
> ?>
>
>
>
>
> and it always reports missing controller error:
> Missing Controller
> Error: ItemsController could not be found.
>
> Error: Create the class ItemsController below in file: app\controllers
> \items_controller.php
>
>  class ItemsController extends AppController {
>
>   var $name = 'Items';
> }
> ?>
> Notice: If you want to customize this error message, create app\views
> \errors\missing_controller.ctp
>
>
>
>
> it asks me to create the file, but I do have this file under app
> \controllers
> pls help~~~ desperate~~~

your filename should be lower case. ie items_controller.php


-- 
Mike Karthauser
Managing Director - Brightstorm Ltd

Email: mi...@brightstorm.co.uk
Web: http://www.brightstorm.co.uk
Tel:  07939 252144 (mobile)
Fax: 0870 1320560

Address: 1 Brewery Court, North Street, Bristol, BS3 1JS

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

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


Custom setflash messages in cakephp 1.3

2010-08-18 Thread Petter Andreas Strøm
Im trying to create custom designs for setFlash messages. I've seen
sevral tutuorials for this, like
http://tech.rytis.net/2008/8/27/discover-layouts-for-setflash-method-in-cakephp
, but none of them seems to work for me. I've installed cake 1.3 and
it seems like it's looking for a element view instead of a layout
which i specify in the second argument in the setFlash. Anybody know
why? Is there any place to set where to look for the layouts for such
messages?

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

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


Re: Possible to add a licenser in CakePHP?

2010-08-18 Thread Jonathan Querubina
The "informing" part must be ajax
By John Chronus



On Wed, Aug 18, 2010 at 11:15 AM, Jonathan Querubina
 wrote:
> You could set a timer in javascript, informing a php that the user is
> online, if the timer stops responding for a time specified, then, tell
> the users he's not online anymore...
> By John Chronus
>
>
>
> On Wed, Aug 18, 2010 at 11:07 AM, weilies  wrote:
>> I am planning to create a group chatware using PHP.
>> For example, user can join "Super mario" group to start discussion.
>> But if he logout or directly close the browser, how can system detect
>> he is no longer exist in the group and notify other user in the same
>> group, to remove his name from their list?
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help others 
>> with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups 
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
>> http://groups.google.com/group/cake-php?hl=en
>>
>

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

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


Class not found error on class_registry on line139

2010-08-18 Thread RogerM
I am trying to update our cakephp 1.1 app to 1.2 as I think going from
1.1 to 1.3 might be a big jump.
I have debug set to 3 and all I get on the screen is this:

Fatal error: Class 'EventContact' not found in "PATH"/cake/libs/
class_registry.php on line 139

What is going on?

Thanks

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

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


missing controller

2010-08-18 Thread linchuanyu
I'm totally new to cakephp
I can get the index.php of the cakephp welcome and no error or
warning. So I suspect all set up is ok.

model: Item.php


controller: Items_Controller.php





and it always reports missing controller error:
Missing Controller
Error: ItemsController could not be found.

Error: Create the class ItemsController below in file: app\controllers
\items_controller.php


Notice: If you want to customize this error message, create app\views
\errors\missing_controller.ctp




it asks me to create the file, but I do have this file under app
\controllers
pls help~~~ desperate~~~

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

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


Re: CakePHP 1.3 error in command: this->Html->link( $this->Html->image("cal.png") ... ,

2010-08-18 Thread Dr. Loboto
$options = $this->Html->link(
$this->Html->image("cal.png"),
'cal.png',
array(
'onClick' => "return showCalendar('".
$htmlAttributes['id'].
"', '".
$this->format.
"'); return false;",
'escape' => false
)
);

On Aug 18, 1:56 am, Tom  wrote:
> I got error in this code (cakePHP 1.3):
>
>         $options = $this->Html->link( $this->Html->image("cal.png"),
>                'cal.png',
>                array('onClick'=>"return showCalendar('".
> $htmlAttributes['id']."', '".$this->format."'); return false;"),
>                array('escape'=>false));
>
> please help me...

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

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


Routing table

2010-08-18 Thread puiumar...@gmail.com
Hi!

Is there any way to create routes from a database table?
What I mean is this: I have a table that looks like this:

id |   link  | controller |   action |
param
--
1  |  /somepage| pages | display  | p1
2  |  /some/complicated/link  | pages | display  | p2
-
where the first row (id 1) translates to:
Router::connect('/somepage', array('controller' => 'pages', 'action'
=> 'display', 'p1'));

and the second row (id 2) translates to:
Router::connect('/some/complicated/link', array('controller' =>
'pages', 'action' => 'display', 'p2'));

and so on. I want this functionality so I can easily edit my links
(for a SEO perspective).

Thanks!

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

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


Re: Auth problem

2010-08-18 Thread Hugo M
I don't know :S, seems very strange. You can log in right? (If you try
to enter a view that is not allowed by the Auth component and you are
not logged in you will be redirected).

2010/8/17 Oscar :
> Hello, I'm having problems with the Auth component it seems that the
> session get lost because, I get out every time I use the aplication,
> does someone have an idead about this problem?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: Possible to add a licenser in CakePHP?

2010-08-18 Thread Jonathan Querubina
You could set a timer in javascript, informing a php that the user is
online, if the timer stops responding for a time specified, then, tell
the users he's not online anymore...
By John Chronus



On Wed, Aug 18, 2010 at 11:07 AM, weilies  wrote:
> I am planning to create a group chatware using PHP.
> For example, user can join "Super mario" group to start discussion.
> But if he logout or directly close the browser, how can system detect
> he is no longer exist in the group and notify other user in the same
> group, to remove his name from their list?
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Possible to add a licenser in CakePHP?

2010-08-18 Thread weilies
I am planning to create a group chatware using PHP.
For example, user can join "Super mario" group to start discussion.
But if he logout or directly close the browser, how can system detect
he is no longer exist in the group and notify other user in the same
group, to remove his name from their list?

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

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


Re: Accessing variables in referenced tables in views

2010-08-18 Thread Andrew Alexander
And yes thread.php and post.php has a belongsTo User.

post.php:
var $belongsTo = array(
'Thread' => array(
'className' => 'Thread',
'foreignKey' => 'thread_id',
'conditions' => '',
'fields' => '',
'order' => ''
),
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);

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

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


Re: Accessing variables in referenced tables in views

2010-08-18 Thread Andrew Alexander
Placing "" in view.ctp gives me the error:
Notice (8): Undefined variable: threads [APP\views\threads\view.ctp,
line 1]

If I use the "$thread" variable instead, I get an array with posts and
their user_ids but not the usernames:
"Array ( [Thread] => Array ( [id] => 7 [subject] => c [user_id] => 5
[body] => c [created] => 2010-08-16 14:00:31 [modified] => 2010-08-16
14:00:31 ) [User] => Array ( [id] => 5 [username] => root [password]
=> 6abfa9223de79de9fbb2327c8c999043c2210177 [group_id] => 1 [created]
=> 2010-08-16 12:20:32 [modified] => 2010-08-16 12:20:32 ) [Post] =>
Array ( [0] => Array ( [id] => 62 [subject] => [body] => ... [created]
=> 2010-08-17 14:43:42 [modified] => 2010-08-17 14:43:42 [thread_id]
=> 7 [user_id] => 8 ) [1] => Array ( [id] => 61 [subject] => [body]
=> ... [created] => 2010-08-17 14:43:38 [modified] => 2010-08-17
14:43:38 [thread_id] => 7 [user_id] => 8 ) [2] => Array ( [id] => 60
[subject] => . [body] => . [created] => 2010-08-17 14:43:34 [modified]
=> 2010-08-17 14:43:34 [thread_id] => 7 [user_id] => 8 ) ) ) "

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

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


Re: vendors css

2010-08-18 Thread AD7six


On Aug 18, 12:12 pm, "s...@m"  wrote:
> Hello,
> I was updating my Cakephp application from 1.2 to 1.3 and got into a
> compatibility problem.
>
> The Cookbook says:
> vendors/css, vendors/js, and vendors/img
> Support for these three directories, both in app/vendors as well as
> plugin/vendors has been removed. They have been replaced with plugin
> and theme webroot directories.
>
> Now here's my problem: I have in the app/vendor directory all my css
> and js, which I use in all my cake websites and I want these files to
> be shared among all the websites. That's why I used to have a unique
> vendor folder that was soft-linked in every application app folder.
> But now it isn't supported anymore.
>
> Does anybody  know how to get this feature back on, but (here's the
> challenge) without editing the cake core libs ?
> Thanks

Either
 move over to using theme support
Or
 route /css /js and /img to a controller that'll handle serving (and|
or storing to your webroot) missing assets

hth,

AD

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

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


vendors css

2010-08-18 Thread s...@m
Hello,
I was updating my Cakephp application from 1.2 to 1.3 and got into a
compatibility problem.

The Cookbook says:
vendors/css, vendors/js, and vendors/img
Support for these three directories, both in app/vendors as well as
plugin/vendors has been removed. They have been replaced with plugin
and theme webroot directories.

Now here's my problem: I have in the app/vendor directory all my css
and js, which I use in all my cake websites and I want these files to
be shared among all the websites. That's why I used to have a unique
vendor folder that was soft-linked in every application app folder.
But now it isn't supported anymore.

Does anybody  know how to get this feature back on, but (here's the
challenge) without editing the cake core libs ?
Thanks

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

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