Chapter 4. Customization

Table of Contents
Directory layout
Template files
Variables that can be used in Templates


postguestbook offers the possiblity to change the Presentation by choosing from different styles. These styles are html templates (processed by Smarty) which can be changed to meet your needs.

Starting with 0.4 you can now code your templates in php too. (usefull if you have problems with Smarty because of php Safe Mode settings).

To distinguish between Smarty-styles and PHP-Styles a new file needs to be placed in the style directory: style_info.php.

$pgb_styleinfo = array();

// name of the style, unused
$pgb_styleinfo['name'] = 'default';

// type of the style; smarty or php
$pgb_styleinfo['typ']  = 'smarty';

// minimum version of smarty needed
$pgb_styleinfo['min_smarty_version'] = '2.2.0';

// author and version of the style, unused
$pgb_styleinfo['author'] = 'Peter Schübl <>';
$pgb_styleinfo['version'] = '1.0';


For $pgb_styleinfo['typ'] there are to valid values: 'smarty' for Styles processed by Smarty and 'php' for Styles that contain php templates.

Startingpoint for a own style should be one of the already provided styles. Simple copy the style that closes matches your design ideas to a new directory called whatever you like.


Encompass (0.91) uses smarty (2.0.0). Since smarty is only loaded once and the theme is loaded first, smarty from Encompass is used for postguestbook too.

The style 'default' uses a feature of smarty that is not available in smarty 2.0.0. It's used to show odd and even rows (Guestbook entries) with different background colors. If you want't to use both (Encompass and the defaul style) you have to update the smarty engine in Encompass (at least 2.2.0 is needed).

The style 'schup' can be used with Encompass without modifcations.