Comment Information on External Pages

You can display comment information on external pages like number of comments and data of the last comment.

In order to make this work you need to include the file include.php as described in the chapter Include the Script.

We assume you want to display information for your comment page with following URL:

The path you need to use in your function calls would be:


Following function calls are available (replace /path/to/file.php with the path of your page):

Number of Comments

<?php echo c5t_comment::number_of_comments('/path/to/file.php'); ?>

Total Number of Comments in the Database

<?php echo c5t_comment::number_of_comments(); ?>

Last Comment

<?php echo c5t_comment::latest_comment('comment', '/path/to/file.php'); ?>

Last Author

<?php echo c5t_comment::latest_comment('author', '/path/to/file.php'); ?>

Last E-Mail

<?php echo c5t_comment::latest_comment('email', '/path/to/file.php'); ?>

Last Homepage

<?php echo c5t_comment::latest_comment('homepage', '/path/to/file.php'); ?>

Title Last Comment

<?php echo c5t_comment::latest_comment('title', '/path/to/file.php'); ?>

Date Last Comment

<?php echo c5t_comment::latest_comment('date', '/path/to/file.php'); ?>

Time of Last Comment

<?php echo c5t_comment::latest_comment('time', '/path/to/file.php'); ?>

Cache Time

The script fetches the data from a cached file that is updated every five minutes. If you want to change this value, you can do so in the file /configuration/

$c5t['comment_info_cache'] = 300;

The value is seconds.