Documentation Center

Activating the Double Rating Validator

On the machine where your Community service is installed, configure the DoubleRatingValidator in the cd_ugc_conf.xml configuration file to disable multiple ratings by the same visitor on the same item altogether, or to enforce a minimum interval between ratings on the same item by the same visitor.

Procedure

  1. Access the configuration location of the Community service.
  2. Open the cd_ugc_conf.xml configuration file for editing.
  3. Uncomment the <ContentValidators> section, if commented out.
  4. Uncomment the Double Rating Validator:
    <ContentValidator Implementation="com.sdl.web.ugc.validation.DoubleRatingValidator">
    	<Timeout>-1</Timeout>
    </ContentValidator>
  5. The <Timeout> element specifies the allowed interval between two ratings by the same visitor on the same item. Configure the <Timeout> element as follows:
    • set the <Timeout> element to a different number of milliseconds, for example 60000 (milliseconds = 1 minute)
    • set the <Timeout> element to -1 (the default) to disallow more than one rating by the same visitor on the same item.
  6. Save and close cd_ugc_conf.xml.
  7. Restart the Community service.