Much of the basic styling system is now in place in CVS. You can create styles, install, import, upload, create templates, themes and imagesets. You can export (as zip, tar, tar.gz and tar.bz2) themes, templates, etc. for distribution.
I'll briefly explain how it all works together ...
"Styles" comprise (presently) of three "Style Elements"; template, theme and imageset. The template set obviously comprises all the markup describing what the forum layout looks like. The theme contains CSS and associated images thus specifying the actual look of the board. The imageset contains non-theme specific images; buttons, icons, etc. These can be combined in any way.
The styles are stored in the styles/ folder off the phpBB root folder. Each style or style element must be stored under a unique name ... this shouldn't be a problem since experience with 2.0.x indicates designers tend to be quite "imaginative" in their style naming Each of these "Style Folders" contains one or more of the "Style Element Folders"; template/, theme/ and imageset/. A Style Folder does not need to contain all three Style Element Folders.
Each Style Element set contains a .cfg file; template.cfg, theme.cfg and imageset.cfg. These contain basic information on each of the element sets. In the case of templates for example it details the name, the copyright, the version of phpBB 2.2 under which it was exported and a bbcode bitfield identifier. The imageset config contains information on which image maps to which button/icon in the database. These .cfg files are generated automatically when a Style Element is exported.
If you manually extract a Style Element archive into a newly created (uniquely named) Style Folder in styles/ ... and then visit the relevant Styles module this new style element will automatically be detected and listed as an "Uninstalled theme/imageset/template" ... you can then click "Install" and voila, a new style element is available.
In 2.2 we've introduced a far greater capability to alter the style online. In 2.0 you were limited to a few predefined colour, typeface settings. In 2.2 you can edit a whole raft of predefined theme classes (or add your own custom classes), you can alter the imagesets, etc. You can also modify the templates online.
To allow users who may be wary of setting their style elements to world writeable (required for PHP to modify the files online) 2.2 will transparently and automatically copy to the database templates and theme information if it detects it cannot write to them on the filesystem. You may also do this manually if you choose. All editing of such data will then be stored in the database. This does mean duplication of data but it was the best solution I could come up with ... and the impact is likely negligible considering the typical space allocations of hosting packages these days
Admins may also decide they want to upload or import (from their store/ folder) styles ... this will require the styles/ folder be given appropriate write permissions. While we can store stylesheet and templates in the DB we can't store every single image we use
A warning here ... safe mode is nasty Typically we cannot create a directory and then manipulate files within it ... PHP checks ownership permissions of the files within the folder and concludes they are different to the owner of the script (which typically they are ... you are usually the owner of the script but apache/www/whatever is typically the user creating folders online via PHP). Therefore what you can do in safe mode is limited I'm afraid. In these situations style elements will need to be uploaded and extracted manually ... though online editing of the theme and templates can still be achieved.
I note that while getting there styles admin in CVS is not yet complete ... some things don't work, some things work "oddly". If something does behave oddly please let me know ... if something blatantly doesn't work chances are I've not finished it I strongly urge you to make a backup of your "Style Folder" or "Style Elements Folders" before playing ... if something does wrong you're fairly safe
Anyway this is a basic overview of how things work ... I could probably add more here but it's probably better if people "ask questions" to which I can respond.
The 2.2 styling system ... feedback
Re: The 2.2 styling system ... feedback
Hi Paul Looks good! No questions from me ... I can tell you put alot of thought into this Keep up the good work
-
- Registered User
- Posts: 1546
- Joined: Wed Apr 09, 2003 8:44 pm
- Location: London, United Kingdom
Re: The 2.2 styling system ... feedback
I've got a CVS copy and been looking around in the syles, themes, and imagesets panels - looks great and easy to use.
Rob
Re: The 2.2 styling system ... feedback
I really like the new styling system. It looks clean, clear and concise. Keep up the good work. I cant wait until 2.2 is ready for everyday use
Re: The 2.2 styling system ... feedback
It seems great so far!
I like how you can set multiple themes to all work from the same template files! Really useful!
Only thing is i have to update a template file via the admin cp before it takes effect on my forums... weird? Could just be my temp server i dunno.
I like how you can set multiple themes to all work from the same template files! Really useful!
Only thing is i have to update a template file via the admin cp before it takes effect on my forums... weird? Could just be my temp server i dunno.
Re: The 2.2 styling system ... feedback
somebody's awake today! (this hasn't really been bugging me for a month...)
found it at the bottom of load settings
I dont understand that feature really... seems a little... odd... and i really dont get how it works!!! (template data table is empty...)
-
- Registered User
- Posts: 1546
- Joined: Wed Apr 09, 2003 8:44 pm
- Location: London, United Kingdom
Re: The 2.2 styling system ... feedback
Normally, the script looks for a compiled tempalte first (one that was prepared earlier, if you like) and uses that one if if it finds it. If it can't find it, it looks in the templates directory before compiling it and saving it in either the DB (template data table?) or in the cache/ directory so that it doesn't have to be compiled again. This saves a bit of often unneccessary work but means that it won't reflect changes you make to the template. Forcing it to recompile just means that it doesn't bother looking for a pre-compiled/cached verion, just compiles the relevant template from the template directory. And whilst it doesn't realise it needs to recompile if you upload, it does if you update it via the Admin CP.
Rob
Re: The 2.2 styling system ... feedback
Aaaah! It loads them into the cache...
It seems quite useful actually...
Well, i now know i may as well turn it on when i've finished modding!
It seems quite useful actually...
Well, i now know i may as well turn it on when i've finished modding!