Documentation Center

Activating the Double Commenting Validator

On the machine where your Community Web 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 Web application that contains the Community Web Service.
  2. Do one of the following:
    • If you use a .NET Web application, access the bin\config\ folder.
    • If you use a Java Web application, the WEB-INF/classes subdirectory.
  3. Open the cd_ugc_conf.xml configuration file in a text editor.
  4. Uncomment the <ContentValidators> section, if commented out.
  5. Uncomment the Double Commenting Validator:
    <ContentValidator Implementation="com.sdl.web.ugc.validation.DoubleCommentingValidator">
    	<Timeout>60000</Timeout>
    </ContentValidator>
  6. 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.
  7. Save and close cd_ugc_conf.xml.
  8. Restart the Web application.