From: Karsten D. <k.d...@fi...> - 2001-03-29 16:39:54
|
On Thu, Mar 29, 2001 at 05:04:43PM +0200, Alain Fontaine wrote: > Using a browser-based interface to change the styles is indeed a cool ide= a. > Oh wait, wasn't it me who initially suggested that ? hehe :)). Seriously, > it wouldn't be too hard to integrate it. A little brainstorming if you > permit: Sure :-) That's what we are all doing all the time... > 1. Ideally, all styles would need to be stored in one single .css file. T= hat > makes management and automation easier. Let's call it theme.css. The real > filename would actually be theme.css.php because the styles would be defi= ned > dynamically through PHP and database calls. I would like to have it as a template: Just write a "normal" stylesheet, and afterwards replace all values which should be adjustable through the webinterface by placeholders. > 2. Every style (ID, tag overload, or class) that is used in phpWebSite wo= uld > need to be defined in that file. Yes. We should try to define the style to be usd before writing any new template or stylesheet. > 3. The admin interface should have a "preview style" feature so that one = can > check the result immediately. Would be good. > 4. One should be able to define more than one theme. This means that we'd > need a "themes" table, and a "themesdetail" table that defines the values > for the individual styles, per theme. Eh? One will be able to have as many themes as he/she wants, right? Ah, I should think a minute longer, before starting to write... If we have dynamic CSS, we nedd to have the values in the database, and in that database we would need an entry for each value/theme pair. Did I get you right? Hmm, let's see. We could define some standard themes (with templates and stylesheet template), for which such entries in the database would come shrink-wrapped. Now there would be two possibilities for future theme contributors: Create a customizable theme, in that case they would have to follow some basic rules, and would have to provide a SQL snippet to introduce their template to the database (like plugins do). Or they could decide to write a fixed theme, this would not be customizable through the webinterface, but would'nt need the database either. We probably need some more thinking on that subject. > 5. It would be nice if the advanced user would not be limited to using the > admin interface. The advanced user should be able to manually apply his > hand-crafted .css file. This would be possible through the stylesheet template approach mentioned above: Just edit the CSS template, and you're set. > 6. How do we go about defining a style's values? The problem is that you = can > [...] We should limit the customizable things to some set of options we define. Full Stop. If needed, the user/admin can edit the stylesheet template directly. > 7. If we are going to make it as dynamic: how about performance? We'd need > to investigate caching/compiling options. If we take the stylesheet template approach I layed out above, and we decide for using Smarty the cacheing/compiling would be done through those. Nothing to worry about :-) > 8. Also, having that degree of "dynamicity" (?) would allow us to make a > very customizable phpWebSite in which the site visitor could create his o= wn > style sheet definitions ! The abilty to choose a theme is enough, I would say. No nedd to give every user the ability to customize the freely selectable theme even more, right? And I would suspect this to introduce (some) performance issues. > 9. For every style definition, the editor should show where a particular > style is used, so that the user immediately sees at what places his chang= es > are going to have an effect. It's a PITA to edit a style for one place ju= st > to find out that the very same style is used on 5 other pages, and messes > everything up on those. This would be nice, but we should lay that responsibility into the hands of theme authors. A simple static HTML table showing where which style is used, should be sufficient. > Okay, enough for now. Waiting for comments/suggestions/ideas :) Satisfied? :-) Regards, Karsten --=20 fishfarm - Karsten Dambekalns Echternstr. 73 - 38100 Braunschweig Tel. +49 531 1232902 mailto:k.d...@fi... Fax. +49 531 1232906 http://www.fishfarm.de/ ----------------------------------------------------- |