Page Comments Script: Version 6

The type of comments system offered here is one where a page of your site is displayed and at the bottom of the page are the comments which visitors have made (about the page content, we hope). As visitors add their own comment, these comments are automatically added to those displayed whenever anyone views that page.

To use the script, add the following code where you want the comments system to appear on any page (use a DIFFERENT number for each page).

$page_id = "6"; // for example

The downloadable zip file version will not work properly when you use mod_rewrite for 'pretty' URLs. An astute (or persistent) user has suggested a solution which you may want to try.

A single configuration file allows you to adjust various parameters used by the scripts with no need to edit script files.

Script Features

  • Font style and colour for posts adjustable independent of your style sheet
  • Date/time of postings format configurable to suit your preferences
  • Adjustable language file for non-English users
  • Country flags shown for each poster - if you have country flags 'active' and the poster selects a flag*
  • Comments system can be 'turned off' site-wide by adjusting configuration file
  • Options for 'bad words' handling: post as is, moderate words like **** and post, or refuse to post
  • Comments pagination limit/page configurable
  • Database logs name/location and visitor comments, and IP address and time/date of posting
  • Displays 'advisory' pages where posts contain swear words, 'spam', etc.
  • Uses CAPTCHA images for protection against spambots. GD library required
  • Improved spam rejection (viagra, cialis,etc. posts rejected outright)
  • Optional e-mail notification of all comments posted
  • Works with register_globals off
  • Very long comments can be truncated and link to new page to show full comment
  • Very long strings (repetitive rubbish) rejected
  • Optional ratings for articles (two alternatives)
  • Optional administrator approval before posting
  • Optional administrator comment on comments
  • Comments editor now included in the download package
  • Extended documentation included
  • 'flood control' based on IP address. Flood control can be on or off; the delay between posts can be adjusted, and flood control can be chosen for all pages or on a per page basis.

New Features in Version 6

  • Fixing (or attempting to fix) issues with apostrophes, php version 4/version 5 and server settings differences» new feature
  • An overhaul of the comments editor that will include options to 'bulk approve' or 'bulk delete' comments» new feature
  • An extended set of country flags (with some improved to be better recognizable)» new feature
  • Much better images used in the 'response' pages - a hint of Web 2.0 (whatever that means)» new feature
  • comment display format change to make ratings align nicely regardless of how long the date string is» new feature
  • A collection of php snippets you can (figure out how to) use on other pages - show # comments in past month, past year; show #countries from which you've had visitors; show the average rating of all pages (in a separate page); and so on.» new feature

* the country flags option requires flags! These are not included in the download file. Instead, if you want the flags file - which you should unzip to the images/flags folder - it's an 80kb download available here.

Download 138kbView DocumentationSee Demonstration

 print page

© Copyright DigitalMidget  - all rights reserved

Welcome - to the bottom of the page. Normally there's nothing of any interest below the content, but on this site there's a "reward" for those of you who read this far.

This site uses valid xHTML and valid CSS. Shazam!! Not only is it valid, but it also meets a reasonable accessibility standard. And you can verify any of those claims by clicking the icons on the right.