Re: Webroot folder in Plugins

2008-04-16 Thread Dr. Tarique Sani
On Wed, Apr 16, 2008 at 5:08 PM, Max <[EMAIL PROTECTED]> wrote:

> Is it something which is planned for next versions? I see this is very
> much needed when you make plugins for editor or any other module for
> that matter. I'm trying to enable drop-folder plugin functionality.


QND coding shows that doing images the same way but outputting proper
headers before it and doing readfile works I just don't like the idea of the
overhead it entails.

But I also feel that the current method for plugins is proper because in
production setup the document root is pointing to the app/webroot and
everything parallel to the webroot is not directly accessible by your
browser.

OTOH if you do put your plugins folder in the webroot then all you need is a
couple of clever rewrite rules and naming conventions to get images working
from a plugins folder

Cheers
Tarique

-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-16 Thread Max

Is it something which is planned for next versions? I see this is very
much needed when you make plugins for editor or any other module for
that matter. I'm trying to enable drop-folder plugin functionality.

Check my blog:
http://www.gigapromoters.com/blog/2008/04/15/designing-for-reusability-taking-advantage-of-plugins-in-cakephp/

I've somehow worked with the 'vendors' inside plugin to server css and
js, but that wouldn't be enough when my plugins start gaining weight.

On Apr 15, 3:26 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 15, 2008 at 12:40 AM, Max <[EMAIL PROTECTED]> wrote:
>
> > I've been looking for the very same thing from last few hrs..
> > Changeset 6189 (https://trac.cakephp.org/changeset/6189) suggests that
> > JS and CSS support is added, but I cant seem to even access css/js
> > files inside my plugin directory.
>
> > What folder am I supposed to keep inside my plugin folder? webroot or
> > vendor?
>
> vendor/css/ works fine.  There is *no* webroot for plugins in the sense the
> CSS / JS are include(d) in case of plugins and not served directly as in
> case of app/webroot
>
> T
>
> --
> =
> Cheesecake-Photoblog:http://cheesecake-photoblog.org
> PHP for E-Biz:http://sanisoft.com
> =
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-15 Thread Dr. Tarique Sani
On Tue, Apr 15, 2008 at 12:40 AM, Max <[EMAIL PROTECTED]> wrote:

>
> I've been looking for the very same thing from last few hrs..
> Changeset 6189 (https://trac.cakephp.org/changeset/6189) suggests that
> JS and CSS support is added, but I cant seem to even access css/js
> files inside my plugin directory.
>
> What folder am I supposed to keep inside my plugin folder? webroot or
> vendor?



vendor/css/ works fine.  There is *no* webroot for plugins in the sense the
CSS / JS are include(d) in case of plugins and not served directly as in
case of app/webroot

T

-- 
=
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-14 Thread Max

I've been looking for the very same thing from last few hrs..
Changeset 6189 (https://trac.cakephp.org/changeset/6189) suggests that
JS and CSS support is added, but I cant seem to even access css/js
files inside my plugin directory.

What folder am I supposed to keep inside my plugin folder? webroot or
vendor?

On Apr 10, 1:53 am, MYRZ <[EMAIL PROTECTED]> wrote:
> After some time reusing and perfecting some code for cakephp, i think
> it's time to put all the reusable stuff in aplugin.
>
> But,
>
> In the manual (which I realize is not up to date any more for 1.2), i
> found that the controllers, models and views folders could be placed
> in such aplugin, but not thewebrootfolder. Now, for my code, lots
> of images (I just love those http://www.famfamfam.com/lab/
> icons/silk/">Silk Icons), lots of javascript and some css is
> essential. And if i should place those in the app/webrootevery time i
> reuse it, the whole 'plugin' idea wouldn't make much sence now would
> it?
>
> (Again:) But..
>
> After some searching, i saw that the amazing CakePHP developers had
> reconized this in http://trac.cakephp.org/ticket/1897";>ticket
> 1897, which is fixed with http://trac.cakephp.org/
> changeset/6189">revision 6178.
>
> Rock 'n roll!
>
> But somehow i feel would be too obious to just copy thewebrootfolder
> into theplugin. I can seem to find somebody tried it in the cakephp
> blogosphere...
>
> So anybody knows a bit more about this down here?
>
> If i could fix this, it would feel like being in Nerdvana...
>
> Thanx in advance!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-10 Thread Gwoo

submit a patch with the relevant test case.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-10 Thread MYRZ

Well, i realize this is a bit of a dillema: performance vs.
architectural. I just think it would be cleaner if a plugin could also
contain its own images, since layout- and viewtemplates are also
included in a plugin. But i agree there could be some performance
backdraws. I think if this were to be implemented though, a developer
could choose to keep the images in the app/webroot for performance
sake, or put them in app/plugins/[plugin]/vendors/img for
architecturals sake.

It just would be cool to only maintain, tweak and rewrite the plugin
from time to time, then just replace the plugin at all of my customers
webapps, and updating all those webapps in a really clean and easy
way...

On 10 apr, 13:08, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> Having things like css, js and images (mostly static content) served
> directly by the webserver from the document root (bypassing cakephp
> routing) is a good thing in terms of performance, and makes easy to
> serve that from a server farm using a light webserver (i.e. lighty).
>
> On Thu, Apr 10, 2008 at 7:03 AM, MYRZ <[EMAIL PROTECTED]> wrote:
>
> >  Well, if images aren't supported yet, i think i rather wait with the
> >  whole plugin idea... it is quite a hassle to change everyting for a
> >  plugin, so if i do it, i really want it to pay off...
>
> >  Isn't this ticket worthy?
>
> >  On 10 apr, 04:06, Gwoo <[EMAIL PROTECTED]> wrote:
> >  > /plugin/plugin_name/vendors/css/your_css.css
>
> >  > $html->css('/plugin_name/css/your_css.css');
>
> >  > The only thing that is not added yet is image support. I suppose this
> >  > could happen easily.
>
> >  > Have a look at the test cases with the changeset. They might help to
> >  > explain how things work a little bit more.
>
> >  > Bake on.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-10 Thread Dardo Sordi Bogado

Having things like css, js and images (mostly static content) served
directly by the webserver from the document root (bypassing cakephp
routing) is a good thing in terms of performance, and makes easy to
serve that from a server farm using a light webserver (i.e. lighty).

On Thu, Apr 10, 2008 at 7:03 AM, MYRZ <[EMAIL PROTECTED]> wrote:
>
>  Well, if images aren't supported yet, i think i rather wait with the
>  whole plugin idea... it is quite a hassle to change everyting for a
>  plugin, so if i do it, i really want it to pay off...
>
>  Isn't this ticket worthy?
>
>
>
>
>
>
>  On 10 apr, 04:06, Gwoo <[EMAIL PROTECTED]> wrote:
>  > /plugin/plugin_name/vendors/css/your_css.css
>  >
>  > $html->css('/plugin_name/css/your_css.css');
>  >
>  > The only thing that is not added yet is image support. I suppose this
>  > could happen easily.
>  >
>  > Have a look at the test cases with the changeset. They might help to
>  > explain how things work a little bit more.
>  >
>  > Bake on.
>  >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-10 Thread MYRZ

Well, if images aren't supported yet, i think i rather wait with the
whole plugin idea... it is quite a hassle to change everyting for a
plugin, so if i do it, i really want it to pay off...

Isn't this ticket worthy?




On 10 apr, 04:06, Gwoo <[EMAIL PROTECTED]> wrote:
> /plugin/plugin_name/vendors/css/your_css.css
>
> $html->css('/plugin_name/css/your_css.css');
>
> The only thing that is not added yet is image support. I suppose this
> could happen easily.
>
> Have a look at the test cases with the changeset. They might help to
> explain how things work a little bit more.
>
> Bake on.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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: Webroot folder in Plugins

2008-04-09 Thread Gwoo

/plugin/plugin_name/vendors/css/your_css.css

$html->css('/plugin_name/css/your_css.css');

The only thing that is not added yet is image support. I suppose this
could happen easily.

Have a look at the test cases with the changeset. They might help to
explain how things work a little bit more.

Bake on.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~--~~~~--~~--~--~---