Configuring storage of UGC comments and ratings

Configure in cd_storage_conf.xml where User Generated Content comments, ratings user data and item statistics are stored.

Procedure

  1. Access the following directory where your Community Web Service is running:
    • the WEB-INF/classes/ directory in a JSP Web application.
    • the bin\config\ subfolder in a .NET Web application.
  2. Open cd_storage_conf.xml in a plain-text or XML editor.
  3. In the Storages element, add a new Storage element and configure it to point to the User Generated Content database you created. The default name suggested for the database was Tridion_UGC.
  4. In the StorageBindings element inside the Storages element, add the following:
    <Bundle src="ugc_dao_bundle.xml" />
  5. In the ItemTypes element, add the following new Item elements:
    <Item typeMapping="Comment" cached="false" storageId="STORAGE_ID" />
    <Item typeMapping="Rating" cached="false" storageId="STORAGE_ID" />
    <Item typeMapping="UGCUser" cached="false" storageId="STORAGE_ID" />
    <Item typeMapping="UGCItemStats" cached="false" storageId="STORAGE_ID" />

    where STORAGE_ID is the ID of the new Storage element you just created. Caching is initially set to false to keep the Web site as up-to-date as possible. Consult the SDL Tridion core documentation to learn about turning caching on and configuring caching time.

  6. Save and close cd_storage_conf.xml.
  7. Access your Moderation Web Service and copy and paste the cd_storage_conf.xml file you just saved into the WEB-INF/classes/ subdirectory (JSP) or bin\config\ subfolder, overwriting the existing cd_storage_conf.xml.