+

Search Tips   |   Advanced Search

Filtering content for tagging

We can use filtering mechanisms to control which terms users can use and which terms they cannot use as tags. The portal provides both a blacklist and a whitelist filter. You enable and disable both filters in the WebSphere Integrated Solutions Console under the Resource Environment Provider > CPConfigService for tagging and rating. For details see the topics about Setting service configuration properties and the CP Configuration Service for tagging and rating.

We can configure both filter lists using the XML configuration interface. The following examples show how to add or remove terms to the blacklist. To work with the whitelist, adapt the examples by changing the ID of the filter from DefaultBlacklistFilter to DefaultWhitelist Filter. Sample scripts for the XML configuration interface are located under the directory PortalServer_root/doc/xml-samples.Example: Creating new words to the blacklist filter:

This sample snippet registers the two words badword_1 and badword_2 with the blacklist filter for all locales. Note that we must specify DefaultBlacklistFilter for the attribute id of the tag filter. We can optionally specify the attribute locale for the tag filter data. After we run this XML script, users will not be able to use badword_1 or badword_2 as tags. Example: Creating or deleting individual words:

This sample snippet removes the term badword_1 and adds badword_3 from the blacklist.Example: Deleting all terms from the blacklist filter:

This sample snippet deletes all terms from the blacklist.

Parent topic: How tagging and rating works in the portal

References: