Re: Cake 1.3 + CSS + Firefox Issues

2010-05-01 Thread Mateo San Román
http://i855.photobucket.com/albums/ab117/mateosanroman/screenshot.png

Standard baked view, untouched.
No extra CSS or JS added.
If I remove the "ads" class from the container, everything is fixed.

Same on add/edit view.

Thanks,


On 2 mayo, 01:17, John Andersen  wrote:
> Please provide more informations, such as the CSS code that is
> applied, the HTML code as it looks in FF, and whatever other code that
> you deem necessary for us to assist you in clarifying the issue :)
> Enjoy,
>    John
>
> On May 2, 8:44 am, Mateo San Román  wrote:
>
>
>
> > Hello,
>
> >   I've created a baked view for a controller; when I open it with IE8
> > or Chrome, all view data is shown, but if I open it in Firefox the
> > first CSS class applied (same name as controller) renders the data
> > container hidden.
>
> > Is there any way (besides deleting) to avoid this behavior?
>
> > Best regards
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: Cake 1.3 + CSS + Firefox Issues

2010-05-01 Thread Mateo San Román
http://i855.photobucket.com/albums/ab117/mateosanroman/screenshot.png

Standard baked view, untouched.
No extra CSS or JS added.
If I remove the "ads" class from the container, everything is fixed.

Same on add/edit view.

Thanks,


On 2 mayo, 01:17, John Andersen  wrote:
> Please provide more informations, such as the CSS code that is
> applied, the HTML code as it looks in FF, and whatever other code that
> you deem necessary for us to assist you in clarifying the issue :)
> Enjoy,
>    John
>
> On May 2, 8:44 am, Mateo San Román  wrote:
>
>
>
> > Hello,
>
> >   I've created a baked view for a controller; when I open it with IE8
> > or Chrome, all view data is shown, but if I open it in Firefox the
> > first CSS class applied (same name as controller) renders the data
> > container hidden.
>
> > Is there any way (besides deleting) to avoid this behavior?
>
> > Best regards
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> athttp://groups.google.com/group/cake-php?hl=en

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

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


Re: Cake 1.3 + CSS + Firefox Issues

2010-05-01 Thread John Andersen
Please provide more informations, such as the CSS code that is
applied, the HTML code as it looks in FF, and whatever other code that
you deem necessary for us to assist you in clarifying the issue :)
Enjoy,
   John

On May 2, 8:44 am, Mateo San Román  wrote:
> Hello,
>
>   I've created a baked view for a controller; when I open it with IE8
> or Chrome, all view data is shown, but if I open it in Firefox the
> first CSS class applied (same name as controller) renders the data
> container hidden.
>
> Is there any way (besides deleting) to avoid this behavior?
>
> Best regards
>
> 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


Cake 1.3 + CSS + Firefox Issues

2010-05-01 Thread Mateo San Román
Hello,

  I've created a baked view for a controller; when I open it with IE8
or Chrome, all view data is shown, but if I open it in Firefox the
first CSS class applied (same name as controller) renders the data
container hidden.

Is there any way (besides deleting) to avoid this behavior?

Best regards

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

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


Re: how to access dynamically created tables at runtime

2010-05-01 Thread Dr. Loboto
Cake rely on its caches and "do not see" fresh table for current
config. Plus when debug=0 it do not refresh cache on next request so
"re-run request" helps only with debug > 0.

In Cake 1.2 you can manually clear config tables cache like this:

function createTable($create) {
$this->query($create);  // $create if your CREATE TABLE query
$dataSource = ConnectionManager::getDataSource($config);  // $config
is your DB config name, like 'default'
if (!$dataSource->error) {
// CREATE TABLE success
$key = 
ConnectionManager::getSourceName($dataSource).'_'.$dataSource-
>config['database'].'_list';
$key = preg_replace('/[^A-Za-z0-9_\-.+]/', '_', $key);
Cache::delete($key, '_cake_model_');  // clear DB config cache 
(list
of tables)
$dataSource->sources(true);  // reload db config (populate list 
of
tables from DB)
return true;
}
// CREATE TABLE fail
return false;
}

Will not work in Cake 1.3

On May 1, 12:07 pm, etipaced  wrote:
> I am creating an "artificial temp table" dynamically during a single
> page request and need to be able to instantiate a model object using
> this table so I can CRUD it. All of this needs to happen during a
> single page call (i.e. no postback or redirects between table creation
> and model instantiation).
>
> I keep getting "database table for model was not found". The bottom
> line is that Cake is not getting refreshed with the newly added table
> so there's no knowledge of it inside the framework. I proved this by
> manually entering the table name in the ClassRegistry::init() call
> (normally the table name is assigned by variable because the table
> name is dynamically generated, etc.), and then re-running the request
> works no problem.
>
> Answering the obvious, I'm only trying to do this because using
> standard MySQL temp tables don't work in Cake as expected. In other
> words, I can't instantiate a model object using the temp table.
>
> Apparently, there must be some routine which "refreshes" or updates
> the available database tables. Any insight on this is appreciated!
>
> 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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread Jamie


On May 1, 1:21 pm, AD7six  wrote:
> On May 1, 10:19 pm, Jamie  wrote:
>
>
>
>
>
> > On May 1, 1:17 pm, AD7six  wrote:
>
> > > On May 1, 10:13 pm, Jamie  wrote:
>
> > > > On May 1, 12:46 pm, AD7six  wrote:
>
> > > > > On May 1, 9:36 pm, Jamie  wrote:
>
> > > > > > I read the whole thread. I'm not sure how that changes my post.
>
> > > > > > I was just explaining to the original poster why subfolders didn't
> > > > > > automatically work
>
> > > > > I would suggest you try and don't assume.
>
> > > > > > , why there's no easy way to make them work, and why
> > > > > > they work in other frameworks/code designs. Please explain to me the
> > > > > > problem you have with my post and maybe we can do something
> > > > > > constructive.
>
> > > > > > Seriously, what is with you throwing out these sarcastic comments
> > > > > > lately? I can pick out more than a few examples over the past little
> > > > > > while. Between you and Miles this group is getting a bit hostile.
>
> > > > > I'm not being sarcastic - I'm giving you the opportunity to correct
> > > > > your mistake. If you /still/ can't see it - try exactly what you've
> > > > > said doesn't work before replying.
>
> > > > Fine. Thanks for the opportunity. Glad you're looking out for me. I
> > > > made this file:
>
> > > > controllers/test/users.php
>
> > > I see. so you feel that by demonstrating your own example which has
> > > nothing to do with this thread and is based on a different framework
> > > (since you don't follow a single convention) that somehow makes your
> > > reply right?
>
> > You told me to try what I said wouldn't work. And I did. Then I shared
> > the results.
>
> > I sense that this isn't going anywhere. Thanks for hijacking my
> > response...
>
> Jamie you're taking this out of context and personal and I doubt
> anyone else in this thread is really interested in your example.
>
> This is what I expected you to do
>
> mv controllers/anything_controller.php controllers/any/subfolder/you/
> like
>
> firefoxhttp://mysite/anything
>
> and marvel at the wonder of a page that isn't a 404.
>
> GN

Maybe the original poster is used to following PEAR conventions. Who
knows? Why not give the benefit of the doubt? More importantly, why
not let others respond to the original poster without interjection? I
was just trying to offer a possible explanation in case he was indeed
expecting Cake to respect the PEAR naming style. I'm not sure why that
bothered you.

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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread AD7six


On May 1, 10:19 pm, Jamie  wrote:
> On May 1, 1:17 pm, AD7six  wrote:
>
>
>
> > On May 1, 10:13 pm, Jamie  wrote:
>
> > > On May 1, 12:46 pm, AD7six  wrote:
>
> > > > On May 1, 9:36 pm, Jamie  wrote:
>
> > > > > I read the whole thread. I'm not sure how that changes my post.
>
> > > > > I was just explaining to the original poster why subfolders didn't
> > > > > automatically work
>
> > > > I would suggest you try and don't assume.
>
> > > > > , why there's no easy way to make them work, and why
> > > > > they work in other frameworks/code designs. Please explain to me the
> > > > > problem you have with my post and maybe we can do something
> > > > > constructive.
>
> > > > > Seriously, what is with you throwing out these sarcastic comments
> > > > > lately? I can pick out more than a few examples over the past little
> > > > > while. Between you and Miles this group is getting a bit hostile.
>
> > > > I'm not being sarcastic - I'm giving you the opportunity to correct
> > > > your mistake. If you /still/ can't see it - try exactly what you've
> > > > said doesn't work before replying.
>
> > > Fine. Thanks for the opportunity. Glad you're looking out for me. I
> > > made this file:
>
> > > controllers/test/users.php
>
> > I see. so you feel that by demonstrating your own example which has
> > nothing to do with this thread and is based on a different framework
> > (since you don't follow a single convention) that somehow makes your
> > reply right?
>
> You told me to try what I said wouldn't work. And I did. Then I shared
> the results.
>
> I sense that this isn't going anywhere. Thanks for hijacking my
> response...

Jamie you're taking this out of context and personal and I doubt
anyone else in this thread is really interested in your example.

This is what I expected you to do

mv controllers/anything_controller.php controllers/any/subfolder/you/
like

firefox http://mysite/anything

and marvel at the wonder of a page that isn't a 404.

GN

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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread Jamie


On May 1, 1:17 pm, AD7six  wrote:
> On May 1, 10:13 pm, Jamie  wrote:
>
>
>
>
>
> > On May 1, 12:46 pm, AD7six  wrote:
>
> > > On May 1, 9:36 pm, Jamie  wrote:
>
> > > > I read the whole thread. I'm not sure how that changes my post.
>
> > > > I was just explaining to the original poster why subfolders didn't
> > > > automatically work
>
> > > I would suggest you try and don't assume.
>
> > > > , why there's no easy way to make them work, and why
> > > > they work in other frameworks/code designs. Please explain to me the
> > > > problem you have with my post and maybe we can do something
> > > > constructive.
>
> > > > Seriously, what is with you throwing out these sarcastic comments
> > > > lately? I can pick out more than a few examples over the past little
> > > > while. Between you and Miles this group is getting a bit hostile.
>
> > > I'm not being sarcastic - I'm giving you the opportunity to correct
> > > your mistake. If you /still/ can't see it - try exactly what you've
> > > said doesn't work before replying.
>
> > Fine. Thanks for the opportunity. Glad you're looking out for me. I
> > made this file:
>
> > controllers/test/users.php
>
> I see. so you feel that by demonstrating your own example which has
> nothing to do with this thread and is based on a different framework
> (since you don't follow a single convention) that somehow makes your
> reply right?

You told me to try what I said wouldn't work. And I did. Then I shared
the results.

I sense that this isn't going anywhere. Thanks for hijacking my
response...

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: Webpage not finding webroot

2010-05-01 Thread Sam Sherlock
you can revisit the clean urls later and switch back to that in core.php
rewritebase seems to help but I am not sure if that will work for you. the
comments on the urls I sent you suggest that IIS needs extensive alteration


as for login and admin
the login is here
http://www.softwaresolutionsni.co.uk/newSite/index.php/users/login
 
hth - S



On 1 May 2010 21:09, WhyNotSmile  wrote:

> Thanks for the help.
>
> IIS is the problem.  I've uncommented the line
>Configure::write('App.baseUrl', env('SCRIPT_NAME'));
> in core.php, and with a couple of other tweaks, the site is now
> showing up at last!  The urls aren't pretty, but that's not a huge
> issue... the only thing is that I can't figure out how to get to the
> admin area now!
>
> If anyone can advise me 1) how to get the pretty urls working, or 2)
> how to get to my admin area, that'd be great!
>
> Thanks!
> Sharon
>
>
>
> On 1 May, 20:26, Sam Sherlock  wrote:
> > mod rwite is not working on the server or is not set correctly
> >
> > http://www.softwaresolutionsni.co.uk/newSite/pages/11- error 404
> >
> >  I don't use IIS but as far as I understand some have found a few tweaks
> > need to   be made to get IIS to work
> >
> > anyway as I say I don't use IIS but there are comments in those links
> from
> > people who are using cake & IIS
> >
> > in the config/core.php file you can set cake internal url rewrite as an
> > alternative
> >
> > - S
> >
> > On 1 May 2010 19:51, Andrei Mita  wrote:
> >
> >
> >
> > > mod_rewrite is on?
> >
> > > On Sat, May 1, 2010 at 9:23 PM, Sam Sherlock  >wrote:
> >
> > >> I think this is due to serving from IIS
> >
> > >>http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite.
> ..
> > >>http://bakery.cakephp.org/articles/view/cakephp-on-iis<
> http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite...>
> > >>  http://book.cakephp.org/comments/37
> >
> > >> On 1 May 2010 19:11, WhyNotSmile 
> wrote:
> >
> > >>> I have a site (in 1.2) which I have uploaded, but which seems to be
> > >>> unable to find its own webroot.
> >
> > >>> The content from the database is fine, but I am getting the following
> > >>> errors:
> >
> > >>> 1. Not finding images, javascript or css.  However, it finds them ok
> > >>> if I put them at the same level as 'app' and 'cake'.
> >
> > >>> 2. Not finding any page other than the home page.  If I click on any
> > >>> of the links to the rest of the site, I get 'The page cannot be
> > >>> found'.
> >
> > >>> All of this works fine on the localhost.
> >
> > >>> I'd appreciate if anyone could point me in the right direction.  The
> > >>> error dump and error logs aren't showing anything up.
> >
> > >>> The site iswww.softwaresolutionsni.co.uk/newSite
> >
> > >>> I did have it atwww.softwaresolutionsni.co.uk, but had exactly the
> > >>> same problems, so I don't think the subfolder is the problem.
> >
> > >>> Can anyone help?
> >
> > >>> Thanks!
> > >>> Sharon
> >
> > >>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > >>> others with their CakePHP related questions.
> >
> > >>> You received this message because you are subscribed to the Google
> Groups
> > >>> "CakePHP" group.
> > >>> To post to this group, send email to cake-php@googlegroups.com
> > >>> To unsubscribe from this group, send email to
> > >>> cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >>>http://groups.google.com/group/cake-php?hl=en
> >
> > >>  Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > >> others with their CakePHP related questions.
> >
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "CakePHP" group.
> > >> To post to this group, send email to cake-php@googlegroups.com
> > >> To unsubscribe from this group, send email to
> > >> cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >>http://groups.google.com/group/cake-php?hl=en
> >
> > >  Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > > others with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com
> >For
> more options, visit this group at
> > >http://groups.google.com/group/cake-php?hl=en
> >
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> with their CakePHP related questions.
> >
> > You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en

Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread AD7six


On May 1, 10:13 pm, Jamie  wrote:
> On May 1, 12:46 pm, AD7six  wrote:
>
>
>
> > On May 1, 9:36 pm, Jamie  wrote:
>
> > > I read the whole thread. I'm not sure how that changes my post.
>
> > > I was just explaining to the original poster why subfolders didn't
> > > automatically work
>
> > I would suggest you try and don't assume.
>
> > > , why there's no easy way to make them work, and why
> > > they work in other frameworks/code designs. Please explain to me the
> > > problem you have with my post and maybe we can do something
> > > constructive.
>
> > > Seriously, what is with you throwing out these sarcastic comments
> > > lately? I can pick out more than a few examples over the past little
> > > while. Between you and Miles this group is getting a bit hostile.
>
> > I'm not being sarcastic - I'm giving you the opportunity to correct
> > your mistake. If you /still/ can't see it - try exactly what you've
> > said doesn't work before replying.
>
> Fine. Thanks for the opportunity. Glad you're looking out for me. I
> made this file:
>
> controllers/test/users.php

I see. so you feel that by demonstrating your own example which has
nothing to do with this thread and is based on a different framework
(since you don't follow a single convention) that somehow makes your
reply right?

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

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


Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread AD7six
On May 1, 9:46 pm, AD7six  wrote:
> On May 1, 9:36 pm, Jamie  wrote:
>
> > I read the whole thread. I'm not sure how that changes my post.
>
> > I was just explaining to the original poster why subfolders didn't
> > automatically work
>
> I would suggest you try and don't assume.
>
> > , why there's no easy way to make them work, and why
> > they work in other frameworks/code designs. Please explain to me the
> > problem you have with my post and maybe we can do something
> > constructive.
>
> > Seriously, what is with you throwing out these sarcastic comments
> > lately? I can pick out more than a few examples over the past little
> > while. Between you and Miles this group is getting a bit hostile.
>
> I'm not being sarcastic - I'm giving you the opportunity to correct
> your mistake. If you /still/ can't see it - try exactly what you've
> said doesn't work before replying.
>
> AD

Also,

Bear in mind that Mathew is obviously new and I suspect doesn't
actually want his controllers in subfolders at all ("It doesn't appear
to be finding controllers recursively which doesn't make sense because
they are **supposed to be in sub-folders**. ")

I apologise if you find my manner abrupt - I'm not going to spoon feed
people answers that they should be able to figure out for themselves.

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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread Jamie


On May 1, 12:46 pm, AD7six  wrote:
> On May 1, 9:36 pm, Jamie  wrote:
>
> > I read the whole thread. I'm not sure how that changes my post.
>
> > I was just explaining to the original poster why subfolders didn't
> > automatically work
>
> I would suggest you try and don't assume.
>
> > , why there's no easy way to make them work, and why
> > they work in other frameworks/code designs. Please explain to me the
> > problem you have with my post and maybe we can do something
> > constructive.
>
> > Seriously, what is with you throwing out these sarcastic comments
> > lately? I can pick out more than a few examples over the past little
> > while. Between you and Miles this group is getting a bit hostile.
>
> I'm not being sarcastic - I'm giving you the opportunity to correct
> your mistake. If you /still/ can't see it - try exactly what you've
> said doesn't work before replying.

Fine. Thanks for the opportunity. Glad you're looking out for me. I
made this file:

controllers/test/users.php

And put in this class:

Controllers_Test_Users

And then tried this in AppController::beforeRender:

$test = new Controllers_Test_Users();

And here's what happened:

Fatal error: Class 'Controllers_Test_Users' not found in /Applications/
MAMP/trunk_app/app/app_controller.php on line 5

What a surprise. Oh wait, it's not a surprise.

You can make that naming convention work by adding a simple __autoload
function, just like you'd do in the Zend Framework, but that breaks
most of the Cake class loading since they don't follow the
convention... which was my original point.

I hope what you're pointing out that I'm missing is really obvious,
because I don't see it. Maybe you should just spell it out?

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: Webpage not finding webroot

2010-05-01 Thread WhyNotSmile
Thanks for the help.

IIS is the problem.  I've uncommented the line
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
in core.php, and with a couple of other tweaks, the site is now
showing up at last!  The urls aren't pretty, but that's not a huge
issue... the only thing is that I can't figure out how to get to the
admin area now!

If anyone can advise me 1) how to get the pretty urls working, or 2)
how to get to my admin area, that'd be great!

Thanks!
Sharon



On 1 May, 20:26, Sam Sherlock  wrote:
> mod rwite is not working on the server or is not set correctly
>
> http://www.softwaresolutionsni.co.uk/newSite/pages/11- error 404
>
>  I don't use IIS but as far as I understand some have found a few tweaks
> need to   be made to get IIS to work
>
> anyway as I say I don't use IIS but there are comments in those links from
> people who are using cake & IIS
>
> in the config/core.php file you can set cake internal url rewrite as an
> alternative
>
> - S
>
> On 1 May 2010 19:51, Andrei Mita  wrote:
>
>
>
> > mod_rewrite is on?
>
> > On Sat, May 1, 2010 at 9:23 PM, Sam Sherlock wrote:
>
> >> I think this is due to serving from IIS
>
> >>http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite...
> >>http://bakery.cakephp.org/articles/view/cakephp-on-iis
> >>  http://book.cakephp.org/comments/37
>
> >> On 1 May 2010 19:11, WhyNotSmile  wrote:
>
> >>> I have a site (in 1.2) which I have uploaded, but which seems to be
> >>> unable to find its own webroot.
>
> >>> The content from the database is fine, but I am getting the following
> >>> errors:
>
> >>> 1. Not finding images, javascript or css.  However, it finds them ok
> >>> if I put them at the same level as 'app' and 'cake'.
>
> >>> 2. Not finding any page other than the home page.  If I click on any
> >>> of the links to the rest of the site, I get 'The page cannot be
> >>> found'.
>
> >>> All of this works fine on the localhost.
>
> >>> I'd appreciate if anyone could point me in the right direction.  The
> >>> error dump and error logs aren't showing anything up.
>
> >>> The site iswww.softwaresolutionsni.co.uk/newSite
>
> >>> I did have it atwww.softwaresolutionsni.co.uk, but had exactly the
> >>> same problems, so I don't think the subfolder is the problem.
>
> >>> Can anyone help?
>
> >>> Thanks!
> >>> Sharon
>
> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> >>> others with their CakePHP related questions.
>
> >>> You received this message because you are subscribed to the Google Groups
> >>> "CakePHP" group.
> >>> To post to this group, send email to cake-php@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> cake-php+unsubscr...@googlegroups.comFor
> >>>  more options, visit this group at
> >>>http://groups.google.com/group/cake-php?hl=en
>
> >>  Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> >> others with their CakePHP related questions.
>
> >> You received this message because you are subscribed to the Google Groups
> >> "CakePHP" group.
> >> To post to this group, send email to cake-php@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> cake-php+unsubscr...@googlegroups.comFor
> >>  more options, visit this group at
> >>http://groups.google.com/group/cake-php?hl=en
>
> >  Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> > others with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.comFor
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with 
> their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread AD7six


On May 1, 9:36 pm, Jamie  wrote:
> I read the whole thread. I'm not sure how that changes my post.
>
> I was just explaining to the original poster why subfolders didn't
> automatically work

I would suggest you try and don't assume.

> , why there's no easy way to make them work, and why
> they work in other frameworks/code designs. Please explain to me the
> problem you have with my post and maybe we can do something
> constructive.
>
> Seriously, what is with you throwing out these sarcastic comments
> lately? I can pick out more than a few examples over the past little
> while. Between you and Miles this group is getting a bit hostile.

I'm not being sarcastic - I'm giving you the opportunity to correct
your mistake. If you /still/ can't see it - try exactly what you've
said doesn't work before replying.

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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread Jamie
I read the whole thread. I'm not sure how that changes my post.

I was just explaining to the original poster why subfolders didn't
automatically work, why there's no easy way to make them work, and why
they work in other frameworks/code designs. Please explain to me the
problem you have with my post and maybe we can do something
constructive.

Seriously, what is with you throwing out these sarcastic comments
lately? I can pick out more than a few examples over the past little
while. Between you and Miles this group is getting a bit hostile.

On May 1, 12:21 pm, AD7six  wrote:
> On May 1, 9:12 pm, Jamie  wrote:
>
> > Because Cake doesn't follow the Zend/PEAR class naming convention, the
> > only way to make subfolders work, really, is by manually adding each
> > subfolder's path with App::build. Because class and file names don't
> > match up and don't follow a pattern, there's no 'regular' Cake class
> > name/path and hence no way for the core to know if you're adding
> > subfolders.
>
> Perhaps you forgot to read the whole thread.
>
> 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: Webpage not finding webroot

2010-05-01 Thread Sam Sherlock
mod rwite is not working on the server or is not set correctly

http://www.softwaresolutionsni.co.uk/newSite/pages/11 - error 404

 I don't use IIS but as far as I understand some have found a few tweaks
need to   be made to get IIS to work

anyway as I say I don't use IIS but there are comments in those links from
people who are using cake & IIS

in the config/core.php file you can set cake internal url rewrite as an
alternative

- S



On 1 May 2010 19:51, Andrei Mita  wrote:

> mod_rewrite is on?
>
>
>
> On Sat, May 1, 2010 at 9:23 PM, Sam Sherlock wrote:
>
>> I think this is due to serving from IIS
>>
>>
>> http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite-on-iis
>> http://bakery.cakephp.org/articles/view/cakephp-on-iis
>>  http://book.cakephp.org/comments/37
>>
>>
>> On 1 May 2010 19:11, WhyNotSmile  wrote:
>>
>>> I have a site (in 1.2) which I have uploaded, but which seems to be
>>> unable to find its own webroot.
>>>
>>> The content from the database is fine, but I am getting the following
>>> errors:
>>>
>>> 1. Not finding images, javascript or css.  However, it finds them ok
>>> if I put them at the same level as 'app' and 'cake'.
>>>
>>> 2. Not finding any page other than the home page.  If I click on any
>>> of the links to the rest of the site, I get 'The page cannot be
>>> found'.
>>>
>>> All of this works fine on the localhost.
>>>
>>> I'd appreciate if anyone could point me in the right direction.  The
>>> error dump and error logs aren't showing anything up.
>>>
>>> The site is www.softwaresolutionsni.co.uk/newSite
>>>
>>> I did have it at www.softwaresolutionsni.co.uk, but had exactly the
>>> same problems, so I don't think the subfolder is the problem.
>>>
>>> Can anyone help?
>>>
>>> Thanks!
>>> Sharon
>>>
>>> Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.comFor
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread AD7six


On May 1, 9:12 pm, Jamie  wrote:
> Because Cake doesn't follow the Zend/PEAR class naming convention, the
> only way to make subfolders work, really, is by manually adding each
> subfolder's path with App::build. Because class and file names don't
> match up and don't follow a pattern, there's no 'regular' Cake class
> name/path and hence no way for the core to know if you're adding
> subfolders.

Perhaps you forgot to read the whole thread.

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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread Jamie
Because Cake doesn't follow the Zend/PEAR class naming convention, the
only way to make subfolders work, really, is by manually adding each
subfolder's path with App::build. Because class and file names don't
match up and don't follow a pattern, there's no 'regular' Cake class
name/path and hence no way for the core to know if you're adding
subfolders.

To be honest I'd love it if the Cake classes followed the Zend
convention and used underlines in class names to represents
subfolders. Then instead of having a "controllers/
users_controller.php" file for the UsersController class, we'd have
"controller/users.php" with the "Controller_Users" class. Then
subfolders would be a kick in the pants - "controller/user/group.php"
for Controller_User_Group, etc. But that's just my wishful
thinking. ;)

- Jamie

On Apr 29, 7:38 am, Matthew  wrote:
> Here is my basic file structure
>
> app/controllers ->
>                      /categories/categories_controller.php
>                      /news/news_controller.php
>                      /users/users_controller.php
>
> First attempt (default controller paths):
> $controllerClasses = App::objects('controller');
> debug($controllerClasses);
>
> Result:
> Array
> (
>     [0] => Pages
>     [1] => App
> )
>
> (These are found in cake/libs/controller)
>
> Second attempt (passing controller paths):
>
> $App =& App::getInstance();
> $paths = $App->controllers;
> debug($paths);
>
> $controllerClasses = $App->objects('controller',$paths);
> debug($controllerClasses);
>
> Result:
> Array
> (
>     [0] => /home/pokey/public_html/cakephp/app/controllers/
>     [1] => /home/pokey/public_html/cakephp/app/
>     [2] => /home/pokey/public_html/cakephp/cake/libs/controller/
> )
>
> Array
> (
>     [0] => Pages
>     [1] => App
> )
>
> It doesn't appear to be finding controllers recursively which doesn't
> make sense because they are supposed to be in sub-folders.
>
> 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: Webpage not finding webroot

2010-05-01 Thread Andrei Mita
mod_rewrite is on?


On Sat, May 1, 2010 at 9:23 PM, Sam Sherlock  wrote:

> I think this is due to serving from IIS
>
>
> http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite-on-iis
> http://bakery.cakephp.org/articles/view/cakephp-on-iis
>  http://book.cakephp.org/comments/37
>
>
> On 1 May 2010 19:11, WhyNotSmile  wrote:
>
>> I have a site (in 1.2) which I have uploaded, but which seems to be
>> unable to find its own webroot.
>>
>> The content from the database is fine, but I am getting the following
>> errors:
>>
>> 1. Not finding images, javascript or css.  However, it finds them ok
>> if I put them at the same level as 'app' and 'cake'.
>>
>> 2. Not finding any page other than the home page.  If I click on any
>> of the links to the rest of the site, I get 'The page cannot be
>> found'.
>>
>> All of this works fine on the localhost.
>>
>> I'd appreciate if anyone could point me in the right direction.  The
>> error dump and error logs aren't showing anything up.
>>
>> The site is www.softwaresolutionsni.co.uk/newSite
>>
>> I did have it at www.softwaresolutionsni.co.uk, but had exactly the
>> same problems, so I don't think the subfolder is the problem.
>>
>> Can anyone help?
>>
>> Thanks!
>> Sharon
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

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

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


Re: Webpage not finding webroot

2010-05-01 Thread Sam Sherlock
I think this is due to serving from IIS

http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite-on-iis
http://bakery.cakephp.org/articles/view/cakephp-on-iis
http://book.cakephp.org/comments/37


On 1 May 2010 19:11, WhyNotSmile  wrote:

> I have a site (in 1.2) which I have uploaded, but which seems to be
> unable to find its own webroot.
>
> The content from the database is fine, but I am getting the following
> errors:
>
> 1. Not finding images, javascript or css.  However, it finds them ok
> if I put them at the same level as 'app' and 'cake'.
>
> 2. Not finding any page other than the home page.  If I click on any
> of the links to the rest of the site, I get 'The page cannot be
> found'.
>
> All of this works fine on the localhost.
>
> I'd appreciate if anyone could point me in the right direction.  The
> error dump and error logs aren't showing anything up.
>
> The site is www.softwaresolutionsni.co.uk/newSite
>
> I did have it at www.softwaresolutionsni.co.uk, but had exactly the
> same problems, so I don't think the subfolder is the problem.
>
> Can anyone help?
>
> Thanks!
> Sharon
>
> 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


Webpage not finding webroot

2010-05-01 Thread WhyNotSmile
I have a site (in 1.2) which I have uploaded, but which seems to be
unable to find its own webroot.

The content from the database is fine, but I am getting the following
errors:

1. Not finding images, javascript or css.  However, it finds them ok
if I put them at the same level as 'app' and 'cake'.

2. Not finding any page other than the home page.  If I click on any
of the links to the rest of the site, I get 'The page cannot be
found'.

All of this works fine on the localhost.

I'd appreciate if anyone could point me in the right direction.  The
error dump and error logs aren't showing anything up.

The site is www.softwaresolutionsni.co.uk/newSite

I did have it at www.softwaresolutionsni.co.uk, but had exactly the
same problems, so I don't think the subfolder is the problem.

Can anyone help?

Thanks!
Sharon

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: Updating user values in Auth component

2010-05-01 Thread WhyNotSmile
Thanks to both of you.  That's helpful.



On 28 Apr, 20:08, Miles J  wrote:
> I prefer this method:
>
> http://www.milesj.me/blog/read/31/Refreshing-The-Auths-Session
>
> On Apr 28, 9:22 am, John Andersen  wrote:
>
>
>
> > Without changing anything in the Auth component, I do think that you
> > could redo the login of the current user, when you have updated the
> > users information - for example:
>
> > [code]
> > $this->Auth->login( $this->Auth->user() );
> > [/code]
>
> > That should update the user information in the Auth session key.
> > I haven't tested it, but give it a try :)
> > Enjoy,
> >    John
>
> > Ps. the only issue I could see, is that the password may not be
> > available!
>
> > On Apr 28, 5:16 pm, WhyNotSmile 
> > wrote:
>
> > > I'm using the built-in Auth component with CakePHP.  In part of my
> > > site, I allow my user to update their details (e.g. email address).
> > > When I then retrieve the user information from the Auth component
> > > (using $this->Auth->user()), the details are still the old ones.
>
> > > Is there a way to update the values in the Auth component?  I know
> > > that the fact I have a problem with this indicates that I'm probably
> > > doing it wrong, so I'm going to change the way it's finding the data,
> > > but I'm just curious as to whether the Auth values can be changed.
>
> > > Thanks
>
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelpothers 
> > > with their CakePHP related questions.
>
> > > You received this message because you are subscribed to the Google Groups 
> > > "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > > athttp://groups.google.com/group/cake-php?hl=en
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions 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: Defining constants like APP for use in javascript

2010-05-01 Thread euromark
almost^^

my baseurl always has a slash at the end
so it might be
$.getJSON(baseurl + "path/myson.json", function(json) ...



On 1 Mai, 16:35, fly2279  wrote:
> Thank you!
>
> On May 1, 9:06 am, AD7six  wrote:
>
>
>
> > On May 1, 3:22 pm, fly2279  wrote:
>
> > > Andy, thanks for the quick response. I guess what I'm trying to do is
> > > include an absolute path that is relative to the app's path. For
> > > example:
>
> > > $.getJSON("/path/myson.json", function(json) {
> > >   // code here
>
> > > });
>
> > > What if the app is installed in a subdirectory? Then I'd have to put "/
> > > subdir/path/myson.json". How do I keep the code flexible without
> > > having to change it for each install?
>
> > If you included the js file  I linked to (and were using jquery) it'd
> > be:
>
> > $.getJSON($.url("/path/myson.json"), function(json) {
> >    // code here
> >  });
>
> > If you used euromarks example it'd be:
>
> > // baseurl is a global var set in your layout in a script tag
> > $.getJSON(baseurl + "/path/myson.json", function(json) {
> >    // code here
> >  });
>
> > They both achieve the same thing. Do whatever works and you're most
> > comfortable with.
>
> > hth,
>
> > AD
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions 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: v1.3 App::Objects not finding controllers in app/controllers/subfolders

2010-05-01 Thread gremlin
Also *I* sometimes want my controllers in sub-folders as an easy way
to use the File / Folder classes and folder locations to act as a
quick way to generate a filtered list of controllers. I have one
project with simple controllers in a widgets folder that all inherit
from a different parent controller than usual. Some parts of that app
list only the controllers in that folder as menu items/options
(Folder, Inflector, and App::build and class introspection for the
win). When I add a new module and put it in the right place with the
right docblock I don't have to worry about those rather critical menus
or synching what isn't application data with any databases.

Also just because you were told something once by a cake dev in the
past doesn't mean a) that they were right, or interested in explaining
something to you at the time or b) that the framework doesn't *now*
support the feature - either way you were wrong and rude about it.

On Apr 30, 10:24 am, Miles J  wrote:
> When I asked about controllers in sub-folders, the Cake devs told me
> to just use plugins -.-
>
> Sure there are ways around it, but I am repeating what I was told.
>
> On Apr 30, 12:38 am, AD7six  wrote:
>
>
>
> > Matthew,
>
> > They aren't /supposed/ to be in subfolders - please run through (I.e.
> > don't just read) the blog tutorial and try with a browser.
>
> > On Apr 29, 7:12 pm, Miles J  wrote:
>
> > > Well its simple. You cant put controllers within subfolders. Cake
> > > doesn't support it.
>
> > Miles,
>
> > You're doing that my-assumptions = fact thing again.
>
> >http://book.cakephp.org/view/530/Importing-Core-Libs(it'sexactly the
> > same for any type).
>
> > If your intention is to learn by stating your opinion until someone
> > points out your wrong (which is exactly how I learn most things) -
> > please clarify.
>
> > AD
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions 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: 1.3.0

2010-05-01 Thread mark_story
Odd, the .htaccess file is in the repository.  If you move the files
in some GUI's like Finder you will often loose hidden files.

-Mark

On Apr 30, 12:42 pm, parsifal  wrote:
> I'm very excited that 1.3.0 is out. Great work, all.
>
> I did notice a couple problems, though. One semi-major, one graphical:
>
> 1. The $ROOT/.htaccess file is missing. I was able to copy it from
> 1.2.7, and everything worked. It looks like this:
>
> 
>     RewriteEngine on
>     RewriteRule    ^$ app/webroot/    [L]
>     RewriteRule    (.*) app/webroot/$1 [L]
> 
>
> 2. The "box" image for CakePHP, adjacent to the "Download 1.3" link,
> still reads "1.2".
>
> 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: DebugKit

2010-05-01 Thread Sam Sherlock
have you got debug set to 2, thats when cake outputs sql

and log file output in the log tab

see whats in prev-requests too

it helps keep external protein in place (less nail biting moments and far
fewer hail pulling moments also)


not to mention Matt Curry's interactive - so you can interactively test your
models within a tab of debugkit (has a shell also)

- S


On 1 May 2010 06:23, Jeremy Burns  wrote:

> I echo the appreciation. To be able to render a page without any die/debug
> statements and then view the variables, see what's in the session, look at
> the request and observe how long things took is magnificent. I never see
> anything in the SQL  tab though - not sure if it's just me?
>
> I'd recommend this plug in to developers. It'll save you some hair.
>
>
> Jeremy Burns
> jeremybu...@me.com 
>
> On 30 Apr 2010, at 22:29, Ed Propsner wrote:
>
> @Mark,
>
> With the entire layout defined by CSS and divs I run into the situation
> every once in a great while where one container paints over another even
> with no positioning involved or higher/lower z-indexes. I think it happens
> mostly because of how data is stacked *inside* of a particular stacking
> context. Strange I know, but I seem to be a magnet for that type of thing
> 8-). Anywho, the persistent problem with Chrome ended up being a caching
> issue. Other than that I'm loving debugKit kit, I could kick myself in the
> @ss for being lazy about it in the past 8-).
>
> Outstanding job,
>
> - Ed
>
>
> On Fri, Apr 30, 2010 at 12:47 PM, Jeremy Burns  wrote:
>
>> Thanks Mark - that worked. I created a folder called debug_kit in
>> /app/webroot, and copied the folders that were inside debug_kit/webroot
>> (css, img & js) into it, and it all started to work.
>>
>> Jeremy Burns
>> jeremybu...@me.com
>>
>>
>> On 30 Apr 2010, at 17:38, mark_story wrote:
>>
>> > Fatal errors usually happen when there is a version mismatch.  As for
>> > missing CSS, plugin assets require mod_rewrite/ some sort of url
>> > rewriting.  I don't think they work without that.  Alternatively you
>> > could copy the webroot directory inside the plugin into app/webroot/
>> > debug_kit/ and things should start working.
>> >
>> > Ed: Debugkit should stack itself to the top as its at the end of the
>> > page, and has a pretty high z-index.  I've never really run into
>> > issues with it stacking under things, but I try to avoid playing with
>> > z-index in my designs.  If you figure something out that can be fixed
>> > in debug kit, please open a ticket so I can get it fixed.
>> >
>> > -Mark
>> >
>> > On Apr 30, 7:52 am, Ed Propsner  wrote:
>> >> Sure, call me out,  LOL. Initially AD7six was correct and since
>> upgrading to
>> >> Cake 1.3 I was still trying to run the 1.2 branch/version of debugkit
>> and
>> >> that was obviously a problem. I downloaded the master branch and was on
>> the
>> >> right track but there was a bit of mix up (oops) and I ended up
>> dropping the
>> >> older version right back into the app ... nice. That obviously didn't
>> work
>> >> either :)
>> >>
>> >> Anyhow ... cake 1.3 + debugkit master branch = no issues
>> >>
>> >> The real lesson here: Keep your dirs in order and their content's
>> properly
>> >> labeled.
>> >>
>> >> If I keep going at this rate I'll end up as the designated poster child
>> for
>> >> what not to do :)
>> >>
>> >> *On a side note: *
>> >> My entire layout is defined by CSS and divs. I had to tweak the stack
>> order
>> >> on both my app and debugkit to keep containers from overlapping. Chrome
>> >> still has a few issues with the overlay but I can deal with it.
>> >>
>> >> Stay tuned for my next brain fart.
>> >>
>> >> - Ed
>> >>
>> >>
>> >>
>> >> On Fri, Apr 30, 2010 at 7:27 AM, Andrei Mita 
>> wrote:
>> >>> Maybe it would be useful for others to know were was your mistake :)
>> >>
>> >>> On Fri, Apr 30, 2010 at 1:49 PM, Ed Propsner 
>> wrote:
>> >>
>>  Holy $%&! ... I got it to work the way it's supposed to.
>> >>
>>  I'm pretty sure I know where I went wrong but I'll spare you the
>> details
>>  for now ... I've almost reached my quota of idiocy for today :)
>> >>
>>  @Jeremy:  you're right ... simply drop it into plugins and you're off
>> and
>>  running.
>> >>
>>  WAY better than it was before.
>> >>
>>  - Ed
>> >>
>>  On Fri, Apr 30, 2010 at 6:18 AM, Ed Propsner > >wrote:
>> >>
>> > I could screw up a wet dream.
>> >>
>> > htdocs/cake/plugins <--- works
>> >>
>> > htdocs/mysite/plugins < works
>> >>
>> > htdocs/cake/app/plugins <--- don't work
>> >>
>> > I'm starting to confuse myself :)
>> >>
>> > On Fri, Apr 30, 2010 at 6:11 AM, Andrei Mita > >wrote:
>> >>
>> >> It has to be in /app/plugins
>> >>
>> >> On Fri, Apr 30, 2010 at 1:10 PM, Jeremy Burns > >wrote:
>> >>
>> >>> Not sure - I've got it in /app/plugins.
>> >>
>> >>> Jeremy Burns
>> >>> jeremybu...@me.com 
>> >>
>> >>> On 30 Apr 2010, at 11:08, Ed Propsner wrote:
>> >>
>> >>> K

Re: Defining constants like APP for use in javascript

2010-05-01 Thread fly2279
Thank you!

On May 1, 9:06 am, AD7six  wrote:
> On May 1, 3:22 pm, fly2279  wrote:
>
> > Andy, thanks for the quick response. I guess what I'm trying to do is
> > include an absolute path that is relative to the app's path. For
> > example:
>
> > $.getJSON("/path/myson.json", function(json) {
> >   // code here
>
> > });
>
> > What if the app is installed in a subdirectory? Then I'd have to put "/
> > subdir/path/myson.json". How do I keep the code flexible without
> > having to change it for each install?
>
> If you included the js file  I linked to (and were using jquery) it'd
> be:
>
> $.getJSON($.url("/path/myson.json"), function(json) {
>    // code here
>  });
>
> If you used euromarks example it'd be:
>
> // baseurl is a global var set in your layout in a script tag
> $.getJSON(baseurl + "/path/myson.json", function(json) {
>    // code here
>  });
>
> They both achieve the same thing. Do whatever works and you're most
> comfortable with.
>
> hth,
>
> 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 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: Defining constants like APP for use in javascript

2010-05-01 Thread AD7six


On May 1, 3:22 pm, fly2279  wrote:
> Andy, thanks for the quick response. I guess what I'm trying to do is
> include an absolute path that is relative to the app's path. For
> example:
>
> $.getJSON("/path/myson.json", function(json) {
>   // code here
>
> });
>
> What if the app is installed in a subdirectory? Then I'd have to put "/
> subdir/path/myson.json". How do I keep the code flexible without
> having to change it for each install?

If you included the js file  I linked to (and were using jquery) it'd
be:

$.getJSON($.url("/path/myson.json"), function(json) {
   // code here
 });

If you used euromarks example it'd be:

// baseurl is a global var set in your layout in a script tag
$.getJSON(baseurl + "/path/myson.json", function(json) {
   // code here
 });

They both achieve the same thing. Do whatever works and you're most
comfortable with.

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


Re: HOW to use find() to EXCLUDE some datasets?

2010-05-01 Thread Marcelo Andrade
On Mon, Apr 19, 2010 at 3:42 AM, mivogt-LU  wrote:
>
> I want to use find() to exlude some data on a few conditions.
>
> [cut /]

Containable behavior?

Best regards.

-- 
MARCELO F ANDRADE
Belem, Amazonia, Brazil

"I took the red pill"

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: Defining constants like APP for use in javascript

2010-05-01 Thread fly2279
Andy, thanks for the quick response. I guess what I'm trying to do is
include an absolute path that is relative to the app's path. For
example:

$.getJSON("/path/myson.json", function(json) {
  // code here
});

What if the app is installed in a subdirectory? Then I'd have to put "/
subdir/path/myson.json". How do I keep the code flexible without
having to change it for each install?

>From the comments of your jquery.mi.js file it looks like it does what
I'm talking about. I'm not  very experienced and I'm a little fuzzy on
how to implement that code.

On May 1, 6:59 am, AD7six  wrote:
> On May 1, 1:49 pm, fly2279  wrote:
>
> > Has anyone done something like declaring cake's constants in a
> > javascript file for use in all javascript files created for the app? I
> > keep wondering what approach I should take for things like a path that
> > might change depending on where the app is installed. Should I just
> > set a variable to APP and serve the javascript file blended with php
> > so that I can access it in other included javascript files? How does
> > everyone else do it?
>
> I'm not really clear on what you mean - but I include this js file (js
> files which cake serves - i.e. not directly in the webroot - can
> include php logic)http://github.com/AD7six/mi_js/blob/master/jquery.mi.js
> which allows your js code to know if it's running in a subfolder
>
> if that doesn't help a description of what you're trying to do would
> likely get you help.
>
> hth,
>
> AD
>
>
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions 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: Defining constants like APP for use in javascript

2010-05-01 Thread euromark
jep, kind of
i used


 var baseurl = 'base;?>';
 var language = '';


etc at the top of the  part to be able to use them in js files


On 1 Mai, 13:59, AD7six  wrote:
> On May 1, 1:49 pm, fly2279  wrote:
>
> > Has anyone done something like declaring cake's constants in a
> > javascript file for use in all javascript files created for the app? I
> > keep wondering what approach I should take for things like a path that
> > might change depending on where the app is installed. Should I just
> > set a variable to APP and serve the javascript file blended with php
> > so that I can access it in other included javascript files? How does
> > everyone else do it?
>
> I'm not really clear on what you mean - but I include this js file (js
> files which cake serves - i.e. not directly in the webroot - can
> include php logic)http://github.com/AD7six/mi_js/blob/master/jquery.mi.js
> which allows your js code to know if it's running in a subfolder
>
> if that doesn't help a description of what you're trying to do would
> likely get you help.
>
> hth,
>
> AD
>
>
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions 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: Defining constants like APP for use in javascript

2010-05-01 Thread AD7six


On May 1, 1:49 pm, fly2279  wrote:
> Has anyone done something like declaring cake's constants in a
> javascript file for use in all javascript files created for the app? I
> keep wondering what approach I should take for things like a path that
> might change depending on where the app is installed. Should I just
> set a variable to APP and serve the javascript file blended with php
> so that I can access it in other included javascript files? How does
> everyone else do it?

I'm not really clear on what you mean - but I include this js file (js
files which cake serves - i.e. not directly in the webroot - can
include php logic) http://github.com/AD7six/mi_js/blob/master/jquery.mi.js
which allows your js code to know if it's running in a subfolder

if that doesn't help a description of what you're trying to do would
likely get you help.

hth,

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


Defining constants like APP for use in javascript

2010-05-01 Thread fly2279
Has anyone done something like declaring cake's constants in a
javascript file for use in all javascript files created for the app? I
keep wondering what approach I should take for things like a path that
might change depending on where the app is installed. Should I just
set a variable to APP and serve the javascript file blended with php
so that I can access it in other included javascript files? How does
everyone else do 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: Recursive = 2 but not all the way

2010-05-01 Thread Andrei Mita
And the correct answer is: i didn't read the manual carefully enough :))

Thanks mate!


On Sat, May 1, 2010 at 2:08 PM, Jeremy Burns  wrote:

> My favourite answer:http://book.cakephp.org/view/1323/Containable all the
> way baby.
>
> Jeremy Burns
> jeremybu...@me.com 
> (Skype) +44 208 123 3822 (jeremy_burns)
> (m) +44 7973 481949
> (h) +44 208 530 7573
>
> On 1 May 2010, at 11:53, Andrei Mita wrote:
>
> Maybe I didn't read the book carefully enough but, is there a way to set
> recursive to get all related data bur from a pool of models?
>
> For instance
> Groups hasMany Users
> Users hasOne Group
> Users hasOne Profiles
> Profiles belongsTo Users
>
> Users hasMany Articles
> Articles belongsTo Users
>
> Users hasMany News
> News belongsTo Users
>
> Recursive = 0 : pagination on Articles will get me all the articles and
> related user information
> Recursive = 1: the same
> Recursive = 2: pagination on Articles will get me all the data related with
> users, profiles, groups, newsbasically everything
>
> How can I get only Users, Profiles and Articles information with a
> pagination on Articles?
>
>
>
> 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.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: Recursive = 2 but not all the way

2010-05-01 Thread Jeremy Burns
My favourite answer:http://book.cakephp.org/view/1323/Containable all the way 
baby.

Jeremy Burns
jeremybu...@me.com
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573

On 1 May 2010, at 11:53, Andrei Mita wrote:

> Maybe I didn't read the book carefully enough but, is there a way to set 
> recursive to get all related data bur from a pool of models?
> 
> For instance
> Groups hasMany Users
> Users hasOne Group
> Users hasOne Profiles
> Profiles belongsTo Users
> 
> Users hasMany Articles
> Articles belongsTo Users
> 
> Users hasMany News
> News belongsTo Users
> 
> Recursive = 0 : pagination on Articles will get me all the articles and 
> related user information
> Recursive = 1: the same
> Recursive = 2: pagination on Articles will get me all the data related with 
> users, profiles, groups, newsbasically everything
> 
> How can I get only Users, Profiles and Articles information with a pagination 
> on Articles?
>  
> 
> 
> 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


Recursive = 2 but not all the way

2010-05-01 Thread Andrei Mita
Maybe I didn't read the book carefully enough but, is there a way to set
recursive to get all related data bur from a pool of models?

For instance
Groups hasMany Users
Users hasOne Group
Users hasOne Profiles
Profiles belongsTo Users

Users hasMany Articles
Articles belongsTo Users

Users hasMany News
News belongsTo Users

Recursive = 0 : pagination on Articles will get me all the articles and
related user information
Recursive = 1: the same
Recursive = 2: pagination on Articles will get me all the data related with
users, profiles, groups, newsbasically everything

How can I get only Users, Profiles and Articles information with a
pagination on Articles?

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: Bakery...arrogance or plain lack of attention

2010-05-01 Thread AD7six


On Apr 29, 11:22 pm, jacmoe  wrote:
> I was maybe a bit too harsh, but Mr. Wadhwani failed to notice that we
> are indeed trying to fix the issues, and that this is not borne out of
> arrogance.
> I understand that he's pissed off, of course.
> And that he's letting out some steam.

while the bakery - and the review process - is far from perfect it's
worth noting the following (for the unknowing bystanders):

The article was titled "Simple Jquery Treeview Helper"
It didn't do anything that existing code doesn't already let you do
[1]
Jayesh did discuss his article with a core member in the irc channel
weeks before this post [2]

While the article shouldn't have been deleted without a comment to the
author (I don't remember, is the deletion of stale articles
automatic?) it wasn't destined to be published and Jayesh didn't do
anything about the articles shortcoming (which would be difficult
since the main problem was surely the tiny nature of the code and that
it repeats core - and other - existing functionality)

hth

AD
[1] http://api.cakephp.org/class/html-helper#method-HtmlHelpernestedList
(amongst other code solutions)
[2] http://irc.cakephp.org/search/cakephp/Wadhwani_J

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


Sort of OT about Models

2010-05-01 Thread Andrei Mita
Trying to design a db with multiple relationships between tables, I'm not
sure if it's better to use identifying or non-identifying relationships from
cake point of view.

My guess is to go with non-identifying, but not sure at all.

Any advice? 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: Selected option in select

2010-05-01 Thread Andrei Mita
OMG it's unbelievable. It works and I dind't do anything to it. If I hit F5,
the selection disappears but if I click on the edit link, everything is OK.
Good enough for me. Maybe it's the browser.

So, here are my to working solutions:

$options=array(
'Generatia 1'=>'Generatia 1',
'Generatia 2'=>'Generatia 2',
'Generatia 3'=>'Generatia 3',
'Mesteri' => 'Mesteri'
);

//Using select, no lable
echo $form->select('group', $options, array('selected' =>
$this->data['Profile']['group']));

//Using input, with label
echo $form->input('group', array(
'options' => $options,
'selected' =>
$this->data['Profile']['group'],
'label' => 'Grup')
  );


Thanks


On Sat, May 1, 2010 at 10:05 AM, WebbedIT  wrote:

> Why are we not using (and I have tested this using 1.2.6)?
>
> $form->input('Profile.group', array('options'=>$groups));
>
> Where $groups is the options array relating to the Profile.group
> field, the fact you supply an options array tells the form helper to
> automatically create a select list.
>
> If $this->data['Profile']['group'] is set in the controller (either
> manually or from a Model->find call) the form helper will
> automatically select it if the value matches a key in your $groups
> array.
>
> HTH
>
> Paul
>
> 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: Selected option in select

2010-05-01 Thread WebbedIT
Why are we not using (and I have tested this using 1.2.6)?

$form->input('Profile.group', array('options'=>$groups));

Where $groups is the options array relating to the Profile.group
field, the fact you supply an options array tells the form helper to
automatically create a select list.

If $this->data['Profile']['group'] is set in the controller (either
manually or from a Model->find call) the form helper will
automatically select it if the value matches a key in your $groups
array.

HTH

Paul

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