Applying CodeBetter Captcha to Community Server 2007

Everybody knows that spam is so annoying, because it flood our system with dummy text. To avoid the spam, we need the Captcha control.

In this post, I would like to show you how to apply CodeBetter Captcha Control to Community Server 2007. (Thanks to Brendan Tompkins for sharing this handy control)

Please download the source here

1. Copy CodeBetter.CommunityServerExtensions.dll to our community server bin directory.

2. Open your web.config file. Find <httpHandlers> section. Add the following code there:

<add path="captcha.ashx" verb="GET" type="CodeBetter.CommunityServerExtensions.CaptchaImageHandler, CodeBetter.CommunityServerExtensions"/>

image

3. Find Default.browser in the “\App_Browsers” folder.

In the <controlAdapters> section, add the following code.

For the create user form:

<adapter controlType="CommunityServer.Controls.CreateUserForm"
adapterType="CodeBetter.CommunityServerExtensions.CaptchaControlAdapter, CodeBetter.CommunityServerExtensions" />

Adding the code above will make the CodeBetter CSExtension engine create a captcha control above the Join Now! button.

image

4. This step is optional (if you find that your captcha still doesn’t work well).

Apply ValidationGroup=”CreateCommentForm” to <CSControl:CreateUserForm section.

Apply ValidationGroup=”CreateCommentForm” to other validation controls such as CustomValidator, RequiredFieldValidator, etc.

image

It should be work well now :)

Share this post: | | | |
Published Sunday, June 7, 2009 7:28 AM by Wely
Filed under:

Comments

# Applying CodeBetter Captcha to Community Server 2007

This article is taken from here . I added this blog entry to my site because I&#39;ve applied it to my

Powered by Community Server (Commercial Edition), by Telligent Systems