Ignore:
Timestamp:
Apr 29, 2012, 5:04:37 PM (12 years ago)
Author:
mistic100
Message:

update for 2.4
deactivated for smartpocket, now compatible with simple and stripped on ContactForm
live update of preview on admin page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/include/register.inc.php

    r12619 r14527  
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    33
     4load_language('plugin.lang', CRYPTO_PATH);
    45add_event_handler('loc_end_page_header', 'add_crypto');
    56add_event_handler('register_user_check', 'check_crypto');
     
    1415function prefilter_crypto($content, $smarty)
    1516{
    16   global $conf;
    17  
    18   $search = '#\<\/ul\>(.{0,10})\<\/fieldset\>(.{0,10})\<p class\=\"bottomButtons\"\>#is';
    19   $replace = '
     17  global $conf, $user;
     18   
     19  $search = '#\(\{\'useful when password forgotten\'\|@translate\}\)(\s*)((\{/if\})?)#i';
     20  $replace = '({\'useful when password forgotten\'|@translate})$1$2
     21      </li>
    2022      <li>
    2123        <span class="property">
    22           <label>{\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate} <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image"></label>
     24          <label for="captcha_code">{\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate} <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image"></label>
     25          <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
     26            <img src="'.CRYPTO_PATH.'template/refresh.png"></a>
    2327        </span>
    24         <input type="text" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" />
    25         <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
    26           <img src="'.CRYPTO_PATH.'template/refresh.png"></a>
    27       </li>
    28   </ul>
    29 
    30   </fieldset>
    31 
    32   <p class="bottomButtons">';
     28        <input type="text" id="captcha_code" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" />';
    3329
    3430  return preg_replace($search, $replace, $content);
Note: See TracChangeset for help on using the changeset viewer.