|
On this page is a collection of information pertaining to WebRef's Simple Comments Perl script that allows you to implement a basic comment posting system on the static pages of your Web site. Here you'll find the latest Simple Comments zipped distribution file, a link to the latest changelog (included in the distribution), basic features and requirements of the system, links to the individual release notes, and whatever else I can think of. To get started with Simple Comments, I recommend that you read this page in its entirety. While not mandatory, the release notes for the versions also provide some potentially helpful bits of information--especially from a developer's perspective--and may be beneficial both from an implementation and an educational perspective, i.e., even if you aren't interested in using the Simple Comments script, you may be interested in reading some of the developmental issues I've encountered while developing it; points that are elaborated upon in the release notes.
The key features and capabilities of the most recent version of Simple Comments include:
pre-formatted text(<pre></pre>), and links (<a href="blah"></a>). All other HTML tags will be converted to a literal representation. This feature can also be disabled so that no HTML tags are allowed.
Support for CAPTCHA authentication: via integration with the captchas.net or reCAPTCHA system (administrator configurable)
Support for RSS formatted comment feeds
mod_perl: Simple Comments can be run
in a mod_perl environment.To set up and use this system, you'll need Perl 5.6 or later installed on your server, the Apache Web Server with executable includes enabled (the ability to execute a Perl script when called in the HTML file as an include, see the setup instructions) access rights to create a directory outside the Web server's document root on your server, and access to place scripts into your cgi-bin. Basic Perl savvy and comfort in tossing files around on your Web server (as well as setting their access rights) will also be needed.
Though optional (beginning with .910), access to a password protected area (via Apache access controls) within your cgi-bin is also recommended; preferably reachable via an SSL server.
You will also need the following Perl modules installed on your system:
CGIXML::Simple (and XML::Parser)HTML::EntitiesHTML::TemplatePOSIXURIURI::EscapeFcntlLWP::UserAgentDigest::MD5Time::LocalMIME::Base64All but the HTML::Template module are typically installed with your Perl distribution; HTML::Template (and any others that may be missing) you can pick up from CPAN. XML::Simple is sometimes missing; if so, you may need to install both XML::Simple and XML::Parser (which XML::Simple relies on).
The following modules are recommended for use with OpenIDs (i.e., if openid_enabled is set to 1), and may in fact be required for use with some OpenID providers:
Math::BigIntMath::BigInt::GMPDigest::SHATo use CAPTCHAs in your comment submission form, you need to decide whether you prefer to use the captchas.net
system (see http://captchas.net)
or the recaptcha system
from Carnegie Mellon University (see
http://recaptcha.net).
If you select the captchas.net system, then you must first
register with and receive a user-id and shared secret from
http://captchas.net. If you select the recpatcha system,
then register on the http://recaptcha.net site. Registration
for both systems is free as of this writing; though both
request that you warn them if your usage will be somewhat
high (50k+ hits a day for captchas.net, or 100k+ hits a
day for recaptcha.net). Once you've registered, you can
then enable CAPTCHAS by including the appropriate _captcha
and/or recaptcha_ parameter settings in the
config.xml
file.
To enable administrator notifications (the
notify_admin_on_submit and notify_admin_on_visitor_confirm
options) the Web user account (the account used by the
Web server to perform system operations) must have access
to sendmail. Additionally, sendmail access is required to
enable the visitor registration system, since non-OpenID
visitors are required to confirm their E-mail addresses as
part of the registration process.
The comments script will work in both a standard and mod_perl enabled Web server.
Want to submit a test comment? On most pages of our site (including this one) we'll only publish comments that actually pertain to the article, so you can't enter stuff like test comment or hello world. On our Test Page, however, we'll let you get away with those types of comments.
The test page also shows you what the comment display templates look like "out-of-the-box," i.e., the comments are displayed on the test page with the same templates in the Simple Comments distribution file (for the comments that appear on other pages of our site, we've modified the templates to match the WebRef look and feel). You can access the test page by clicking on the following link:
You can download the latest version of Simple Comments by clicking this link: comments.zip. The download is provided as a zipped file; use your favorite extractor to unzip it.
To view a list of changes from version to version, read the CHANGES.txt file.
Refer to the Readme.txt, included in the
Zip distribution, for setup instructions.
These articles contain notes pertaining to each individual release of Simple Comments. Developers who are learning Perl may find these release notes of interest. The first release article (v.902) includes much of the information on this page, and also discusses the basic architecture of the scripts. Later release articles focus on new features, documentation of fixed bugs, and/or technical points of interest within the new release itself.
Created: September 13, 2006
Revised: August 1, 2008
URL: http://webreference.com/programming/perl/comments/index.html