Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

Feedback on BotStop Plugin

This discussion is related to the BotStop addon.

nice little plugin.

did see this though

A typo in settings page -

Enter the second acceptable ansewr:


factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

Best Answers

«1

Answers

  • This is AWESOME , thank you @brainache . i have a private community-w/registration approval for 4000+ users and in the last month** have had to manually delete up to 30 bot reg. a day...since setting this up -not one! so e relieved..i added it to my custom theme > views> registrationapprovalphp file- thanks again **( prior to - never had a problem)

    UnderDog
  • Is this strong enough protection that I can turn off the recapcha & use this in place of it?

    Thanks

  • Great, we do not like image capcha :) and external service, many thank to you too @brainache

  • Heya, solid! However, First/Last Names is an integral addon to my site, and unfortunately they won't work together. Is it possible to adjust this addon to work in conjunction with FirstLastNames or other similar "additional registration info" plugins?

    Thanks!

  • Hi, and thank you for this plugin. How can I enable this plugin when somebody will start new discussion or reply post ?? ( I will use it for new users or guest posting)

  • I made a change for the plugin for my personal experimentation.

    This one will allow you to make changes in definitions file to change questions and answers just for internationalization and locale.

    This only works if you use Registration : Approval as your registration process.

    if you want it to work with others e.g. Basic Captcha - you can use the code I post to make your own mods.

    in class.BotStop.plugin.php

    replace the old function with this code:

        public function UserModel_BeforeRegister_Handler($Sender)
        {
            $test = $Sender->EventArguments['User']['BotCheck'];
            $a1 = C('Plugins.BotStop.Answer1');
            $a2 = C('Plugins.BotStop.Answer2');
    
               $randnumber = $Sender->EventArguments['User']['BotResult'];
    
           //  test for random question
             if ($randnumber != $test)
           // unrandomized answer one and two commented out 
           //  if ($test != $a1 && $test != $a2)
            {
            $Sender->Validation->AddValidationResult('BotCheck',T('Your humanity is suspect... Please try again.'));
            $Sender->EventArguments['Valid'] = FALSE;
            }
           // return FALSE;
        }
    

    /botstop/views/registerapproval.php

    <?php if (!defined('APPLICATION')) exit(); ?>
    <h1><?php echo T("Apply for Membership") ?></h1>
    <div class="Box">
       <?php
       $TermsOfServiceUrl = Gdn::Config('Garden.TermsOfService', '#');
       $TermsOfServiceText = sprintf(T('I agree to the <a id="TermsOfService" class="Popup" target="terms" href="%s">terms of service</a>'), Url($TermsOfServiceUrl));
    
       // Make sure to force this form to post to the correct place in case the view is
       // rendered within another view (ie. /dashboard/entry/index/):
       echo $this->Form->Open(array('Action' => Url('/entry/register'), 'id' => 'Form_User_Register'));
       echo $this->Form->Errors();
       ?>
       <ul>
          <li>
             <?php
                echo $this->Form->Label('Email', 'Email');
                echo $this->Form->TextBox('Email');
                    echo '<span id="EmailUnavailable" class="Incorrect" style="display: none;">'.T('Email Unavailable').'</span>';
             ?>
          </li>
          <li>
             <?php
                echo $this->Form->Label('Username', 'Name');
                echo $this->Form->TextBox('Name');
                echo '<span id="NameUnavailable" class="Incorrect" style="display: none;">'.T('Name Unavailable').'</span>';
             ?>
          </li>
          <li>
             <?php
                echo $this->Form->Label('Password', 'Password');
                echo $this->Form->Input('Password', 'password');
             ?>
          </li>
          <li>
             <?php
                echo $this->Form->Label('Confirm Password', 'PasswordMatch');
                echo $this->Form->Input('PasswordMatch', 'password');
                echo '<span id="PasswordsDontMatch" class="Incorrect" style="display: none;">'.T("Passwords don't match").'</span>';
             ?>
          </li>
          <li class="Gender">
             <?php
                echo $this->Form->Label('Gender', 'Gender');
                echo $this->Form->RadioList('Gender', $this->GenderOptions, array('default' => 'm'))
             ?>
          </li>
            <li>
             <?php
                echo "<br><hr>".$this->Form->Label(T('Humanity Check...  Not bots allowed!'), '');
    $q = C('Plugins.BotStop.Question');
    
    
                       $num[1] = T("one");
                       $num[2] = T("two");
                       $num[3] = T("three");
                       $num[4] = T("four");
                       $num[5] = T("five");
                       $num[6] = T("six");
                       $num[7] = T("seven");
                       $num[8] = T("eight");
                       $num[9] = T("nine");
    
                       $frand = rand(1,9);
                       $srand = rand(1,9);
    
                       $frandname = $num[$frand];
                       $srandname = $num[$srand];
                       $operand = "and";
                     //  $operand = "times";
    
                       if ($operand == "and") 
                       $answer = $frand + $srand;
    
                       if ($operand == "times") 
                       $answer = $frand * $srand;
    
    
                    // show answer
                    //  echo "the answer is $answer";
    
    
    
    
                      echo $this->Form->Hidden('BotResult',array('value' => "$answer"));
    
                      $q = sprintf(T("How much is %1s %2s %3s?"),$frandname,$operand,$srandname);
    
    
                echo $this->Form->Label($q, 'BotCheck');
                echo $this->Form->TextBox('BotCheck');    
             ?> 
                </li>
          <li>
             <?php
                echo $this->Form->Label('Why do you want to join?', 'DiscoveryText');
                echo $this->Form->TextBox('DiscoveryText', array('MultiLine' => TRUE));
             ?>
          </li>
          <li>
             <?php
                echo $this->Form->CheckBox('TermsOfService', $TermsOfServiceText, array('value' => '1'));
             ?>
          </li>
          <li class="Buttons">
             <?php echo $this->Form->Button('Apply for Membership'); ?>
          </li>
       </ul>
       <?php echo $this->Form->Close(); ?>
    </div>
    

    definitions.php placed in /plugins/Botstop/locale/en-CA/definitions.php

        <?php if (!defined('APPLICATION')) exit();
        $Definition['one'] = 'one';
        $Definition['two'] = 'one';
        $Definition['three'] = 'three';
        $Definition['four'] = 'four';
        $Definition['five'] = 'five';
        $Definition['six'] = 'six';
        $Definition['seven'] = 'seven';
        $Definition['eight'] = 'eight';
        $Definition['nine'] = 'nine';
        $Definition['Your humanity is suspect... Please try again.'] = "Your humanity is suspect... Please try again.";
        $Definition['How much is %1s %2s %3s?'] = 'How much is %1s %2s %3s?';
        $Definition['Humanity Check...  Not bots allowed!'] = "Humanity Check...  Not bots allowed!";
    

    the above code will give a different set of numbers to add each time.


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

    fh111whu606tonexStumpyJoe
  • To keep your english teachers from getting out the red pen - you could....

    change your definition in locale/en-Ca/definitions.php in the plugin to

    $Definition['Humanity Check... Not bots allowed!'] = "Humanity Check... No bots allowed!";


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Went from 20+ a day bot registrations to 0 right after setting this up.

    It's reet champion!

    UnderDog
  • I've been bombarded by spam bots in my registration lately. Hope this helps, just installed it.

  • It is not working for me. Please update your pluging. I got BONK : Something funky happened. Please bear with us while we iron out the kinks.

    Thanks

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @carlavoie

    read this thread, and also search for Bonk on this forum, to see how to get a detailed error report.

    The plugin works fine - so it's something you need to sort at your end.

  • This looks great, and while it appears to be working (it the fact its not throwing a bonk) at the start of my registration application page the first line of the php code from the class script is being echoed out ! ?php if (!defined('APPLICATION')) exit(); ?> Minus the opening < Ive checked over the code and its verbatim to that above with the changes peregrine suggests Any ideas why this may be ?

    Cheers Jim

  • I've cut and pasted it and it works for me. verify if the definitions.php, registerapproval.php, and class.BotStop.plugin.php

    all have

            <?php if (!defined('APPLICATION')) exit(); ?>
    

    or try starting over and cutting and pasting.


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

  • Ah clearly my checking was not up to scratch ! I had indeed missed the < when copy and pasting it seems. Thanks works great :)

  • @impuwat said: Peregrine,

    In /plugins/Botstop/locale/en-CA/definitions.php that you have listed above you have an error in line 3.

    $Definition['two'] = 'one';

    good spotting. let the record be corrected

    $Definition['two'] = 'two';


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

  • I did everything as written here! But when approving the program to the "plugins" and then stamped on botstop to correct the settings I phrase pops BONK!

  • there is screenshot

    1078 x 350 - 45K
  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    Search this forum for how to get past the Bonk screen to a detailed error report.

    Since following all the steps on here makes botstop work with register approval, you've missed something, or mistyped something.

    Is your forum set to Registration: approval?

  • yes i have registration approval.

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    OK, so get past the Bonk message and let us know what the full error report says.

  • Hello,

    Just installed to stop registration spam and received the following error

    /plugins/BotStop/views/registerapproval.php' view for the 'entry' controller in the 'dashboard' application. The error occurred on or near: /library/core/class.controller.php

    776:          $this->_ViewLocations[$LocationName] = $ViewPath;
    777:       }
    778:       // echo '<div>['.$LocationName.'] RETURNS ['.$ViewPath.']</div>';
    779:       if ($ViewPath === FALSE && $ThrowError)
    780:          trigger_error(ErrorMessage("Could not find a '$View' view for the '$ControllerName' controller in the '$ApplicationFolder' application.", $this->ClassName, 'FetchViewLocation'), E_USER_ERROR);
    781: 
    782:       return $ViewPath;
    783:    }
    784: 
    

    I appreciate your support with this eror.

  • x00x00 Don't PM about development, I'm not currently taking on clients MVP

    read peregrine's instructions for /botstop/views/registerapproval.php

    Don't PM about development, I'm not currently taking on clients.

    grep is your friend.

  • Why do I get a "humanity suspect" error all the time, even if I provided the right answer?

  • @tonex said: Why do I get a "humanity suspect" error all the time, even if I provided the right answer?

    you may have installed it incorrectly, perhaps if you explain what you did, you might get more help.

    If you want to debug you own version it is easy to echo what the expected answer is to see if you have what you you think you need. Read up on echo and php, it is not too difficult.


    factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!

    Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant

  • vrijvlindervrijvlinder CSS Addict MVP

    This works extremely well for me it is amazing and I am very happy with this plugin.

    |̲̅̅●̲̅̅|̲̅̅=̲̅̅|̲̅̅●̲̅̅| - ☊ - ♫ ♪ ♪ ♫ ♩ ♬ ♬ ♮ ♯ ♫ ♪ ♪ ♫ ♩ ♬ ♭ ....... (•̪●)(•̪●)

Sign In or Register to comment.