{combine_css path=$CRYPTO_PATH|@cat:"template/colorpicker/colorpicker.css"} {combine_script id="jquery.colorpicker" require="jquery" path=$CRYPTO_PATH|@cat:"template/colorpicker/colorpicker.js"} {footer_script require='jquery.colorpicker'}{literal} jQuery(document).ready(function() { // colorpicker $('.colorpicker-input') .ColorPicker({ onSubmit: function(hsb, hex, rgb, el) { $(el).val(hex); $(el).ColorPickerHide(); }, onChange: function(hsb, hex, rgb, el) { $(el).val(hex); changeColor(el, hex); changePreview(); setThemeCutom(); }, onBeforeShow: function () { $(this).ColorPickerSetColor(this.value); } }) .bind('keyup', function(){ $(this).ColorPickerSetColor(this.value); changeColor(this, $(this).val()); }) .each(function() { changeColor(this, $(this).val()); }); // change button $('.button').click(function() { $('.button').removeClass('selected'); $(this).addClass('selected'); $('input[name=button_color]').val($(this).attr('title')); $('#reload').attr('src', '{/literal}{$CRYPTO_PATH}{literal}template/refresh_'+ $(this).attr('title') +'.png'); }); // apply a preset $('.preset').click(function() { $('.preset').removeClass('selected'); $(this).addClass('selected'); eval('apply_'+ $(this).attr('title') +'();'); $('.colorpicker-input').each(function() { changeColor(this, $(this).val()); }); $('input[name=theme]').val($(this).attr('title')); changePreview(); }); // display customization panel $('.customize').click(function() { $('#theming').toggle(); }); // change theme to 'custom' if a parameter is changed $('input.istheme').change(function() { setThemeCutom(); }); // update the preview $('input.istheme, input.preview').change(function() { changePreview(); }); $('#reload').click(function() { changePreview(); }); // links for random color $('a.random').click(function() { $(this).prev('label').children('input').val('random'); changeColor($(this).prev('label').children('input'), 'random'); changePreview(); setThemeCutom(); }); }); function setThemeCutom() { $('.preset').removeClass('selected'); $('input[name=theme]').val('custom'); } function changePreview() { options = new Array(); str = ''; $('input[type="text"], input[type="radio"]:checked').each(function() { options[$(this).attr('name')] = $(this).val(); }); for (x in options) { str+= '&' + x + '=' + options[x]; } $('#captcha').attr('src', '{/literal}{$CRYPTO_PATH}{literal}securimage/securimage_preview.php?' + new Date().getTime() + str); } function changeColor(target, color) { if (color == 'random') color = '808080'; if (parseInt(color, 16) > 16777215/2) { $(target).css('color', '#222'); } else { $(target).css('color', '#ddd'); } $(target).css('background', '#'+color) } {/literal} {$PRESETS_FUNC} {/footer_script} {html_head} {/html_head}

Crypto Captcha

{'Configuration'|@translate}
{'Customize'|@translate}
  • {'Perturbation'|@translate}
  • {'Background color'|@translate}
  • {'Text color'|@translate}
  • {'Lines density'|@translate}
  • {'Lines color'|@translate}
  • {'Noise level'|@translate}
  • {'Noise color'|@translate}
  • {'Font'|@translate}
    {foreach from=$fonts item=font} {/foreach}
{'Tip: type "random" on a color field to have a random color'|@translate}

All free fonts from dafont.com | Powered by : Secureimage