Changeset 19428 for extensions/CryptograPHP/include/register.inc.php
- Timestamp:
- Dec 14, 2012, 3:35:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/CryptograPHP/include/register.inc.php
r17319 r19428 2 2 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 3 3 4 load_language('plugin.lang', CRYPTO_PATH);4 include(CRYPTO_PATH.'include/common.inc.php'); 5 5 add_event_handler('loc_end_page_header', 'add_crypto'); 6 6 add_event_handler('register_user_check', 'check_crypto'); … … 9 9 { 10 10 global $template; 11 12 11 $template->set_prefilter('register', 'prefilter_crypto'); 13 12 } … … 15 14 function prefilter_crypto($content, $smarty) 16 15 { 17 global $conf, $user;18 19 16 $search = '#\(\{\'useful when password forgotten\'\|@translate\}\)(\s*)((\{/if\})?)#i'; 20 $replace = '({\'useful when password forgotten\'|@translate})$1$2 21 </li> 22 <li> 23 <span class="property"> 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 = \'{$ROOT_URL}'.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false"> 26 <img src="{$ROOT_URL}'.CRYPTO_PATH.'template/refresh.png"></a> 27 </span> 28 <input type="text" id="captcha_code" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" />'; 29 17 $replace = '({\'useful when password forgotten\'|@translate})$1$2'."\n".'{\$CRYPTOGRAPHP}'; 30 18 return preg_replace($search, $replace, $content); 31 19 }
Note: See TracChangeset
for help on using the changeset viewer.