Table of Contents

URL’s for dynamic pages include a ? followed by an identification number. For example, http://somesite.com/?id=15 or http://somesite.com/?page=15 or something similar. The part of the URL beginning with the ? is used by TalkBack as its id for comment pages.

This type of URL is usually used by CMS software. If your software uses templates that allow PHP code you should be able to use TalkBack with it. If PHP code is not allowed in your templates you cannot use TalkBack.

Because there are many different CMS and blog software packages I cannot tell you exactly how to edit your templates. I suggest you use the instructions for WordPress as a guide. Though your procedure will not be exactly the same, it may be similar.

In the template that has the <head> tag, include this PHP statement:
<?php include 'relative path to TalkBack/head-inc.php'; ?>

In the template(s) for pages that will have comments you must insert, at the point you want comments to appear, the article url and, optionally, an article title. These are specified like, for example:

$tb_article_url    = "/directoryname/?id=$article_id_variable_name";  
$tb_article_title  = $tb_article_title_variable_name;
include $_SERVER['DOCUMENT_ROOT'] . '/comments/comments.php';

$article_id_variable_name is the PHP variable that contains the database ID of the page.

The exact characters before the = character will depend on your software. If you have not set your software to use "search engine friendly" URL's, the characters you need to enter will be in your URL's.

In the template(s) that list summaries of articles followed by a link to the article and its comments you need to insert, at the point you want the comments link to appear:

$tb_article_url  = "/directoryname/?id=$article_id_variable_name"; 
$tb_permalink    = $tb_article_url OR $search_engine_friendly_url_variable_name;
tbCommentsLink('No Comments', '1 Comment', '% Comments', 'View and leave comments', '');

That will insert a link to the article’s page with link text of "No comments" or "1 comment" or "n comments". The fourth parameter inside the parentheses is the text for the link title attribute. The last, optional, parameter is the class that is to be assigned to the link.

The "permalink" is the URL that to be used to access the article. It may be the same as the value in $tb_article_url or, if you are using search engine friendly URL's, it may be that URL.

If you add TalkBack to your CMS website, send me the procedure you used and I will create instructions for it as I have done for WordPress.