Implement the SpamFilter interface and configure any configuration options for your filter in the web.config file.
Procedure
- Create a new .NET class that implements the interface Tridion.ContentDelivery.UGC.WebService.SpamFilter.
- To implement the interface, implement the method
Comment ValidateComment(ClaimStore claimStore, Comment comment), which evaluates a comment and either rejects or accepts it.
- Configure the spam filter by opening the UGC Web application's configuration file, web.config, located in the root folder of the Web application, in a plain-text or XML editor.
- In this file, ensure the presence of one
add element in the <appSettings> section, with its key attribute set to a property name and its value attribute set to your class, and another add element specifying the assembly:
<add key="Comment.SpamFilter.Implementation" value="MyNameSpace.MySpamFilter" />
<add key="Comment.SpamFilter.Assembly" value="Assembly.Name" />