Management of the templates and themes

5 views
Skip to first unread message

Loic d'Anterroches

unread,
Feb 10, 2006, 12:04:29 PM2/10/06
to plume-cms-...@googlegroups.com
Hello,

I think more and more that the _dist folder to manage the themes and
templates is not the right approach.

For the moment we have a folder with the templates for each website and
a theme folder in the public website. Here is a proposal to simplify the
things.

First some definition:
- A theme: A theme is both the templates and the corresponding css and
image files.
- Templates: The PHP files that used to generate the pages.
- Style: The css files and the images matching the templates.

In the manager:
/manager/templates/theme-id/templates/
/manager/templates/theme-id/style/
/manager/templates/theme-id/desc.xml
/manager/templates/theme-id/preview.png

In the public website:
/xmedia/themes/theme-id/

When a website is switched from one theme to another, the files in the
style folder of the manager are copied to the corresponding theme-id
folder in the xmedia folder. If the script has not the rights to perform
the operation, it is easy to copy by hand the files. This will limit
quite a lot of the copying of the files and thus simplify the
installation. It will also mean that we will not duplicate the .php
files when 2 websites on the same installation are using the same theme.

The current theme of the website is stored in the website configuration
file. In the website panel in the manager we can have the same theme
manager as for the theme of the manager in the preferences of the user.

If you have some comments, please go ahead!
Loïc

Jérémie [ kiwii ]

unread,
Feb 11, 2006, 6:12:15 AM2/11/06
to Plume CMS - developers
Loic d'Anterroches a écrit :

> In the manager:
> /manager/templates/theme-id/templates/
> /manager/templates/theme-id/style/
> /manager/templates/theme-id/desc.xml
> /manager/templates/theme-id/preview.png
>
> In the public website:
> /xmedia/themes/theme-id/

Obviously, its the best approaches. I was confronted with this problem
of theme handling. This solution is really very good. Duplicate wasnt
suitable because the most important is the re-use of themes for a
possible switching. Its the cherry's on top of the cake titoo !! I
agree with you..

Loic d'Anterroches

unread,
Feb 11, 2006, 6:33:13 AM2/11/06
to plume-cms-...@googlegroups.com
Hello,

Ok, I will go that way. To minimize the impact during the upgrade
procedure, I will for each website do the copy of the templates from
/manager/templates/website-id/ to
/manager/templates/website-id/templates/ and set the theme id for the
website to be 'website-id'.

Loďc


Loic d'Anterroches

unread,
Feb 12, 2006, 11:27:30 AM2/12/06
to plume-cms-...@googlegroups.com

I think I will go this way:

/manager/templates/theme-id/style/ The "CSS" folder contains:
- style.css: The main css file must be style.css for all the themes.
- images and others css files (for example the rss.css)
/manager/templates/theme-id/desc.xml Description of the theme
/manager/templates/theme-id/preview.png Preview of the theme
/manager/templates/theme-id/ Contains the php templates, directly.

That way I do not even have to move the templates files during the upgrade.

Loďc

Sebastien Fievet

unread,
Feb 15, 2006, 8:56:24 AM2/15/06
to Plume CMS - developers
Alleluia !!!!
Your last post is the best way for me. I dream about this change last
past months. We never talk about this point, but it's a really good
change. Fine !

Loic d'Anterroches

unread,
Feb 15, 2006, 9:08:45 AM2/15/06
to plume-cms-...@googlegroups.com

So maybe I should activate myself a little bit more to have that
implemented. In fact I want to implement it for a personal blog I will
start.

And don't tell anybody that I want to create a gallery plugin with that
design: http://dbowman.com/photos/ which is available from here:
http://stopdesign.com/templates/photos/ and I may be crazy enough to
implement a subset of the flickr api to create the galleries.

I think that having that for the 1.2 release could kind of motivate
people to try Plume.

Loïc

>

Sebastien Fievet

unread,
Feb 15, 2006, 10:21:51 AM2/15/06
to Plume CMS - developers
> And don't tell anybody that I want to create a gallery plugin with that
> design: http://dbowman.com/photos/ which is available from here:
> http://stopdesign.com/templates/photos/ and I may be crazy enough to
> implement a subset of the flickr api to create the galleries.
Looks great ! StopDesign produce good products.

> I think that having that for the 1.2 release could kind of motivate
> people to try Plume.

I think so ! We will be able to have a great product. With that news,
i'm newly motivated to help you developping this features.
Wait & see... ;)

Loic d'Anterroches

unread,
Feb 18, 2006, 12:36:13 PM2/18/06
to plume-cms-...@googlegroups.com
Hello,

I have implemented the fix. I need to create the preview.png and
desc.xml together with some theme manager. Be carefull when upgrading
not to lose your modifications of your templates.
See: http://code.plume-cms.net/plume-cms/wiki/PlumeUpgrade

Now you have a config variable 'theme_id' for each website, giving the
id of the current theme. The folder architecture is as follow:

> /manager/templates/theme-id/style/ The "CSS" folder contains:
> - style.css: The main css file must be style.css for all the themes.
> - images and others css files (for example the rss.css)
> /manager/templates/theme-id/desc.xml Description of the theme
> /manager/templates/theme-id/preview.png Preview of the theme
> /manager/templates/theme-id/ Contains the php templates, directly.

If you want to create a new theme with the id 'newtheme' for your
'default' website.
Copy the /manager/templates/default/ folder
into /manager/templates/newtheme/

Create a folder /xmedia/theme/newtheme/ and put the content
of /manager/templates/newtheme/style/ into it.

Change in /manager/conf/configweb_default.php the variable
$_PX_website_config['theme_id'] = 'default';
to
$_PX_website_config['theme_id'] = 'newtheme';

Edit the templates (php files) in /manager/templates/newtheme/ to have
the css loaded from /xmedia/theme/newtheme/ and not
from /xmedia/theme/default/

Play with your templates and css. At the end copy the theme files from
the xmedia folder to the /newtheme/style/ folder.

You have now a complete newtheme ready to be given to other people for
test.

Enjoy,
loïc

Reply all
Reply to author
Forward
0 new messages