Simple Comments Release Notes: v.950 (1/2) | WebReference

Simple Comments Release Notes: v.950 (1/2)

current pageTo page 2
[next]

Simple Comments Release Notes: v.950

By Dan Ragle

[This is a release bulletin for the Simple Comments script. For general information pertaining to the script, including the latest release download, system requirements, etc., visit the Simple Comments main page.]

After a brief sojourn with other WebReference projects, we're back with a new release of Simple Comments; our template-based commenting system designed for deployment on static Web pages. New features abound in this release, including key enhancements that allow visitors to register on your site and provide basic profile information for display to other site visitors.

Visitor Registration

"Building communities" is perhaps the most important reason for adding commenting capabilities to your Web page. Allowing your site visitors to "sound off" on your topics enables them to interact with you and other site visitors on a personal level and makes them feel like they're in fact a part of your site instead of just a bystander. Providing the comment interaction directly within the page gives you the ability to strike while the iron is hot; visitors can leave their comments as soon as they read your articles and while the information--and their thoughts--are fresh in their minds.

A Sample Visitor Profile Page.
A sample visitor profile page in Simple Comments.

Adding visitor registration capabilities to Simple Comments furthers this community-based vision by providing your visitors with the ability to supply additional profile information which can then be viewed by other site visitors. With visitor registrations, users can tell you how they feel about the particular content and also provide personal information enabling both you and other readers to get to know them a bit better. Visitor profiles allow you to include your readers within your site by offering a visitor profile page dedicated to them! They also provide you with additional content and inter-site linking; since the most recently posted comments from each visitor--with links to the pages they appear on--also appears within the visitor's profile page.

While it's true that visitor profile information could be received by your readers without requiring registrations (i.e., we could have crafted the new capabilities such that user's would not have to login to provide profile data), forcing users to register removes many tricky spots involved in such a deployment. For example, without some type of E-mail-based checking anyone could pretend to be me by simply including my E-mail address within their comment submissions. And without some type of login process (made possible by user registrations), each profiled user would have to validate by E-mail each and every comment they submitted--a tedious process we doubt many users would follow up on (and if they did, they wouldn't do it very often).

As a result, the new Simple Comments release includes a complete user registration system where users validate their profile submissions via E-mail (to prove that they really do belong to the E-mail address they claim to be from). Once their visitor profile registration is activated, they must login to the site (using the password they selected during registration) before being allowed to post comments using that E-mail (anyone else claiming to have the same E-mail address will not be allowed to post comments unless they know the password). As an added incentive, logged in users don't need to supply their display names, E-mail addresses, and home page URLs each time they submit comments; this information is retrieved automatically from their user profiles. In the spirit of the Simple Comments system, the administrator can also configure the script to force all visitor profile data submissions (both the initial registrations and any later updates) to be moderated--enabling the admin to keep complete control over the content displayed on their sites. Visitor registrations can also be turned off completely in the config.xml file (which is the default; so we'll be compatible with previous releases that didn't have support for visitor registration).

Behind the Scenes

A host of new configuration parameters control the visitor registration process on the site, the two most critical of which are visitor_registration_enabled, which controls whether or not any visitor registration will take place; and visitor_registration_required, which controls whether or not visitors must register before being allowed to submit comments. (If this parameter isn't set, Simple Comments will allow comment submissions from both registered and non-registered visitors; though non-registered visitors will not be able to submit comments using an E-mail address that was previously registered.) Both of these settings are now required settings in the config.xml file. Other key profile-related configuration settings will be discussed in a moment.

Visitor profile pages are similar to regular comment pages on your site: In fact they're regular HTML pages with an embedded SSI directive which enables the display of selected visitor profiles. You should create this page as you would any other page on your site, with the exception that you must add this directive to the page:

<!--#include virtual="/cgi-bin/comments.pl?$QUERY_STRING&action=view_profile" -->

at the exact point where you wish the visitor profile information to be displayed. Only one visitor profile page need be defined (if your site has multiple sections, separated by section entries in the config.xml file, you might want to create a separate profile page for each section of your site); when the page is called a parameter will be automatically passed to it so that the comments.pl script knows which visitor's data to be retrieved. Once you've created this page, you identify it to Simple Comments via the visitor_profile_link configuration file parameter.

Once visitor registration has been enabled, other new parameters within the config.xml file can be used to manage profile related behaviors and actions. Some of the more critical are:

For a full list of profile related options in the configuration file, please review the config.xml reference in the README.TXT file, and the CHANGES.txt file of the Simple Comments download. The README also has many other operational details that you'll want to review before implementing visitor registrations on your site.

On the next page, we review the other key changes in this release of Simple Comments. Though not nearly as extensive as the changes involved in Visitor Registration, they provide new capabilities worthy of review--especially if you were hoping for an alternative captcha system...


current pageTo page 2
[next]

Created: November 12, 2007
Revised: November 12, 2007

URL: http://webreference.com/programming/perl/comments/v.950/index.html