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
- 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.
- Open cd_storage_conf.xml in a plain-text or XML editor.
- In the
Storageselement, add a newStorageelement and configure it to point to the User Generated Content database you created. The default name suggested for the database wasTridion_UGC. - In the
StorageBindingselement inside theStorageselement, add the following:<Bundle src="ugc_dao_bundle.xml" /> - In the
ItemTypeselement, add the following newItemelements:<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_IDis the ID of the newStorageelement you just created. Caching is initially set tofalseto 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. - Save and close cd_storage_conf.xml.
- 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.