Ignore:
Timestamp:
Dec 19, 2013, 3:24:59 PM (10 years ago)
Author:
mistic100
Message:

update for 2.6

Location:
extensions/CryptograPHP/template
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/template/admin.tpl

    r24143 r26041  
    1 {combine_css path=$CRYPTO_PATH|@cat:"template/style.css"}
    2 
    3 {combine_css path=$CRYPTO_PATH|@cat:"template/colorpicker/colorpicker.css"}
    4 {combine_script id="jquery.colorpicker" load="footer" path=$CRYPTO_PATH|@cat:"template/colorpicker/colorpicker.js"}
    5 
    6 {combine_css path="themes/default/js/plugins/chosen.css"}
     1{combine_css path=$CRYPTO_PATH|cat:'template/style.css'}
     2
     3{combine_css path=$CRYPTO_PATH|cat:'template/colorpicker/colorpicker.css'}
     4{combine_script id='jquery.colorpicker' load='footer' path=$CRYPTO_PATH|cat:'template/colorpicker/colorpicker.js'}
     5
     6{combine_css path='themes/default/js/plugins/chosen.css'}
    77{combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'}
    88
    99
    10 {footer_script}{literal}
     10{footer_script}
    1111// colorpicker
    1212$('.colorpicker-input')
     
    2626    }
    2727  })
    28   .bind('keyup', function(){
     28  .bind('keyup', function() {
    2929    $(this).ColorPickerSetColor(this.value);
    3030    changeColor(this, $(this).val());
     
    3939  $(this).addClass('selected');
    4040  $('input[name=button_color]').val($(this).attr('title'));
    41   $('#reload').attr('src', '{/literal}{$CRYPTO_PATH}{literal}template/refresh_'+ $(this).attr('title') +'.png');
     41  $('#reload').attr('src', '{$CRYPTO_PATH}template/refresh_'+ $(this).attr('title') +'.png');
    4242});
    4343
     
    5353  }
    5454 
    55   $('.colorpicker-input').each(function() { changeColor(this, $(this).val()); });
     55  $('.colorpicker-input').each(function() {
     56    changeColor(this, $(this).val());
     57  });
    5658  $('input[name="theme"]').val($(this).attr('title'));
    5759  changePreview();
     
    8688// multiselect
    8789$("select").css({
    88   "width":"700px"
     90  width: 300
    8991}).chosen({
    9092  disable_search:true,
     
    9698}
    9799
    98 function changePreview()
    99 {
     100function changePreview() {
    100101  options = new Array();
    101102  str = '';
     
    108109    str+= '&' + x + '=' + options[x];
    109110  }
    110   $('#captcha').attr('src', '{/literal}{$CRYPTO_PATH}{literal}securimage/securimage_preview.php?' + new Date().getTime() + str);
     111  $('#captcha').attr('src', '{$CRYPTO_PATH}securimage/securimage_preview.php?' + new Date().getTime() + str);
    111112}
    112113
     
    115116  if (parseInt(color, 16) > 16777215/2) {
    116117    $(target).css('color', '#222');
    117   } else {
     118  }
     119  else {
    118120    $(target).css('color', '#ddd');
    119121  }
    120122  $(target).css('background', '#'+color)
    121123}
    122 {/literal}
    123 
    124 var presets = {ldelim}
     124
     125var presets = {
    125126{foreach from=$PRESETS key=name item=params}
    126   "{$name}" : {ldelim}
     127  "{$name}" : {
    127128  {foreach from=$params key=key item=value}
    128129    "{$key}" : "{$value}",
     
    136137{html_style}
    137138{foreach from=$fonts item=font}
    138 @font-face {ldelim} 
    139   font-family: {$font}
     139@font-face { 
     140  font-family: '{$font}'
    140141  src: url({$CRYPTO_PATH}securimage/fonts/{$font}.ttf) format("truetype"); 
    141142}
     
    150151<form method="post" class="properties">
    151152<fieldset>
    152   <legend>{'Configuration'|@translate}</legend>
     153  <legend>{'Configuration'|translate}</legend>
    153154 
    154155  <ul>
    155156    <li>
    156       <b>{'Activate on'|@translate}</b>
     157      <b>{'Activate on'|translate}</b>
    157158      <select name="activate_on[]" multiple>
    158         <option value="picture" {if $crypto.activate_on.picture}selected{/if}>{'Picture comments'|@translate}</option>
    159         {if $loaded.category}<option value="category" {if $crypto.activate_on.category}selected{/if}>{'Album comments'|@translate}</option>{/if}
    160         <option value="register" {if $crypto.activate_on.register}selected{/if}>{'Register form'|@translate}</option>
    161         {if $loaded.contactform}<option value="contactform" {if $crypto.activate_on.contactform}selected{/if}>{'Contact form'|@translate}</option>{/if}
    162         {if $loaded.guestbook}<option value="guestbook" {if $crypto.activate_on.guestbook}selected{/if}>{'Guestbook'|@translate}</option>{/if}
     159        <option value="picture" {if $crypto.activate_on.picture}selected{/if}>{'Picture comments'|translate}</option>
     160        {if $loaded.category}<option value="category" {if $crypto.activate_on.category}selected{/if}>{'Album comments'|translate}</option>{/if}
     161        <option value="register" {if $crypto.activate_on.register}selected{/if}>{'Register form'|translate}</option>
     162        {if $loaded.contactform}<option value="contactform" {if $crypto.activate_on.contactform}selected{/if}>{'Contact form'|translate}</option>{/if}
     163        {if $loaded.guestbook}<option value="guestbook" {if $crypto.activate_on.guestbook}selected{/if}>{'Guestbook'|translate}</option>{/if}
    163164      </select>
    164165    </li>
    165166    <li>
    166       <b>{'Comments action'|@translate}</b>
    167       <label><input type="radio" name="comments_action" value="reject" {if $crypto.comments_action == 'reject'}checked="checked"{/if}> {'Reject'|@translate}</label>
    168       <label><input type="radio" name="comments_action" value="moderate" {if $crypto.comments_action == 'moderate'}checked="checked"{/if}> {'Moderate'|@translate}</label>
    169     </li>
    170     <li>
    171       <b>{'Captcha type'|@translate}</b>
    172       <label><input type="radio" name="captcha_type" class="preview" value="string" {if $crypto.captcha_type == 'string'}checked="checked"{/if}> {'Random string'|@translate}</label>
    173       <label><input type="radio" name="captcha_type" class="preview" value="math" {if $crypto.captcha_type == 'math'}checked="checked"{/if}> {'Simple equation'|@translate}</label>
     167      <b>{'Comments action'|translate}</b>
     168      <label><input type="radio" name="comments_action" value="reject" {if $crypto.comments_action == 'reject'}checked="checked"{/if}> {'Reject'|translate}</label>
     169      <label><input type="radio" name="comments_action" value="moderate" {if $crypto.comments_action == 'moderate'}checked="checked"{/if}> {'Moderate'|translate}</label>
     170    </li>
     171    <li>
     172      <b>{'Captcha type'|translate}</b>
     173      <label><input type="radio" name="captcha_type" class="preview" value="string" {if $crypto.captcha_type == 'string'}checked="checked"{/if}> {'Random string'|translate}</label>
     174      <label><input type="radio" name="captcha_type" class="preview" value="math" {if $crypto.captcha_type == 'math'}checked="checked"{/if}> {'Simple equation'|translate}</label>
    174175    </li>
    175176    <!--<li>
    176       <b>{'Case sensitive'|@translate}</b>
    177       <label><input type="radio" name="case_sensitive" value="false" {if $crypto.case_sensitive == 'false'}checked="checked"{/if}> {'No'|@translate}</label>
    178       <label><input type="radio" name="case_sensitive" value="true" {if $crypto.case_sensitive == 'true'}checked="checked"{/if}> {'Yes'|@translate}</label>
     177      <b>{'Case sensitive'|translate}</b>
     178      <label><input type="radio" name="case_sensitive" value="false" {if $crypto.case_sensitive == 'false'}checked="checked"{/if}> {'No'|translate}</label>
     179      <label><input type="radio" name="case_sensitive" value="true" {if $crypto.case_sensitive == 'true'}checked="checked"{/if}> {'Yes'|translate}</label>
    179180    </li>-->
    180181    <li>
    181       <b>{'Code lenght'|@translate}</b>
     182      <b>{'Code lenght'|translate}</b>
    182183      <label><input type="text" name="code_length" class="preview" value="{$crypto.code_length}" size="6" maxlength="2"></label>
    183184    </li>
    184185    <li>
    185       <b>{'Width'|@translate}</b>
    186       <label><input type="text" name="width" class="preview" value="{$crypto.width}" size="6" maxlength="3"> {'good value:'|@translate} lenght&times;30</label>
    187     </li>
    188     <li>
    189       <b>{'Height'|@translate}</b>
    190       <label><input type="text" name="height" class="preview" value="{$crypto.height}" size="6" maxlength="3"> {'good value:'|@translate} lenght&times;12</label>
    191     </li>
    192     <li>
    193       <b>{'Button color'|@translate}</b>
     186      <b>{'Width'|translate}</b>
     187      <label><input type="text" name="width" class="preview" value="{$crypto.width}" size="6" maxlength="3"> {'good value:'|translate} lenght&times;30</label>
     188    </li>
     189    <li>
     190      <b>{'Height'|translate}</b>
     191      <label><input type="text" name="height" class="preview" value="{$crypto.height}" size="6" maxlength="3"> {'good value:'|translate} lenght&times;12</label>
     192    </li>
     193    <li>
     194      <b>{'Button color'|translate}</b>
    194195      <a class="button {if $crypto.button_color == 'dark'}selected{/if}" title="dark"><img src="{$CRYPTO_PATH}template/refresh_dark.png" alt="dark"></a>
    195196      <a class="button {if $crypto.button_color == 'light'}selected{/if}" title="light"><img src="{$CRYPTO_PATH}template/refresh_light.png" alt="light"></a>
     
    197198    </li>
    198199    <li>
    199       <b>{'Captcha theme'|@translate}</b>
     200      <b>{'Captcha theme'|translate}</b>
    200201      {foreach from=$PRESETS key=preset item=params}
    201202      <a class="preset {if $crypto.theme == $preset}selected{/if}" title="{$preset}"><img src="{$CRYPTO_PATH}template/presets/{$preset}.png" alt="{$preset}"></a>
    202203      {/foreach}
    203204      <input type="hidden" name="theme" value="{$crypto.theme}">
    204       <a class="customize">{'Customize'|@translate}</a>
     205      <a class="customize">{'Customize'|translate}</a>
    205206    </li>
    206207  </ul>
    207208 
    208209  <fieldset {if $crypto.theme != 'custom'}style="display:none;"{/if} id="theming">
    209     <legend>{'Customize'|@translate}</legend>
     210    <legend>{'Customize'|translate}</legend>
    210211   
    211212    <ul>
    212213      <li>
    213         <b>{'Perturbation'|@translate}</b>
    214         <label><input type="text" name="perturbation" value="{$crypto.perturbation}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 - 1</label>
    215       </li>
    216       <li>
    217         <b>{'Background color'|@translate}</b>
     214        <b>{'Perturbation'|translate}</b>
     215        <label><input type="text" name="perturbation" value="{$crypto.perturbation}" class="istheme" size="6" maxlength="4"> {'range:'|translate} 0 - 1</label>
     216      </li>
     217      <li>
     218        <b>{'Background color'|translate}</b>
    218219        <label><input type="text" name="image_bg_color" value="{$crypto.image_bg_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
    219         <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    220       </li>
    221       <li>
    222         <b>{'Text color'|@translate}</b>
     220        <a class="random" title="{'random'|translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
     221      </li>
     222      <li>
     223        <b>{'Text color'|translate}</b>
    223224        <label><input type="text" name="text_color" value="{$crypto.text_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
    224         <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    225       </li>
    226       <li>
    227         <b>{'Lines density'|@translate}</b>
    228         <label><input type="text" name="num_lines" value="{$crypto.num_lines}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 - 10</label>
    229       </li>
    230       <li>
    231         <b>{'Lines color'|@translate}</b>
     225        <a class="random" title="{'random'|translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
     226      </li>
     227      <li>
     228        <b>{'Lines density'|translate}</b>
     229        <label><input type="text" name="num_lines" value="{$crypto.num_lines}" class="istheme" size="6" maxlength="4"> {'range:'|translate} 0 - 10</label>
     230      </li>
     231      <li>
     232        <b>{'Lines color'|translate}</b>
    232233        <label><input type="text" name="line_color" value="{$crypto.line_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
    233         <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    234       </li>
    235       <li>
    236         <b>{'Noise level'|@translate}</b>
    237         <label><input type="text" name="noise_level" value="{$crypto.noise_level}" class="istheme" size="6" maxlength="4"> {'range:'|@translate} 0 - 10</label>
    238       </li>
    239       <li>
    240         <b>{'Noise color'|@translate}</b>
     234        <a class="random" title="{'random'|translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
     235      </li>
     236      <li>
     237        <b>{'Noise level'|translate}</b>
     238        <label><input type="text" name="noise_level" value="{$crypto.noise_level}" class="istheme" size="6" maxlength="4"> {'range:'|translate} 0 - 10</label>
     239      </li>
     240      <li>
     241        <b>{'Noise color'|translate}</b>
    241242        <label><input type="text" name="noise_color" value="{$crypto.noise_color}" class="colorpicker-input istheme" size="6" maxlength="6"></label>
    242         <a class="random" title="{'random'|@translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
    243       </li>
    244       <li>
    245         <b>{'Font'|@translate}</b>
     243        <a class="random" title="{'random'|translate}"><img src="{$CRYPTO_PATH}/template/arrow_switch.png"></a>
     244      </li>
     245      <li>
     246        <b>{'Font'|translate}</b>
    246247        {foreach from=$fonts item=font}
    247248        <label style="font-family:{$font};" title="{$font}"><input type="radio" name="ttf_file" value="{$font}" {if $crypto.ttf_file == $font}checked="checked"{/if} class="istheme"> {$font}</label>
     
    250251    </ul>
    251252   
    252     {'Tip: type "random" on a color field to have a random color'|@translate}
     253    {'Tip: type "random" on a color field to have a random color'|translate}
    253254  </fieldset>
    254255 
    255256  <ul style="margin-top:30px;">
    256257    <li>
    257       <b>{'Preview'|@translate}</b>
     258      <b>{'Preview'|translate}</b>
    258259      <img id="captcha" src="{$CRYPTO_PATH}securimage/securimage_show.php" alt="CAPTCHA Image">
    259260      <a href="#" onClick="return false;"><img id="reload" src="{$CRYPTO_PATH}template/refresh_{$crypto.button_color}.png"></a>
     
    263264</fieldset>
    264265
    265 <p class="formButtons"><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"></p>
     266<p class="formButtons"><input class="submit" type="submit" value="{'Submit'|translate}" name="submit"></p>
    266267</form>
    267268
  • extensions/CryptograPHP/template/comment.tpl

    r20189 r26041  
    1 <p><label>{if $CRYPTO.captcha_type=='string'}{'Enter code'|@translate}{else}{'Solve equation'|@translate}{/if} :</label></p>
     1<p><label>{if $CRYPTO.captcha_type=='string'}{'Enter code'|translate}{else}{'Solve equation'|translate}{/if} :</label></p>
    22<p>
    33  <img id="captcha" src="{$CRYPTO_PATH}securimage/securimage_show.php" alt="CAPTCHA Image">
  • extensions/CryptograPHP/template/contactform.tpl

    r20189 r26041  
    22<tr>
    33  <td class="title">
    4     {if $CRYPTO.captcha_type=='string'}{'Enter code'|@translate}{else}{'Solve equation'|@translate}{/if}
     4    {if $CRYPTO.captcha_type=='string'}{'Enter code'|translate}{else}{'Solve equation'|translate}{/if}
    55  </td>
    66  <td>
     
    1313{footer_script}
    1414var captcha_code = new LiveValidation("captcha_code", {ldelim} onlyOnSubmit: true, insertAfterWhatNode: "captcha_refresh" });
    15 captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Invalid Captcha'|@translate}" });
     15captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Invalid Captcha'|translate}" });
    1616{/footer_script}
  • extensions/CryptograPHP/template/guestbook.tpl

    r20189 r26041  
    33<tr>
    44  <td>
    5     <label for="captcha">{if $CRYPTO.captcha_type=='string'}{'Enter code'|@translate}{else}{'Solve equation'|@translate}{/if}</label>
     5    <label for="captcha">{if $CRYPTO.captcha_type=='string'}{'Enter code'|translate}{else}{'Solve equation'|translate}{/if}</label>
    66    <input type="text" name="captcha_code" id="captcha_code" style="width:{$CRYPTO.code_length}em" maxlength="{$CRYPTO.code_length}" />
    77  </td>
     
    1313{footer_script}
    1414var captcha_code = new LiveValidation("captcha_code", {ldelim} onlyOnSubmit: true });
    15 captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Invalid Captcha'|@translate}" });
     15captcha_code.add(Validate.Presence, {ldelim} failureMessage: "{'Invalid Captcha'|translate}" });
    1616{/footer_script}
  • extensions/CryptograPHP/template/register.tpl

    r20189 r26041  
    22<li>
    33  <span class="property">
    4     <label for="captcha_code">{if $CRYPTO.captcha_type=='string'}{'Enter code'|@translate}{else}{'Solve equation'|@translate}{/if} </label>
     4    <label for="captcha_code">{if $CRYPTO.captcha_type=='string'}{'Enter code'|translate}{else}{'Solve equation'|translate}{/if} </label>
    55  </span>
    66  <input type="text" id="captcha_code" name="captcha_code" style="width:{$CRYPTO.code_length}em;" maxlength="{$CRYPTO.code_length}" />
Note: See TracChangeset for help on using the changeset viewer.