Table of Contents

A static page is one that physically exists on your website as an HTML or PHP file. The URL for the page points to a physical file.

If you are adding comments to an existing page you must change the file extension from .html to .php. Note that there is an alternative to changing the file extension. Read File Extensions for more information.

In the <head> section of your page

Insert this line anywhere after the links to your stylesheet and javascript:

<?php include 'path/head-inc.php'; ?>

head-inc.php contains the links to javascripts and stylesheets required by TalkBack. path is the path to your TalkBack directory from the directory in which your guestbook or comments page resides. You need to edit it and insert the actual relative or absolute path to the TalkBack directory. If you are not familiar with HTML paths, read this tutorial.

There are some optional parameters:

<?php 
   // insert these only if, for this page, you want to override the defaults

   $tb_closed = 'Y';         // 'Y' means no more comments can be entered for this page
                             // empty or absent means comments are open
   $tb_language = 'french';  // overrides default language

   // these override the normal templates
   $tb_comments_display_tpl    = '/talkback/filename.php';
   $tb_comments_form_tpl       = '/talkback/filename.php';
   $tb_comments_preview_tpl    = '/talkback/filename.php';
   $tb_comments_reply_tpl      = '/talkback/filename.php';

   // this is used if captcha is enabled, otherwise it is ignored
   // if absent, theme defaults to 'custom'
   // choices are: custom, white, red, clean, blackglass
   $tb_captcha_theme = 'white';   

   include 'relative path/head-inc.php'; 
?>

Body tag

images/wait_animation.gif is displayed when the user clicks on submit or preview. After an error or preview if the user returns to the entry page by using the browser back button, waiting.gif will still be displayed. To stop it from being displayed in those circustances insert this in your body tag: <body onunload="unsetWaitGif();">.

In the <body> section of your page

At the point in the page that you want comments to appear, insert:
<?php require 'path/comments.php'; ?>

Do not use a URL. This will cause an error when a comment is submitted:
<?php require 'http://yoursite.com/talkback/comments.php'; ?>

If you do not know the relative path, use this:
<?php include $_SERVER['DOCUMENT_ROOT'] . '/talkback/comments.php'; ?>