On the machine where your Community service is installed, configure the DoubleCommentingValidator in the cd_ugc_conf.xml configuration file to enforce a minimum interval between comments on the same item by the same visitor, or to disable multiple comments by the same visitor on the same item altogether.
Procedure
- Access the configuration location of the Community service.
- Open the cd_ugc_conf.xml configuration file in a text editor.
- Uncomment the
<ContentValidators> section, if commented out.
- Uncomment the Double Commenting Validator:
<ContentValidator Implementation="com.sdl.web.ugc.validation.DoubleCommentingValidator">
<Timeout>60000</Timeout>
</ContentValidator>
- The
<Timeout> element specifies the allowed interval between two comments by the same visitor on the same item. The default value is set to 60000 (milliseconds = 1 minute). Configure the <Timeout> element as follows:
- set the
<Timeout> element to different number of milliseconds.
- set the
<Timeout> element to -1 to disallow more than one comment by the same visitor on the same item.
- Save and close cd_ugc_conf.xml.
- Restart the Community service.