Changeset 14527


Ignore:
Timestamp:
Apr 29, 2012, 5:04:37 PM (8 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

Location:
extensions/CryptograPHP
Files:
5 added
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/admin.php

    r12619 r14527  
    1111    'theme'           => $_POST['theme'],
    1212    'captcha_type'    => $_POST['captcha_type'],
    13     'case_sensitive'  => $conf['cryptographp']['case_sensitive'], //not used, problem with some fonts
     13    'case_sensitive'  => 'false', //not used, problem with some fonts
    1414    'width'           => (int)$_POST['width'],
    1515    'height'          => (int)$_POST['height'],
     
    3030
    3131$presets = array(
    32   'bluenoise' => array('perturbation'=>0.25, 'image_bg_color'=>'ffffff', 'text_color'=>'0000ff', 'num_lines'=>2, 'line_color'=>'0000ff', 'noise_level'=>2, 'noise_color'=>'0000ff', 'ttf_file'=>'AlteHassGroteskB'),
    33   'gray' => array('perturbation'=>1, 'image_bg_color'=>'ffffff', 'text_color'=>'8a8a8a', 'num_lines'=>2, 'line_color'=>'8a8a8a', 'noise_level'=>0.1, 'noise_color'=>'8a8a8a', 'ttf_file'=>'TopSecret'),
    34   'xcolor' => array('perturbation'=>0.5, 'image_bg_color'=>'ffffff', 'text_color'=>'random', 'num_lines'=>1, 'line_color'=>'ffffff', 'noise_level'=>2, 'noise_color'=>'ffffff', 'ttf_file'=>'Dread'),
    35   'pencil' => array('perturbation'=>0.8, 'image_bg_color'=>'9e9e9e', 'text_color'=>'363636', 'num_lines'=>0, 'line_color'=>'ffffff', 'noise_level'=>0, 'noise_color'=>'ffffff', 'ttf_file'=>'AllStar'),
     32  'bluenoise' =>  array('perturbation'=>0.25, 'image_bg_color'=>'ffffff', 'text_color'=>'0000ff', 'num_lines'=>2, 'line_color'=>'0000ff', 'noise_level'=>2,  'noise_color'=>'0000ff', 'ttf_file'=>'AlteHassGroteskB'),
     33  'gray' =>       array('perturbation'=>1,    'image_bg_color'=>'ffffff', 'text_color'=>'8a8a8a', 'num_lines'=>2, 'line_color'=>'8a8a8a', 'noise_level'=>0.1, 'noise_color'=>'8a8a8a', 'ttf_file'=>'TopSecret'),
     34  'xcolor' =>     array('perturbation'=>0.5,  'image_bg_color'=>'ffffff', 'text_color'=>'random', 'num_lines'=>1, 'line_color'=>'ffffff', 'noise_level'=>2,  'noise_color'=>'ffffff', 'ttf_file'=>'Dread'),
     35  'pencil' =>     array('perturbation'=>0.8,  'image_bg_color'=>'9e9e9e', 'text_color'=>'363636', 'num_lines'=>0, 'line_color'=>'ffffff', 'noise_level'=>0,  'noise_color'=>'ffffff', 'ttf_file'=>'AllStar'),
    3636  );
    3737 
     
    6767  $("input[name=noise_color]").val("'.$param['noise_color'].'");
    6868  $("input[name=ttf_file]").val(["'.$param['ttf_file'].'"]);
    69 
    7069}';
    7170  }
  • extensions/CryptograPHP/include/category.inc.php

    r12619 r14527  
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    33
     4load_language('plugin.lang', CRYPTO_PATH);
    45add_event_handler('loc_begin_index', 'add_crypto');
    5 add_event_handler('user_comment_check', 'check_crypto', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
     6add_event_handler('user_comment_check_albums', 'check_crypto', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
    67
    78function add_crypto()
     
    1819  global $conf;
    1920 
    20   $search = '#<input type="hidden" name="key" value="{\$comment_add\.KEY}"([ /]*)>#';
    21   $replace = '<input type="hidden" name="key" value="{$comment_add.KEY}"$1>'.'
    22   <label>
    23     <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
    24     <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
    25       <img src="'.CRYPTO_PATH.'template/refresh.png"></a>
    26     <br>{\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate} :
    27     <input type="text" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" />
    28    
    29   </label>';
     21  $search = '<p><textarea name="content" id="contentid" rows="5" cols="50">{$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="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
     26                                  <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
     27                                    <img src="'.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>';
    3030
    31   return preg_replace($search, $replace, $content);
     31  return str_replace($search, $replace, $content);
    3232}
    3333
    3434function check_crypto($action, $comment)
    3535{
    36   global $conf;
     36  global $conf, $page;
    3737 
    3838  include_once(CRYPTO_PATH.'securimage/securimage.php');
     
    4646  if ($securimage->check($_POST['captcha_code']) == false)
    4747  {
     48    if ($conf['cryptographp']['comments_action'] == 'reject') array_push($page['errors'], l10n('Invalid Captcha'));
    4849    return $conf['cryptographp']['comments_action'];
    4950  }
  • 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);
  • extensions/CryptograPHP/include/picture.inc.php

    r12619 r14527  
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    33
     4load_language('plugin.lang', CRYPTO_PATH);
    45add_event_handler('loc_end_picture', 'add_crypto');
    56add_event_handler('user_comment_check', 'check_crypto', EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
     
    1819  global $conf;
    1920 
    20   $search = '#<input type="hidden" name="key" value="{\$comment_add\.KEY}"([ /]*)>#';
    21   $replace = '<input type="hidden" name="key" value="{$comment_add.KEY}"$1>'.'
    22   <label>
    23     <img id="captcha" src="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
    24     <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
    25       <img src="'.CRYPTO_PATH.'template/refresh.png"></a>
    26     <br>{\''.($conf['cryptographp']['captcha_type']=='string'?'Enter code':'Solve equation').'\'|@translate} :
    27     <input type="text" name="captcha_code" size="'.($conf['cryptographp']['code_length']+1).'" maxlength="'.$conf['cryptographp']['code_length'].'" />
    28    
    29   </label>';
     21  $search = '<p><textarea name="content" id="contentid" rows="5" cols="50">{$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="'.CRYPTO_PATH.'securimage/securimage_show.php" alt="CAPTCHA Image">
     26                                  <a href="#" onclick="document.getElementById(\'captcha\').src = \''.CRYPTO_PATH.'securimage/securimage_show.php?\' + Math.random(); return false">
     27                                    <img src="'.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>';
    3030
    31   return preg_replace($search, $replace, $content);
     31  return str_replace($search, $replace, $content);
    3232}
    3333
    3434function check_crypto($action, $comment)
    3535{
    36   global $conf;
     36  global $conf, $page;
    3737 
    3838  include_once(CRYPTO_PATH.'securimage/securimage.php');
     
    4646  if ($securimage->check($_POST['captcha_code']) == false)
    4747  {
     48    if ($conf['cryptographp']['comments_action'] == 'reject') array_push($page['errors'], l10n('Invalid Captcha'));
    4849    return $conf['cryptographp']['comments_action'];
    4950  }
  • 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);
  • extensions/CryptograPHP/language/en_UK/plugin.lang.php

    r12617 r14527  
    1818$lang['Perturbation'] = 'Perturbation';
    1919$lang['range:'] = 'range:';
     20$lang['random'] = 'random';
    2021$lang['Background color'] = 'Background color';
    2122$lang['Text color'] = 'Text color';
  • extensions/CryptograPHP/language/fr_FR/plugin.lang.php

    r12617 r14527  
    22
    33$lang['Invalid Captcha'] = 'Captcha non valide';
    4 $lang['Enter code'] = 'Entrez le code';
     4$lang['Enter code'] = 'Recopiez le code';
    55$lang['Solve equation'] = 'Resolvez l\'équation';
    66
     
    1818$lang['Perturbation'] = 'Perturbation';
    1919$lang['range:'] = 'plage:';
     20$lang['random'] = 'aléatoire';
    2021$lang['Background color'] = 'Couleur de fond';
    2122$lang['Text color'] = 'Couleur du texte';
  • extensions/CryptograPHP/main.inc.php

    r12619 r14527  
    2828  global $conf, $user;
    2929 
     30  // brace yourself, smartphones spammers are comming !
     31  if ($user['theme'] == 'smartpocket') return;
     32 
    3033  $conf['cryptographp'] = unserialize($conf['cryptographp']);
    31   load_language('plugin.lang', CRYPTO_PATH);
    3234 
    3335  if (script_basename() == 'register')
     
    3941    include(CRYPTO_PATH.'include/picture.inc.php');
    4042  }
    41   // because of ContactForm specificities, Captcha can't be displayed on these themes
    42   else if ( isset($_GET['/contact']) and strstr($user['theme'], 'simple') === false and strstr($user['theme'], 'stripped') === false )
     43  else if (isset($_GET['/contact']))
    4344  {
    4445    include(CRYPTO_PATH.'include/contactform.inc.php');
  • extensions/CryptograPHP/maintain.inc.php

    r12617 r14527  
    11<?php
    2 define('default_config', serialize(array(
     2define('crypto_default_config', serialize(array(
    33  'comments_action' => 'reject',
    44  'theme'           => 'gray',
     
    2424  if (!isset($conf['cryptographp']))
    2525  {
    26     pwg_query('INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("cryptographp",\''.default_config.'\',"CryptograPHP config");');
     26    pwg_query('INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("cryptographp",\''.crypto_default_config.'\',"CryptograPHP config");');
    2727  }
    2828}
     
    3434  if (isset($conf['cryptograph_theme']))
    3535  {
    36     pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="cryptographp_theme" LIMIT 1');
     36    pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param="cryptographp_theme" LIMIT 1;');
    3737  }
    3838 
    39   if (!isset($conf['cryptograph']))
     39  if (!isset($conf['cryptographp']))
    4040  {
    41     pwg_query('INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("cryptographp",\''.default_config.'\',"CryptograPHP config");');
     41    pwg_query('INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("cryptographp",\''.crypto_default_config.'\',"CryptograPHP config");');
    4242  }
    4343}
     44
    4445function plugin_uninstall()
    4546{
  • extensions/CryptograPHP/template/admin.tpl

    r12617 r14527  
    44{footer_script require='jquery.colorpicker'}{literal}
    55jQuery(document).ready(function() {
     6  // colorpicker
    67  $('.colorpicker-input')
    7   .ColorPicker({
    8     onSubmit: function(hsb, hex, rgb, el) {
    9       $(el).val(hex);
    10       $(el).ColorPickerHide();
    11     },
    12     onChange: function(hsb, hex, rgb, el) {
    13       $(el).val(hex);
    14       changeColor(el, hex);
    15       $('.preset').removeClass('selected');
    16       $('input[name=theme]').val('custom');
    17     },
    18     onBeforeShow: function () {
    19       $(this).ColorPickerSetColor(this.value);
    20     }
    21   })
    22   .bind('keyup', function(){
    23     $(this).ColorPickerSetColor(this.value);
    24     changeColor(this, $(this).val());
    25   })
    26   .each(function() {
    27     changeColor(this, $(this).val());
    28   });
    29  
     8    .ColorPicker({
     9      onSubmit: function(hsb, hex, rgb, el) {
     10        $(el).val(hex);
     11        $(el).ColorPickerHide();
     12      },
     13      onChange: function(hsb, hex, rgb, el) {
     14        $(el).val(hex);
     15        changeColor(el, hex);
     16        changePreview();
     17        setThemeCutom();
     18      },
     19      onBeforeShow: function () {
     20        $(this).ColorPickerSetColor(this.value);
     21      }
     22    })
     23    .bind('keyup', function(){
     24      $(this).ColorPickerSetColor(this.value);
     25      changeColor(this, $(this).val());
     26    })
     27    .each(function() {
     28      changeColor(this, $(this).val());
     29    });
     30 
     31  // apply a preset
    3032  $('.preset').click(function() {
    3133    $('.preset').removeClass('selected');
     
    3436    $('.colorpicker-input').each(function() { changeColor(this, $(this).val()); });
    3537    $('input[name=theme]').val($(this).attr('title'));
    36   });
    37  
     38    changePreview();
     39  });
     40 
     41  // display customization panel
    3842  $('.customize').click(function() {
    39     $('#theming').fadeToggle();
    40   });
    41  
     43    $('#theming').toggle();
     44  });
     45 
     46  // change theme to 'custom' if a parameter is changed
    4247  $('input.istheme').change(function() {
    43     $('.preset').removeClass('selected');
    44     $('input[name=theme]').val('custom');
     48    setThemeCutom();
     49  });
     50 
     51  // update the preview
     52  $('input.istheme, input.preview').change(function() {
     53    changePreview();
     54  });
     55  $('#captcha').click(function() {
     56    changePreview();
     57  });
     58 
     59  // links for random color
     60  $('a.random').click(function() {
     61    $(this).prev('label').children('input').val('random');
     62    changeColor($(this).prev('label').children('input'), 'random');
     63    changePreview();
     64    setThemeCutom();
    4565  });
    4666});
     67
     68function setThemeCutom() {
     69  $('.preset').removeClass('selected');
     70  $('input[name=theme]').val('custom');
     71}
     72
     73function changePreview()
     74{
     75  options = new Array();
     76  str = '';
     77 
     78  $('input[type="text"], input[type="radio"]:checked').each(function() {
     79    options[$(this).attr('name')] = $(this).val();
     80  });
     81 
     82  for (x in options) {
     83    str+= '&' + x + '=' + options[x];
     84  }
     85  $('#captcha').attr('src', '{/literal}{$CRYPTO_PATH}{literal}securimage/securimage_preview.php?' + new Date().getTime() + str);
     86}
    4787
    4888function changeColor(target, color) {
     
    68108}
    69109{/foreach}
     110
    70111.preset img {ldelim}
    71112  margin:1px;
     
    96137    <li>
    97138      <span class="property">{'Captcha type'|@translate}</span>
    98       <label><input type="radio" name="captcha_type" value="string" {if $crypto.captcha_type == 'string'}checked="checked"{/if}> {'Random string'|@translate}</label>
    99       <label><input type="radio" name="captcha_type" value="math" {if $crypto.captcha_type == 'math'}checked="checked"{/if}> {'Simple equation'|@translate}</label>
     139      <label><input type="radio" name="captcha_type" class="preview" value="string" {if $crypto.captcha_type == 'string'}checked="checked"{/if}> {'Random string'|@translate}</label>
     140      <label><input type="radio" name="captcha_type" class="preview" value="math" {if $crypto.captcha_type == 'math'}checked="checked"{/if}> {'Simple equation'|@translate}</label>
    100141    </li>
    101142    <!--<li>
     
    106147    <li>
    107148      <span class="property">{'Code lenght'|@translate}</span>
    108       <label><input type="text" name="code_length" value="{$crypto.code_length}" size="6" maxlength="2"></label>
     149      <label><input type="text" name="code_length" class="preview" value="{$crypto.code_length}" size="6" maxlength="2"></label>
    109150    </li>
    110151    <li>
    111152      <span class="property">{'Width'|@translate}</span>
    112       <label><input type="text" name="width" value="{$crypto.width}" size="6" maxlength="3"> {'good value:'|@translate} lenght*20</label>
     153      <label><input type="text" name="width" class="preview" value="{$crypto.width}" size="6" maxlength="3"> {'good value:'|@translate} lenght&times;20</label>
    113154    </li>
    114155    <li>
    115156      <span class="property">{'Height'|@translate}</span>
    116       <label><input type="text" name="height" value="{$crypto.height}" size="6" maxlength="3"> {'good value:'|@translate} width/4</label>
     157      <label><input type="text" name="height" class="preview" value="{$crypto.height}" size="6" maxlength="3"> {'good value:'|@translate} width/4</label>
    117158    </li>
    118159    <li>
     
    133174      <li>
    134175        <span class="property">{'Perturbation'|@translate}</span>
    135         <label><input type="text" name="perturbation" value="{$crypto.perturbation}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 to 1</label>
     176        <label><input type="text" name="perturbation" value="{$crypto.perturbation}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 - 1</label>
    136177      </li>
    137178      <li>
    138179        <span class="property">{'Background color'|@translate}</span>
    139         <label><input type="text" name="image_bg_color" value="{$crypto.image_bg_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     180        <label><input type="text" name="image_bg_color" value="{$crypto.image_bg_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     181        <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    140182      </li>
    141183      <li>
    142184        <span class="property">{'Text color'|@translate}</span>
    143         <label><input type="text" name="text_color" value="{$crypto.text_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     185        <label><input type="text" name="text_color" value="{$crypto.text_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     186        <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    144187      </li>
    145188      <li>
    146189        <span class="property">{'Lines density'|@translate}</span>
    147         <label><input type="text" name="num_lines" value="{$crypto.num_lines}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 to 10</label>
     190        <label><input type="text" name="num_lines" value="{$crypto.num_lines}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 - 10</label>
    148191      </li>
    149192      <li>
    150193        <span class="property">{'Lines color'|@translate}</span>
    151         <label><input type="text" name="line_color" value="{$crypto.line_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     194        <label><input type="text" name="line_color" value="{$crypto.line_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     195        <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    152196      </li>
    153197      <li>
    154198        <span class="property">{'Noise level'|@translate}</span>
    155         <label><input type="text" name="noise_level" value="{$crypto.noise_level}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 to 10</label>
     199        <label><input type="text" name="noise_level" value="{$crypto.noise_level}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 - 10</label>
    156200      </li>
    157201      <li>
    158202        <span class="property">{'Noise color'|@translate}</span>
    159         <label><input type="text" name="noise_color" value="{$crypto.noise_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     203        <label><input type="text" name="noise_color" value="{$crypto.noise_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
     204        <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    160205      </li>
    161206      <li>
Note: See TracChangeset for help on using the changeset viewer.