From: Karsten D. <k.d...@tu...> - 2001-03-30 13:40:40
|
On Fri, Mar 30, 2001 at 07:56:17AM -0500, Todd Owen wrote: > > leftbox > > rightbox > > main >=20 > I think we're selling the project short if we have leftbox and rightbox, > etc. The themes need to be more generic and flexible. Such as the > following: >=20 > --Objects on a certain page > nav_bar, weather, articles, poll1, poll2 (second instance), job_posts, > header, footer Right. But will these be "blocks" or not? That is, do we need special styles for those? I think we should stick with something like left,right,main, for the sake of simplicity. If we jave something like {leftblocks}, we have the opportunity to let the system reorder the single blocks within that. > --Theme/template > <html><body> > <style sheet here> > {header}<br /> > <table> > <tr><td>{nav_bar}</ td><td>{articles}</ td> > <td>{poll1}</ td><td>{poll2}</ td></ tr> <hr /> > <tr><td>{weather}</ td><td>{job_posts}</ td></ tr> > </ table> > <br />{footer} > </ body></ html> How would the system know that those placeholders exist? And what about a plugin? Is this was to go into the {plugin} part of the template, all would be well. But if that plugin neede something like {my_blah_plugin}, you wouldn't be able to use that plugin with some other theme... > You see my point. We need to have each of the page objects separate, then > allow the theme/template to arrange them independant of left, main and to= p. Yes, seperatley, but following some rules. If I may lay out some ideas... (we might have something like this as documentataion on "how to write themes"): -------------------------- - A theme has to provide at least one page template, one block template and exactly one stylesheet. - The stylesheet *must* define the following classes and tags in that class= es: (insert with what Frits and/or others come up) [1] - The stylesheet *may* define additional styles for classes or tags used solely in the corresponding template. The must not interfer with the standard PHPWS style/class names. [1] - The page template *must* provide placeholders for: - blocks1, blocks2, blocks3, blocks4 [2] - plugins1, plugins2 [2] - header [3] - footer [3] - main [4] - menu - The block template *must* define a standard block for use with the format_block($title,$content) function (or whatever function there may be). - The theme *may* define more block templates, which can be assigned to individual blocks through the admin interface. -------------------------- This is mainly a proposal, although I would consider it thought through, at least in a basic way :-) [1] By setting up rules for the stylesheet, we achieve a minimum level of compatibility between templates. By allowing additional rules in them, we give designers some more freedom. [2] The page must define 4 block and 2 plugin placeholders, because we could give the possibility to assign a plugin or block to one of the block or plugin "places". I do not name them blocks_left, blocks_top, et al, because that would imply a position. Having them numbered, gives a theme author the possibility to place blocks1 and blocks2 directly above each other, for example. - Question: shall we seperate blocks and plugins, or shall plugins be plced like blocks? - Question: Are 4 (6) blocks/block positions enough? [3] These would be for placing some smallprint (like at the bottom of the page and what is $titlebar in config.php now) [4] Here would go anything else that is produced dynamically (except the menu, of course). REMEMBER: These rules are for standard themes (and their authors), they make sure that a theme is fully compatible with an out-of-the-box install of PHPWS. If one wants to develop a theme for personal use, he/she could easily omit blocks3 and blocks4, as well as the header. He wouldn't be able to complain about being able to assign plugin x to blocks3, though :-) And such a template wouldn't pass QA at Appstate and therefore wouldn't be offered on the download page. That's it, sorry for the much too long post (again!) :o) Regards, Karsten --=20 Why do we have to hide from the police, daddy? Because we use emacs, son. They use vi. ----------------------------- mailto:k.d...@tu... w=B3: http://www.k-fish.de/ gpg: http://www.k-fish.de/mykeys.gpg |