Comment Closer

Many Web sites that allow comments on their content are blogs and, therefore, do not need to leave comments open indefinitely. If this is true for your Web site, you should consider installing the Comment closer module. This simple module does exactly what its name implies: After a fixed amount of time, it disallows visitors from commenting on specific types of content.

To install the Comment closer module, follow the instructions in Appendix A that explain how to install a Drupal module. The project page for this module can be found at http://drupal.org/project/commentcloser.

Once installed, the module can be easily configured by navigating to Administer, Site configuration, Comment closer. A simple menu allows you to choose which content types should have their comments automatically turned off, and at what point this termination should happen (see Figure 7.10).

You must configure three options with the Comment closer module:

1. Node type: the type of content you want to control with comment closer.

2. Older than: the age of the content that should be closed.

3. Execute: how often the creation date of the content should be checked.

Comment closer

Mode types:

image page story

Older than:

month

W

Execute:

daily

Save configuration ] [ Reset to defaults ]

FIGURE 7.10 Comments can be easily closed on a timed basis using the Comment closer module.

FIGURE 7.10 Comments can be easily closed on a timed basis using the Comment closer module.

The Comment closer module should be "executed" more frequently than the age check. For example, you would check for content "older than" a week every day.

This module requires the simultaneous use of cron, Drupal's automated scheduling tool. To confirm that cron is running automatically, navigate to Administer, Reports, Status report. Look for the section on "Cron maintenance tasks." If cron has not run recently, you will need to configure your Web server to trigger Drupal's scheduling tool. Chapter 2 of this book describes how to set up a cron job.

Was this article helpful?

0 0

Post a comment