Advertisement:

Author Topic: Secret Question  (Read 925 times)

A1ber7

  • Newbie
  • *
  • Posts: 4
Secret Question
« on: February 17, 2013, 01:14:22 pm »
Hello,
A question I, too, can add osclass a secret question like:
5 +2 =
and to add an announcement to be forced to answer the question correctly.

phpd

  • Full Member
  • ***
  • Posts: 236
Re: Secret Question
« Reply #1 on: February 17, 2013, 01:53:30 pm »
u can activate captcha instead

lucky_strike

  • Guest
Re: Secret Question
« Reply #2 on: February 17, 2013, 04:47:30 pm »
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"); ?>."
                }....
..  u can change  as your wish... the main idea remains
regards
Lucky

A1ber7

  • Newbie
  • *
  • Posts: 4
Re: Secret Question
« Reply #3 on: February 20, 2013, 04:45:32 am »
I noticed that you have not offered you to add ads, is to register users.I am interested in adding something special announcements.Thank you!