Documentation Center

Activating the Double Commenting Validator

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

  1. Access the configuration location of the Community service.
  2. Open the cd_ugc_conf.xml configuration file in a text editor.
  3. Uncomment the <ContentValidators> section, if commented out.
  4. Uncomment the Double Commenting Validator:
    <ContentValidator Implementation="com.sdl.web.ugc.validation.DoubleCommentingValidator">
    	<Timeout>60000</Timeout>
    </ContentValidator>
  5. 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.
  6. Save and close cd_ugc_conf.xml.
  7. Restart the Community service.