Overview
The User Comments Module is a plug n' play widget for your website, allowing you to quickly set up a comments section on any page for your visitors to leave feedback. See below, in the comments section !
It relies on SQLite library for PHP, thus bypassing the use of heavy, server-oriented database systems such as MySQL that require annoying admin work to deploy. Indeed, SQLite only involves .db files created on the fly and easily accessible via FTP.And jQuery is, of course, the choice for dynamic web app behaviors !
Download
Version 1.0 (last updated Sept. 14th 2010) - UserCommentsModule1.0.zip - PHP5 (5.2 and up) with SQLite 2.1 module enabled - 180Kb - GNU GPL 3.0 Licensed
Installation
Please note that a ready-to-use EXAMPLE.php5 file is available in the zipped package for you to perform tests before actually including the widget in your page.
- Download the UserCommentsModule1.0.zip package, unzip it and upload the
usercommentsfolder found inside the package to the root of your website (that's where your index file lies). - Open the php5 page file in which you wish to include the User Comments Module.
- Upload the jQuery file
jquery.jsincluded in the package at the same level as theusercommentsfolder and link it from the<head>tag in the chosen target file with the following :<script src="./jquery.js" type="text/javascript"></script> - Still in the
<head>tag, add a link to the widget's javascript file :<script src="./usercomments/interaction.js" type="text/javascript"></script> - Make sure a session is opened at the very beginning of the script (ie. before any HTML tag) with the following :
<?php session_start(); ?> -
Then copy/paste the following and customize with your own values and needs :
<?php $UC_MODULEID = "default"; $UC_EMAIL = "contact@example.com"; ?> $UC_MODULEIDsets the name of the .db file that will be created. It is important to choose that name well, because if you decide to run multiple User Comments Modules on different matters but those bear the same name, all their comments will be centralized in a unique file (ie../usercomments/data/usercomments_uniquenameyouchose.db) and displayed all together.$UC_EMAILsets the email address where a notification will be sent to alert you, the webmaster, that a comment has been posted and requires moderation before publishing. Try and use an email address within the same domain as the one in the url of the page including the widget : that will help avoid automatic spam-fighting robots from removing the alerts from your inbox.- And finally, include the widget at the desired location in the page :
<?php include("./usercomments/UC_INCLUSION.inc"); ?> - Security 1/2 : You're almost there, the remaining task is codeless : choosing a password from within the embedded CMS. In order to do that, using your favorite browser, proceed to the page where you've included the widget, and click on the lock icon displayed at the top-right corner of the User Comments Module. Type in the new pass, confirm with typing it in a second time and hit enter.
- Security 2/2 : inside the
usercommentsfolder found in the package, lies adatafolder with a.htaccessfile in it. Do not erase that file ! It protects the .db files, that contain the comments, from being wildly opened from outside the widget (ie. bypassing your moderation decisions...).
Comments
Technologies
The User Comments Module uses the following technologies :

07/23/2011 20:53
09/15/2010 02:51