Ignore:
Timestamp:
Nov 13, 2011, 1:19:28 PM (12 years ago)
Author:
mistic100
Message:

fix display on some themes, disable on ContactForm for simple and stripped themes (stupid bug)

Location:
extensions/CryptograPHP/include
Files:
3 edited

Legend:

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

    r12617 r12619  
    1818  global $conf;
    1919 
    20   $search = '<input type="hidden" name="key" value="{$comment_add.KEY}">';
    21   $replace = $search.'
     20  $search = '#<input type="hidden" name="key" value="{\$comment_add\.KEY}"([ /]*)>#';
     21  $replace = '<input type="hidden" name="key" value="{$comment_add.KEY}"$1>'.'
    2222  <label>
    2323    <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
     
    2929  </label>';
    3030
    31   return str_replace($search, $replace, $content);
     31  return preg_replace($search, $replace, $content);
    3232}
    3333
  • extensions/CryptograPHP/include/picture.inc.php

    r12617 r12619  
    1818  global $conf;
    1919 
    20   $search = '<input type="hidden" name="key" value="{$comment_add.KEY}">';
    21   $replace = $search.'
     20  $search = '#<input type="hidden" name="key" value="{\$comment_add\.KEY}"([ /]*)>#';
     21  $replace = '<input type="hidden" name="key" value="{$comment_add.KEY}"$1>'.'
    2222  <label>
    2323    <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
     
    2929  </label>';
    3030
    31   return str_replace($search, $replace, $content);
     31  return preg_replace($search, $replace, $content);
    3232}
    3333
  • extensions/CryptograPHP/include/register.inc.php

    r12617 r12619  
    2020      <li>
    2121        <span class="property">
    22           <label><img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image"></label>
     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>
    2323        </span>
    24         <b>{\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate} :</b><br>
    2524        <input type="text" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" />
    2625        <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
Note: See TracChangeset for help on using the changeset viewer.