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/contactform.inc.php

    r12617 r14527  
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    33
     4load_language('plugin.lang', CRYPTO_PATH);
    45add_event_handler('display_contactform', 'add_crypto');
    56add_event_handler('check_contactform_params', 'check_crypto');
     
    1819  global $conf;
    1920 
    20   $search = '
     21  $search = '<td class="contact-form-right"><textarea name="cf_message" id="cf_message" rows="10" cols="40">{$CF.MESSAGE}</textarea></td>';
     22  $replace = $search.'
     23      </tr>     
    2124      <tr>
    22         <td class="contact-form-left">&nbsp;</td>
    23         <td class="contact-form-right"><input class="submit" type="submit" value="{\'cf_submit\'|@translate}"></td>
    24       </tr>';
    25   $replace = '     
    26     <tr>
    27       <td class="contact-form-left" style="vertical-align:top;">
    28         {\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate}
    29         <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
    30       </td>
    31       <td class="contact-form-right"><input type="text" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" />
    32         <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
    33           <img src="'.CRYPTO_PATH.'template/refresh.png"></a>
    34       </td>
    35     </tr>'
    36   ."\n".$search;
     25        <td class="contact-form-left" style="vertical-align:top;">
     26          {\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate}
     27          <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
     28          <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
     29            <img src="'.CRYPTO_PATH.'template/refresh.png"></a>
     30        </td>
     31        <td class="contact-form-right"><input type="text" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" /></td>';
    3732 
    3833  return str_replace($search, $replace, $content);
Note: See TracChangeset for help on using the changeset viewer.