Advertisement:

Author Topic: secret question  (Read 957 times)

A1ber7

  • Newbie
  • *
  • Posts: 4
secret question
« on: February 03, 2013, 02:35:48 am »
Hello,
I would like information on a plugin or how to do this.
To avoid robots that automatically add ads in my site, I want to add a box with a question.Which answer unless it can not add announcement.

Thanks

lucky_strike

  • Guest
Re: secret question
« Reply #1 on: February 03, 2013, 04:23:38 am »
try this one
 add into oc-include/osclass/frm/Userformclass.php
Code: [Select]
static public function human_check_text($user = null) {
            parent::generic_input_text('humancheck',$value='Please remove all of this text',$maxlength='32') ;
        }

add into oc-include/osclass/UserAction.php into function add  {

Code: [Select]
if( Params::getParam('humancheck', false, false) !== '') {
                return 10 ;
            }
if  u have  this 10 case add another number that do not exist yet
 add into  root folder register.php into switch ($succes) cases
Code: [Select]
case 10: osc_add_flash_warning_message( _m('Human check must be empty')) ;
                                                    $this->doView('user-register.php') ;
                                            break;

and finaly  into  theme folder /user-register.php
Code: [Select]
<div class="row ui-row-text">
                            <label for="humancheck"><?php _e('Human check''modern') ; ?><em style="color:red"> *</em></label>
                                            <?php UserForm::human_check_text() ; ?>
                        </div>
  this is  php style:)
 u can add some condions un userformclass into corespondent javascript that u are using

aka js_validation  or js_validation_old
some rules and  some mesages....

humancheck: {
                   
                    maxlength: 0
                   }

into mesages
humancheck: {
                   
                    maxlength: "<?php _e("Human check must be empty"); ?>."
                }....
.. if somebody could test and improve...
regards
Lucky

lucky_strike

  • Guest