Create CMS Website

Comments on content

The Beginner's Tutorial
How To Create Own Website with CMS Made Simple

Comments on every page

Do you like blog comment feature? You do not need a blog to have the same functionality on each CMS Made Simple page and even integrated in your News or Photo Gallery. CMS Made Simple includes simple but powerful module – Comments.

Features of the module Comments

  • Adds comments feature to every CMS page
  • Adds comments feature to every other module (e. g. News or Album)
  • Optional moderation function: inactivate new comments and approve them before showing on the website
  • Spam protection with Captcha and / or Akismet plugin
  • Enable or disable HTML in comments
  • E-mail notifications for administrator if new comments are added
  • Cookie support to store values entered by visitors in the fields Name, e-mail etc.
  • Notify visitors if new comments are added to the page where they have left their comment
  • Limit the number of comments on the page

To install the module in the admin panel select Extensions → Module Manager and choose on the tab "Available modules" the letter “C”. Find module Comments and click on “Dependencies” first! There are two modules that have to be installed before you can run module Comments: CGExtensions and CGSimpleSmarty. Search for this modules the same way you have searched for Comments in the Module Manager and install them (if they are not already installed). Click on „Download & Install" beside each module. At the end download and install Comments.

If you would like to use module on one single page, open the page in Content → Pages and add the line as shown below into the field “Content” at the place where list of comments and a comment submission form should be shown.

{cms_module module=”Comments”}

If you would like to add comments to each page then add above line to your template (not page!) at the place where list of comments and comment submission form should be shown.

Protecting comments from spam

Unfortunately any possibility to interact with visitors of your website are nowadays “penalized”. If you do not protect your comments from spam properly your website would get huge number of spam comments. There are many ways to protect your comments from spamming. You can use one or combine one of them till you get the best results for you.

  1. Do not allow using HTML in the comments (Content → Comments → Options → Disable HTML)
  2. Activate Moderation function, so that new comments are not shown on the website immediately but have to be activated by website administrator.
  3. Install Captcha module and activate Spam protection (Content → Comments → Options). Note: if you do not reconfigure standard settings for Captcha module it would not protect you enough.
  4. Delete website field from your comments. If no web address can be committed, your website will get “unattractive” for spammers. You can delete the field in the template of comments module (Content → Comments → Comment Display Template)
  5. Install module CMSakismet, configure it and activate protection with Akismet. Warning: very poor performance. It can take up to 30 seconds for visitors to see the message, that comment has been posted.

Adding comments to other modules

You can add comments to other modules, such as News or Photo Gallery. In this case you add the Smarty tag to the detail view of the module template. Let’s see how to do it on the example of News module.

In the admin console click on Content → News and switch to the tab Detail Template. Open the template you use to display the detail view of the news item. At the very end of the template add:

{cms_module module="Comments" modulename="News" pageid=$entry->id}

For allowing to comment pictures in your photo gallery open Content → Photo Albums, switch to the tab "Templates" and open the template you use to display your album for edit. Search a part where a "big" picture is displayed and add comments as shown below:

{if $pictureid !=0}
{* Big Picture *}
…………
{cms_module module="Comments" modulename="Album" pageid=$pictureid}
{/if}

Do not forget to configure your CMSMailer module as well. If the settings are not corrected no e-mails will be sent to you or your visitors from your CMS.


Comments to "Comments on every page"

  1. Fabrício Olmo Aride September 3, 2009, 3:12 pm

    Congratulations for your website! It's very well explained and I've learnt a lot by reading it. Could you help me with the article "Comments on every page"? I created comment module for my News page according to your step-by-step but when I try to submit the comment there's a very low performance and I don't receive the message "Posted Successfuly". In the other hand, when I look at the admin pannel the message has already been posted and waiting for administrator approval. I uninstalled CMSakismet, but the problem persists. Thanks!


  2. Seychelles January 8, 2010, 10:50 am

    To interact whis the user is in general a funny thing. But a capture protects only automatic mailer. A problem is also "manual spam". The only way to avoid this is to deactivate the website field. This is my experience. Otherwise you will have a lot of "link-collectors" in your coments ...


del.icio.us digg stumbleupon buzzup BlinkList mixx myspace linkedin facebook reddit.com ma.gnolia.com newsvine.com furl.net google yahoo technorati.com

CMS Made Simple Beginner's Guide
Loading...