| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| ThemeReadMe.txt | 2004-11-18 | 3.7 kB | |
| Totals: 1 Item | 3.7 kB | 0 | |
ServantSite Theme Instructions
http://www.ServantSite.com
2004.11.17
Theme support in the ServantSite project is built around the Smarty theme engine. More information about Smarty can be found at http://smarty.php.net.
You can either edit the default ServantSite theme or build your own from square one. We recommend editing the default theme. Better yet,
copy the default theme to another directory and edit the copy... just in case.
To Edit the Default Theme
All themes are stored in the (get ready for it) themes folder! We're so origional.
Inside the themes folder you'll see subfolders with the names of the available themes.
By default, the only theme (and hence the only folder) is ServantSiteDefault.
Inside the theme/ServantSiteDefault folder you'll see three folders and a single file.
These folders are called "compile", "html", and "images". The file is stylesheet.css
We'll discuss these four elements in detail below.
The "compile" folder
The Smarty theme engine gleans much of its efficiency from serving up pre-compiled pages. It parces the page once, saves the compiled page in
this folder and then serves up that file rather than re-compiling the page on every request. These pre-compiled pages are replaced on an
efficient schedule and will automatically change if the data to be shown on the page changes. All you need to really know about this folder is
that it must have 777 permissions. That's read/writeable/executeable to the everybody. Smarty can't write its pre-compiled pages there if
it's not world writeable.
The "html" folder
This folder is where you'll be doing much of your customized theme work. Inside this folder you'll see an .html page for every page in ServantSite.
These pages are where you can change the look of your site. By changing the html inside the index.html file, you will change how the index.php
page will look and behave.
Editing the html Files in the "html" Folder
The Smarty theme engine seperates the logic (PHP coding) from the presentation (html) allowing you to give your site a look all its own.
Inside the html files you'll see special tags that look like {$Htmltitle}. These special tags are dynamic elements that Smarty will replace
with content from the database. The {$Htmltitle} tag places the page title text into the page.
You can change any html in these pages you wish... just be sure to leave the tags in the {curly braces} alone.
Looping Sections
Most pages show more than one item from the database. The news.php page, for instance, will show all the news stories. To do this, we loop
through the data, showing it in the same wrapper each time. The tags that perform this feat are {section} tags. Everything between the
{section} tag and the {/section} tag will be repeated for each set of data in the loop. Feel free to edit the html inside the {section}{/section}
tags but know that html will be repeated for each data set of the loop.
The "images" folder
This is where you should put any images for your theme. This includes backgrounds, buttons and whatever eye candy you desire. Link to this
folder directly or via the stylesheet.css file.
Theme Stylesheets
The stylesheet.css file is the html stylesheet for that theme. This file can be edited as you see fit.
It's most useful for specifying table backgrounds and font styles.
Future Theme Support
The ServantSite team has great plans for the themes and hope to offer a dozen or so great pre-configured themes for you to choose from.
If, for whatever reason, you choose to theme your own, we hope this helps.
Shawn K. Parrish