+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / SpamProtector setup how-to?

SpamProtector setup how-to?

4 posts, 0 answered
  1. JohnGassman
    JohnGassman avatar
    18 posts
    Registered:
    03 Nov 2006
    29 Jan 2009
    Link to this post
    Hello,

    I am trying to get SpamProtector controls placed on my existing forms. Is there a step-by-step for how to do this? I have them in place, and my code-behind already has "IsValid" checking. I set up the "honeypot" and "timing" features, but I don't see the hidden textbox in the page (I turned off CSS, expecting to see it).

    Is there any web.config changes necessary? Sorry if this is posted elsewhere, but searching did not turn up anything.

    Thank you,
    John Gassman
    Workstate Consulting

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Jan 2009
    Link to this post
    Hello JohnGassman,

    Here is a simple example of an user control with a spam protector.

    .ascx:
    <asp:TextBox ID="textbox1" runat="server" ValidationGroup="box" size="30" ></asp:TextBox><br /> 
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /> 
     
        <cc:SpamProtector ID="SpamProtector1" runat="server"  
         CaptchaFontWarp="Low"  
         CaptchaLineNoise="None"  
         EnableCaptcha="true"    
         CapcthaInvalidInputMsg="Input does not match the characters in the image."  
         CaptchaFontFamilyName="Verdana"  
         TabIndex="5"  
         mintimeout="2" 
         CaptchaExpirationMsg="Too much time has elapsed! Please try again." 
         enablemintimeoutstrategy="true" 
         ValidationGroup="box" 
         CaptchaLength="5"  
         CaptchaTextBoxTabIndex="6"  
         CaptchaMaxTimeout="3000"  
         CaptchaImageCssClass="captchaImage"  
         CaptchaTextBoxCssClass="captchaText"  
         CaptchaTextBoxLabelCssClass="captchaText"  
         CaptchaPossibleChars="LettersAndNumbers"  
         ErrorMessageCssClass="captchaError"  
         EnableAutoDiscovery="false"  
         EnableHiddenTextBox="false" /> 
          
                      
       <asp:Button ID="button2" runat="server" Text="submit" CausesValidation="true"  
        ValidationGroup="box" onclick="button1_Click1"/> 

    and the code behind:
    protected void Page_Load(object sender, EventArgs e) 
        { 
     
        } 
        protected void button1_Click1(object sender, EventArgs e) 
        { 
            if (this.Page.IsValid) 
                Label1.Text = textbox1.Text; 
        } 

    You may find the following thread in our Developer Manual useful: http://www.sitefinity.com/help/developer-manual/extending-spam-protector-custom-strategies.html

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. JohnGassman
    JohnGassman avatar
    18 posts
    Registered:
    03 Nov 2006
    30 Jan 2009
    Link to this post
    Hello Ivan,

    Thank you for the info! Though, I am still not sure what (if anything) needs to be done in web.config to "enable" the SpamProtector stuff.

    This section of the web.config was mentioned in one of the documents I read (sorry, not sure which one) - sorry about the format, I don't see a code formatting option in my editor now:

            <spamProtector defaultProvider="akismet" disabled="false">
                <providers>
                    <add name="akismet" type="Telerik.Cms.Engine.SpamProtector.AkismetProvider" key="c0e8868fd509" siteUrl="http://www.telerik.com/"/>
                </providers>
            </spamProtector>

    Are these default values correct? If not, what do I need to change?

    Thank you!

    Regards,
    John Gassman
    Workstate Consulting
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    04 Feb 2009
    Link to this post
    Hello JohnGassman,

    The values in the web.config are correct. Something is going wrong with the form you have. The lines from the web.config file you are referring to, are responsible for the spam filter in Sitefinity by akismet (www.akisment.com). If you have a key that is generated for your domain name you can turn on this protector for your blogs. There are free and paid keys. Free keys have a limited coverage over the spam. Akismet generally does filter mostly over author, comment and url.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered