In an attempt to not resurrect an old thread, I have created my own topic. The old topic can be access here
I am creating a PHP Framework that does not work like the typical framework. This one provides a "workspace", where functionality is decided through plugins. Having themes and multiple languages is a huge pare of this project, I want creation of themes to be easy, and to be installed very easily.
My question is, what is the best way to have themes? my current idea is that each plugin has a lang directory which stores any custom text that the plugin may use. Each theme also has a lang directory which uses and custom text that the theme uses. I have heard alot about CSS, and how the same code will transform the look of a site, without changing any of the base code. This is intrigueing to me, however I have very little knowledge of CSS. All in all, i have no idea where to start in order to create a system to make themes easy to install, and easy to create.
Any ideas?
PHP Themes
Moderator: General Moderators
CSS is a VERY easy system to get to grips with, however as it is still a new (ish..) technology, cross platform problems are rife, mind you... same can be said for JavaScript.
Anyhow..
CSS is all based upon the properties of a given object in/on your XHTML page, being seperated from the XHTML. (further separation occurs with the use of external stylesheets)
pretty simplistic for the XHTML, easy to read and with CSS very easily customised.
CSS is a very powerful tool, have a look at CSS Zend garden for some simply awesome examples of how much can be done with it.
Also see http://www.w3schools.com for reference and tutorials.
Anyhow..
CSS is all based upon the properties of a given object in/on your XHTML page, being seperated from the XHTML. (further separation occurs with the use of external stylesheets)
Code: Select all
<div class="mydiv">Content</div>Code: Select all
div .mydiv {
left: 100px; //move 100px from the left
top: 100px; //move 100px from top
border: 0; //no border..
//etc..
}Also see http://www.w3schools.com for reference and tutorials.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Depends on how elaborate you want your theming capabilities to be. A well designed layout can take many different shapes and sizes, but some things cannot be changed by changing the style attributes. As mentioned before, see Zend Guarden.Deemo wrote:do you recommened CSS for the use of a theming engine?
Instead, you can offer a selection of template files, which would then be interpreted by a templating engine to display the same content throughout multiple different themes. These very forums take this approach..