Changeset 19428 for extensions/CryptograPHP/include/category.inc.php
- Timestamp:
- Dec 14, 2012, 3:35:07 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/CryptograPHP/include/category.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_begin_index', 'add_crypto'); 6 6 add_event_handler('user_comment_check_albums', 'check_crypto', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); … … 9 9 { 10 10 global $template; 11 12 if (!is_a_guest()) return;13 14 11 $template->set_prefilter('comments_on_albums', 'prefilter_crypto'); 15 12 } … … 17 14 function prefilter_crypto($content, $smarty) 18 15 { 19 global $conf;20 21 16 $search = '{$comment_add.CONTENT}</textarea></p>'; 22 $replace = $search.' 23 <p><label>{\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate} :</label></p> 24 <p> 25 <img id="captcha" src="{$ROOT_URL}'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image"> 26 <a href="#" onclick="document.getElementById(\'captcha\').src = \'{$ROOT_URL}'.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false"> 27 <img src="{$ROOT_URL}'.CRYPTO_PATH.'template/refresh.png"></a> 28 <input type="text" name="captcha_code" style="width:'.$conf['cryptographp']['code_length'].'em;" maxlength="'.$conf['cryptographp']['code_length'].'" /> 29 </p>'; 30 31 return str_replace($search, $replace, $content); 17 return str_replace($search, $search."\n{\$CRYPTOGRAPHP}", $content); 32 18 } 33 19
Note: See TracChangeset
for help on using the changeset viewer.