Re: Themes - Best practice?

2008-09-26 Thread [EMAIL PROTECTED]


If you really want a single folder and can live with the exposed view-
files, then a simple symlink should get you there. That is, if you
deploy on a server where you are allowed to create symlinks.


On Sep 26, 11:31 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On 26 Sep., 10:21, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
>
> > Ah! I guess you missed the point that any theme in CakePHP has two 
> > components
>
> > The first is the themed views found under /views/themed/themename and
> > the second component is webroot items for the said theme like css, js
> > and images and they are found under /webroot/themed/themename/css
> > /webroot/themed/themename/js /webroot/themed/themename/images etc 
> > Seehttp://www.sanisoft.com/blog/2007/12/29/theming-your-cakephp-apps-v12/
>
> Thanks a lot! This still means a little bit more complicated theme
> installatio than eg. in WP, but then on the other hand, the templates
> in WP are a mess :-)
>
> Cheers,
>   Dirk
--~--~-~--~~~---~--~~
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: Themes - Best practice?

2008-09-26 Thread [EMAIL PROTECTED]

On 26 Sep., 10:21, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> Ah! I guess you missed the point that any theme in CakePHP has two components
>
> The first is the themed views found under /views/themed/themename and
> the second component is webroot items for the said theme like css, js
> and images and they are found under /webroot/themed/themename/css
> /webroot/themed/themename/js /webroot/themed/themename/images etc 
> Seehttp://www.sanisoft.com/blog/2007/12/29/theming-your-cakephp-apps-v12/

Thanks a lot! This still means a little bit more complicated theme
installatio than eg. in WP, but then on the other hand, the templates
in WP are a mess :-)

Cheers,
  Dirk
--~--~-~--~~~---~--~~
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: Themes - Best practice?

2008-09-26 Thread Dr. Tarique Sani

On Fri, Sep 26, 2008 at 1:34 PM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Do you have an example? I can hardly imagine this, as the view/theme
> directories are not in the webserver document root and therefore
> cannot directly deliver the image.

Ah! I guess you missed the point that any theme in CakePHP has two components

The first is the themed views found under /views/themed/themename and
the second component is webroot items for the said theme like css, js
and images and they are found under /webroot/themed/themename/css
/webroot/themed/themename/js /webroot/themed/themename/images etc See
http://www.sanisoft.com/blog/2007/12/29/theming-your-cakephp-apps-v12/

I guess the solution will be obvious from here onwards :)

I have implemented themes in Cheesecake-Photoblog but the user can
only change them via the admin interface not not upload a new theme.

HTH

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 
"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: Themes - Best practice?

2008-09-26 Thread [EMAIL PROTECTED]

On Sep 26, 8:50 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On Fri, Sep 26, 2008 at 3:39 AM, [EMAIL PROTECTED]
>
> <[EMAIL PROTECTED]> wrote:
> > With the current theme-sctructure in Cake, I have a problem on how to
> > deal "files". CSS and JS could be handled somehow, I guess, but what
> > about images?
>
> The current theme structure also allows for images to be in the theme
> directory... plus there is a fall back

Do you have an example? I can hardly imagine this, as the view/theme
directories are not in the webserver document root and therefore
cannot directly deliver the image.

> Why not allow people to upload themes where Cake can usually find
> them? A bit more details on how your current work flow is will help

I'm speaking of NoseRub (see a running instance on http://identoo.com).
People can install this service on their server (eg. 
http://media-adventures.de).
Currently, they have to modifiy some views and also added some images
to somewhere in app/webroot.

I want to give them the ability to completely change their layout by
just placing one directory somewhere - where then all views and images
are present. Similar to wordpress where you have the wp-content/
themes/ directory.

I see the advantage of views not being accessible from the browser's
document root, but see the downside regarding the additional php calls
to "render" the images.

Therefore, I wanted to know other user's best practice.

I _could_ build a upload method, so that people upload a zip where the
following structure is in:
/my_theme
/my_theme/images
/my_theme/views

And then expand the views to views/themes/my_theme and the images
somewhere in app/webroot/.

I only think, that this might complicate developing of such themes for
NoseRub.

So, how did you solve this issues with your CakePHP applications?

Cheers,
  Dirk
--~--~-~--~~~---~--~~
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: Themes - Best practice?

2008-09-25 Thread Dr. Tarique Sani

On Fri, Sep 26, 2008 at 3:39 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:

> With the current theme-sctructure in Cake, I have a problem on how to
> deal "files". CSS and JS could be handled somehow, I guess, but what
> about images?

The current theme structure also allows for images to be in the theme
directory... plus there is a fall back

Why not allow people to upload themes where Cake can usually find
them? A bit more details on how your current work flow is will help

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 
"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: Themes - Best practice?

2008-09-25 Thread [EMAIL PROTECTED]

But this would mean to process the image in PHP and not being able to
deliver the image by the webserver directly, right?

So, instead of


it would be



right?

This would make i18n easier, but this also would mean a "slower"
webserver.

Does anyone currently use this method? What are other advantages,
disadvantages?

Regards,
  Dirk

On 26 Sep., 00:12, teknoid <[EMAIL PROTECTED]> wrote:
> Take a look at the html helper's image() method.
>
> It should be relatively easy to override with AppHelper to suit your
> needs.
>
> On Sep 25, 6:09 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi there,
>
> > I want to give users the possibility to upload their own themes
> > directly to the filesystem - similar to how wordpress does this.
>
> > With the current theme-sctructure in Cake, I have a problem on how to
> > deal "files". CSS and JS could be handled somehow, I guess, but what
> > about images?
>
> > When the user uploads a complete theme folder and has images in it,
> > how should I render them? Having Image-URLs in the HTML of the themes
> > that then need to be processed by the application to "render" an image
> > just doesn't seem right.
>
> > Has anyone else had this problems? And how did you solve them? Only
> > allowing themes through an upload method in the application which then
> > could transfer images somewhere underneath /app/webroot?
>
> > Cheers,
> >   Dirk
> > --
> >  http://noserub.com
> >  http://identoo.com/dirk.olbertz
--~--~-~--~~~---~--~~
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: Themes - Best practice?

2008-09-25 Thread teknoid

Take a look at the html helper's image() method.

It should be relatively easy to override with AppHelper to suit your
needs.

On Sep 25, 6:09 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi there,
>
> I want to give users the possibility to upload their own themes
> directly to the filesystem - similar to how wordpress does this.
>
> With the current theme-sctructure in Cake, I have a problem on how to
> deal "files". CSS and JS could be handled somehow, I guess, but what
> about images?
>
> When the user uploads a complete theme folder and has images in it,
> how should I render them? Having Image-URLs in the HTML of the themes
> that then need to be processed by the application to "render" an image
> just doesn't seem right.
>
> Has anyone else had this problems? And how did you solve them? Only
> allowing themes through an upload method in the application which then
> could transfer images somewhere underneath /app/webroot?
>
> Cheers,
>   Dirk
> --
>  http://noserub.com
>  http://identoo.com/dirk.olbertz
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---