MyLifeBBS

The world with no boundaries

  • Home
  • Google Apps
  • DotNetNuke
  • Things in The Internet
  • SEO
  • Contact Me

Guide to implement re-Captcha in DotNetNuke Modules without touching the source code.

January 1, 2010 by George

If you don’t know what is re-Captcha, this article: What is re-Captcha might help you to get on foot before starting this easy implement guide to install re-CaptCha into your DNN Modules.

DotNetNuke users has long frustrated by the poor design of DotNetNuke Captcha which is has a critical flaw where the Captcha image will be cached in the server and never being refresh if you set the cache the module or the whole page. One of the common error is the DotNetNuke Captcha’s image not showing issue when the DotNetNuke has PageBlaster installed, it is a big trade off for a big site to lack of either one of them.

Despite the advantages of using re-Captcha, it has a big flaw which it has to connect to the internet to have it working properly. Else, let’s get started modifying your modules without the need of the module source code and recompiling them.

Step 1: Register yourself a Key token and download the re-Captcha.

Step 2: Unzip the download file and upload Recaptcha.dll to your DotNetNuke bin folder via FTP. (/httpdocs/bin)

Now the following guide uses Ventrian’s NewsArticle Module for demonstration.

Step 3: Download the ASCX file that handling News Article Comment layout from /DesktopModules/DnnForge – NewsArticles/Controls/PostComment.ascx

Step 4: Open it with an editor and insert the reCAPTCHA control on top of the ASCX file (after Page control)

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="PostComment.ascx.vb" Inherits="Ventrian.NewsArticles.Controls.PostComment" %>
<%@ Register TagPrefix="dnn" Assembly="DotNetNuke" Namespace="DotNetNuke.UI.WebControls"%>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

Step 5: Scroll down around line 28 where the default DNN Captcha is called:

<dnn:captchacontrol id="ctlCaptcha" captchawidth="130" captchaheight="40" cssclass="Normal" runat="server" errorstyle-cssclass="NormalRed" />

and insert the reCaptcha after it:

<dnn:captchacontrol id="ctlCaptcha" captchawidth="130" captchaheight="40" cssclass="Normal" runat="server" errorstyle-cssclass="NormalRed" />
<recaptcha:RecaptchaControl
ID="recaptcha"
runat="server"
PublicKey="[TOKEN]"            
PrivateKey="[TOKEN]"
/>

Replace the [TOKEN] with the key you get from the registration and That’s it! Now upload and replace the PostComment.ascx and go to NewsArticle Admin Setting to disable the default comment Captcha. However, due to the limitation of not touching the VB files, it is impossible to create some condition like only show reCaptcha to unregister visitors.

However, if you wish to change the reCaptcha design, here’s the guide to customize the reCaptcha design.

Hopefully reCaptcha will be integrated into more DNN modules. Btw, the above method will not work in DotNetNuke Feedback and UserDefinedTable Module due to the way they code the module.

Filed Under: DotNetNuke Tagged With: DotNetNuke Captcha, reCaptcha

Trackbacks

  1. Guide to implement re-Captcha in DotNetNuke Modules without … | DNN Blog says:
    April 27, 2010 at 1:31 am

    […] Guide to implement re-Captcha in DotNetNuke Modules without … […]

Recommended DNN Modules

SiteGround Hosting Fast and Reliable WordPress hosting that we recommend.
XMOD Pro is a very good module to create complicated forms with external database writing. You could use it to build a simple module as well. The drawbacks like custom permission and filtering might be an issue though.
Ultra Video Gallery is a very advanced multimedia module which allows you to create a site near to YouTube. It allows you to convert video directly in the website, share it, comment, membership integration and so on.
Project Management Templates, This is not a DNN module but if you need to manage your works better, try the project management templates. It helps a lot.

Post Archives

Blogroll

  • Food Promotions in Kuala Lumpur GoEatOut Promotion Page

Recommended Sites

  • DNN Store is the best place to shop for DNN modules
  • Malaysia Food Guide Best place to find malaysia food promotions and place to eat.
  • Malaysia Public Holidays A site that list out all public holidays in Malaysia with lunar calendar too

Recent Comments

  • kenny on How to modify DNN 6 login module skin design – Quick Guide
  • michelle on Turn back On Windows 8 Wifi – 100% works
  • Oracle9 on Turn back On Windows 8 Wifi – 100% works
  • AK on Turn back On Windows 8 Wifi – 100% works
  • Customizing the DotNetNuke login page : Karl’s Place on DotNetNuke Customizing your Login – PART 3

About the Author

I'm the founder of InnoChannel Sdn Bhd. We're here to help people to market their business online and also a Google Apps Premier Partner in Malaysia who provides email consultation, setup, data migration and so on.

Copyright © 2025 · News Pro Theme on Genesis Framework · WordPress · Log in