{combine_css path=$CRYPTO_PATH|cat:'template/style.css'} {combine_css path=$CRYPTO_PATH|cat:'template/colorpicker/colorpicker.css'} {combine_script id='jquery.colorpicker' load='footer' path=$CRYPTO_PATH|cat:'template/colorpicker/colorpicker.js'} {combine_css path='themes/default/js/plugins/chosen.css'} {combine_script id='jquery.chosen' load='footer' path='themes/default/js/plugins/chosen.jquery.min.js'} {footer_script} var time = 0; // colorpicker $('.colorpicker-input') .ColorPicker({ onSubmit: function(hsb, hex, rgb, el) { $(el).val(hex); $(el).ColorPickerHide(); }, onChange: function(hsb, hex, rgb, el) { $(el).val(hex).trigger('change'); changeColor(el, hex); }, onBeforeShow: function () { $(this).ColorPickerSetColor(this.value); } }) .bind('keyup', function() { $(this).ColorPickerSetColor(this.value); changeColor(this, $(this).val()); }) .each(function() { changeColor(this, $(this).val()); }); $('.button').click(function() { $(this).siblings('.button').removeClass('selected'); $(this).addClass('selected'); $('input[name='+ $(this).data('input') +']').val($(this).data('val')).trigger('change'); }); // change button $('input[name=button_color]').change(function() { $('#reload').attr('src', '{$CRYPTO_PATH}template/refresh_'+ $(this).val() +'.png'); }); // apply a preset $('input[name=theme]').change(function() { var id = $(this).val(); for (key in presets[id]) { if ($('input[name="'+ key +'"]').attr('type') == 'radio') { $('input[name="'+ key +'"][value="'+ presets[id][key] +'"]').prop('checked', true).trigger('change', false); } else { $('input[name="'+ key +'"]').val(presets[id][key]).trigger('change', false); } } $('.colorpicker-input').each(function() { changeColor(this, $(this).val()); }); changePreview(); }); // toggle background type $('input[name=background]').change(function() { $('li[id^=background]').hide().filter('#background-'+$(this).val()).show(); }); // display customization panel $('.customize').click(function() { $('#theming').toggle(); }); // change theme to 'custom' if a parameter is changed $('input.istheme').change(function(e, p) { if (p!==false) setThemeCustom(); }); // update the preview $('input.preview').change(function(e, p) { if (p!==false) changePreview(); }); $('#reload').click(function() { changePreview(); }); // links for random color $('a.random').click(function() { $(this).prev('label').children('input').val('random').trigger('change'); changeColor($(this).prev('label').children('input'), 'random'); }); // multiselect $("select").css({ width: 300 }).chosen({ disable_search:true, }); function setThemeCustom() { $('.button[data-input=theme]').removeClass('selected'); $('input[name=theme]').val('custom'); } function changePreview() { var now = (new Date()).getTime(); if (now-time < 1000) { return; } time = now; options = new Array(); str = ''; $('input.preview:not([type=radio]), input[type=radio].preview:checked').each(function() { options[$(this).attr('name')] = $(this).val(); }); for (x in options) { str+= '&' + x + '=' + options[x]; } $('#captcha').attr('src', '{$CRYPTO_PATH}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) } var presets = { {foreach from=$PRESETS key=name item=params} "{$name}" : { {foreach from=$params key=key item=value} "{$key}" : "{$value}", {/foreach} }, {/foreach} }; {/footer_script} {html_style} {foreach from=$fonts item=path key=font} @font-face { font-family: '{$font}'; src: url({$path}) format("truetype"); } {/foreach} {/html_style}

Crypto Captcha

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

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