Re: Using bootstrap to load app_controller

2008-06-20 Thread Corie

I opened a ticket https://trac.cakephp.org/ticket/4959

Supposedly it's as expected.

-Corie

On Jun 16, 5:33 pm, Corie <[EMAIL PROTECTED]> wrote:
> Perhaps I will.
>
> This works for now:
>
> $controllerPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'controllers' . DS);
>
> if(!file_exists(ROOT . DS . APP_DIR . DS . 'app_controller.php')) {
>         $controllerPaths[] = CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'app_controller' . DS;
>
> }
>
> -Corie
>
> On Jun 16, 5:19 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
>
> > On Mon, Jun 16, 2008 at 1:54 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> > > This is precisely what I've done. I just can't get the app_controller
> > > shared if I ever want to use a different local app_controller.
>
> > > Could I do something like:
>
> > > if( file_exists( APP_DIR . DS . 'app_controller.php') ) {
> > >    use it
> > > } else {
> > >    use the shared one
> > > }
>
> > > Would it just need to be included?
>
> > I think you should open a ticket on trac.cakephp.org  it seems that
> > this is not the expected behavior but maybe they need to just clarify
> > the documentation a little.  I wouldn't think you need to do something
> > like that.
>
> > Sam D
>
> > > -Corie
>
> > > On Jun 16, 4:49 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> > >> On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore <[EMAIL PROTECTED]> wrote:
>
> > >> > It is documented in the manual
> > >> >http://manual.cakephp.org/view/32/installation#advanced-installation-35
>
> > >> Thanks for pointing that out, Sam.
>
> > >> --
> > >> Chris Hartjes
> > >> Internet Loudmouth
> > >> Motto for 2008: "Moving from herding elephants to handling snakes..."
> > >> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Corie

Perhaps I will.

This works for now:

$controllerPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'controllers' . DS);

if(!file_exists(ROOT . DS . APP_DIR . DS . 'app_controller.php')) {
$controllerPaths[] = CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'app_controller' . DS;
}

-Corie

On Jun 16, 5:19 pm, "Samuel DeVore" <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 1:54 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> > This is precisely what I've done. I just can't get the app_controller
> > shared if I ever want to use a different local app_controller.
>
> > Could I do something like:
>
> > if( file_exists( APP_DIR . DS . 'app_controller.php') ) {
> >use it
> > } else {
> >use the shared one
> > }
>
> > Would it just need to be included?
>
> I think you should open a ticket on trac.cakephp.org  it seems that
> this is not the expected behavior but maybe they need to just clarify
> the documentation a little.  I wouldn't think you need to do something
> like that.
>
> Sam D
>
>
>
> > -Corie
>
> > On Jun 16, 4:49 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> >> On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore <[EMAIL PROTECTED]> wrote:
>
> >> > It is documented in the manual
> >> >http://manual.cakephp.org/view/32/installation#advanced-installation-35
>
> >> Thanks for pointing that out, Sam.
>
> >> --
> >> Chris Hartjes
> >> Internet Loudmouth
> >> Motto for 2008: "Moving from herding elephants to handling snakes..."
> >> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Samuel DeVore

On Mon, Jun 16, 2008 at 1:54 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> This is precisely what I've done. I just can't get the app_controller
> shared if I ever want to use a different local app_controller.
>
> Could I do something like:
>
> if( file_exists( APP_DIR . DS . 'app_controller.php') ) {
>use it
> } else {
>use the shared one
> }
>
> Would it just need to be included?

I think you should open a ticket on trac.cakephp.org  it seems that
this is not the expected behavior but maybe they need to just clarify
the documentation a little.  I wouldn't think you need to do something
like that.

Sam D
>
> -Corie
>
> On Jun 16, 4:49 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>> On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore <[EMAIL PROTECTED]> wrote:
>>
>> > It is documented in the manual
>> >http://manual.cakephp.org/view/32/installation#advanced-installation-35
>>
>> Thanks for pointing that out, Sam.
>>
>> --
>> Chris Hartjes
>> Internet Loudmouth
>> Motto for 2008: "Moving from herding elephants to handling snakes..."
>> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
> >
>

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



RE: Using bootstrap to load app_controller

2008-06-16 Thread Paul R. Zwiers

I use a "repository" kind of thingy :-)

I have some local sites running on my development machine which are used to 
create "standard" "components" (components in this case being 
models/controllers/views which are basically standards for other [production] 
sites). These are never to be changed on the sites who use them. I use a file 
in the vendors-directory to set variables that might be needed by the 
"standard" models/controllers and are specific to the production site.

I keep a self-fabricated suite of tools to synchronize (push) a changed 
"standard" file to the production server(s), cleaning caches and tmp files etc. 
as things are being deployed to different OSes, different servers and non-cake 
applications also, this works remarkably well in my situation. Not very 
cache-ish though, but it works without too much effort once it is setup. Happy 
to learn other methods, I can for example think of using svn for such 
deployment(s).

Just my 2ct.
Paul

> -Original Message-
> > I build a lot of small web sites and most of them use the same type
> of
> > controllers so I'd like to be able to have one set of these to update
> > instead of 20 to update every time I make a change. Maybe plugins
> > would be another route to go, but that would require having to update
> > all the sites for every small change I make.
> 
> It has been my experience that CakePHP is not well suited to that
> task.  If others have done it, I'm sure they will share their
> experiences.
> 


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



Re: Using bootstrap to load app_controller

2008-06-16 Thread Corie

This is precisely what I've done. I just can't get the app_controller
shared if I ever want to use a different local app_controller.

Could I do something like:

if( file_exists( APP_DIR . DS . 'app_controller.php') ) {
use it
} else {
use the shared one
}

Would it just need to be included?

-Corie

On Jun 16, 4:49 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore <[EMAIL PROTECTED]> wrote:
>
> > It is documented in the manual
> >http://manual.cakephp.org/view/32/installation#advanced-installation-35
>
> Thanks for pointing that out, Sam.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 4:45 PM, Samuel DeVore <[EMAIL PROTECTED]> wrote:
>
> It is documented in the manual
> http://manual.cakephp.org/view/32/installation#advanced-installation-35

Thanks for pointing that out, Sam.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

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



Re: Using bootstrap to load app_controller

2008-06-16 Thread Samuel DeVore

ail.com> wrote:
>>
>> I build a lot of small web sites and most of them use the same type of
>> controllers so I'd like to be able to have one set of these to update
>> instead of 20 to update every time I make a change. Maybe plugins
>> would be another route to go, but that would require having to update
>> all the sites for every small change I make.
>
> It has been my experience that CakePHP is not well suited to that
> task.  If others have done it, I'm sure they will share their
> experiences.

It is documented in the manual
http://manual.cakephp.org/view/32/installation#advanced-installation-35

I have done it and it works well, but you have to stay on top of
clearing caches in 'all' sites and I have found that sharing the tmp
files just doesn't give good results, there are just too many places
where namespace is overloaded too much

I initially did it with symlinks or external checkouts but this seems
baked into the framework and worked well in my testing

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



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 4:26 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> I build a lot of small web sites and most of them use the same type of
> controllers so I'd like to be able to have one set of these to update
> instead of 20 to update every time I make a change. Maybe plugins
> would be another route to go, but that would require having to update
> all the sites for every small change I make.

It has been my experience that CakePHP is not well suited to that
task.  If others have done it, I'm sure they will share their
experiences.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

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



Re: Using bootstrap to load app_controller

2008-06-16 Thread Corie

I build a lot of small web sites and most of them use the same type of
controllers so I'd like to be able to have one set of these to update
instead of 20 to update every time I make a change. Maybe plugins
would be another route to go, but that would require having to update
all the sites for every small change I make.

It gives me a great stepping stone to have this template when I start
a new site. And when I want to add another feature I can do so for all
sites at the same time.

-Corie

On Jun 16, 4:16 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 4:11 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> > I've not found any examples.
>
> > What would you recommend as a better way to share models, controllers,
> > and views between multiple sites?
>
> > -Corie
>
> Having never done that (i.e. sharing models, controllers and views
> between multiple sites) I do not have an answer, but from what I do
> know about building CakePHP apps, it is definitely not that way.
>
> Perhaps you could explain a little more what it is you are trying to do.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 4:11 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> I've not found any examples.
>
> What would you recommend as a better way to share models, controllers,
> and views between multiple sites?
>
> -Corie

Having never done that (i.e. sharing models, controllers and views
between multiple sites) I do not have an answer, but from what I do
know about building CakePHP apps, it is definitely not that way.

Perhaps you could explain a little more what it is you are trying to do.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

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



Re: Using bootstrap to load app_controller

2008-06-16 Thread Corie

I've not found any examples.

What would you recommend as a better way to share models, controllers,
and views between multiple sites?

-Corie

On Jun 16, 3:59 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 3:45 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> > I'm using the bootstrap file to load up default controllers and other
> > stuff.
>
> Why would you do it this way when none of the examples out there do
> anything remotely similar to this.
>
> --
> Chris Hartjes
> Internet Loudmouth
> Motto for 2008: "Moving from herding elephants to handling snakes..."
> @TheKeyBoard:http://www.littlehart.net/atthekeyboard
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using bootstrap to load app_controller

2008-06-16 Thread Chris Hartjes

On Mon, Jun 16, 2008 at 3:45 PM, Corie <[EMAIL PROTECTED]> wrote:
>
> I'm using the bootstrap file to load up default controllers and other
> stuff.

Why would you do it this way when none of the examples out there do
anything remotely similar to this.

-- 
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/atthekeyboard

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



Re: Using bootstrap to load app_controller

2008-06-16 Thread Corie

BTW, if you're testing this, make sure to delete your tmp/cache/
persistent/ files.

-Corie

On Jun 16, 3:45 pm, Corie <[EMAIL PROTECTED]> wrote:
> I'm using the bootstrap file to load up default controllers and other
> stuff.
>
> In app/config/bootstrap.php
>
> $modelPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'models' . DS);
> $behaviorPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'models' . DS . 'behaviors' . DS);
> $viewPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'views' . DS);
> $helperPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'views' . DS . 'helpers' . DS);
> $controllerPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'controllers' . DS);
> $componentPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
> 'controllers' . DS . 'components' . DS);
>
> This all works as expected and cascades properly.
> app/controllers/test_controller.php will first if it exists
> if not then
> cake_core/shares/controllers/test_controller.php will load.
>
> But when I put an app_controller in cake_core/shares/controllers/ it
> always loads it even if my app has its own app_controller. It only
> loads the local version if I remove the one from shares. Is there any
> way around this? Or is it not meant to load an app_controller?
>
> -Corie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Using bootstrap to load app_controller

2008-06-16 Thread Corie

I'm using the bootstrap file to load up default controllers and other
stuff.

In app/config/bootstrap.php

$modelPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'models' . DS);
$behaviorPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'models' . DS . 'behaviors' . DS);
$viewPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'views' . DS);
$helperPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'views' . DS . 'helpers' . DS);
$controllerPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'controllers' . DS);
$componentPaths = array(CAKE_CORE_INCLUDE_PATH . DS . 'shares' . DS .
'controllers' . DS . 'components' . DS);

This all works as expected and cascades properly.
app/controllers/test_controller.php will first if it exists
if not then
cake_core/shares/controllers/test_controller.php will load.

But when I put an app_controller in cake_core/shares/controllers/ it
always loads it even if my app has its own app_controller. It only
loads the local version if I remove the one from shares. Is there any
way around this? Or is it not meant to load an app_controller?

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