Configuring UGC in the Content Service

Some Storage Layer configuration and, to enable REL for UGC, the configuration of a Tag Bundle are necessary. Note that REL only supports read-only tags.

Procedure

  1. Navigate to the configuration location of your Content Service.
  2. Open cd_storage_conf.xml for editing.
  3. Ensure that the Storages section contains the following:
    <StorageBindings>
      <Bundle src="ugc_dao_bundle.xml" />
    </StorageBindings>
  4. Configure the UGC database connection in a new Storage element, also within the Storages section. Note that the NamespaceServiceBean is mandatory, and must be set to UGCNamespaceService. Refer to the Storage Layer configuration reference for more details on these settings. For example:
    <Storage Type="persistence" Id="ugcdb" dialect="ORACLESQL"
      Class="com.tridion.storage.persistence.JPADAOFactory" NamespaceServiceBean="UGCNamespaceService">
      <Pool Type="jdbc" Size="10" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
      <DataSource Class="oracle.jdbc.pool.OracleDataSource">
        <Property Name="driverType" Value="thin" />
        <Property Name="networkProtocol" Value="tcp" />
        <Property Name="serverName" Value="NAMEOFSERVER" />
        <Property Name="portNumber" Value="1521" />
        <Property Name="databaseName" Value="NAMEOFUGCDB" />
        <Property Name="user" Value="USERNAME" />
        <Property Name="password" Value="PASSWORD" />
      </DataSource>
    </Storage>
  5. In the ItemTypes section, ensure the presence of the following Item elements:
    <Item typeMapping="Comment" cached="false" storageId="ugcdb"/>
    <Item typeMapping="CommentMeta" storageId="ugcdb"/>
    <Item typeMapping="Rating" cached="false" storageId="ugcdb"/>
    <Item typeMapping="UGCUser" cached="false" storageId="ugcdb"/>
    <Item typeMapping="UGCItemStats" cached="false" storageId="ugcdb"/>
    <Item typeMapping="UGCNamespace" storageId="ugcdb"/>

    where the value of the storageId is the same as that of the Id attribute in the Storage element you just added (ugcdb in this example).

  6. Save and close cd_storage_conf.xml
  7. In the same folder, open cd_dynamic_conf.xml for editing.
  8. Ensure that the file contains the following TCDLEngine section:
    <TCDLEngine>
      <TagBundle Resource="ugc_renderer_bundle.xml" />
    </TCDLEngine>
  9. Save and close cd_dynamic_conf.xml.