Ignore:
Timestamp:
Dec 18, 2013, 6:48:06 PM (10 years ago)
Author:
mistic100
Message:

update for 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/EasyCaptcha/template/common.inc.tpl

    r24234 r26025  
    11{* <!-- DRAG & DROP --> *}
    2 {if $EASYCAPTCHA_CHALLENGE == 'drag'}
     2{if $EASYCAPTCHA.challenge == 'drag'}
    33{combine_script id='jquery.event.drag' load='footer' require='jquery' path=$EASYCAPTCHA_PATH|cat:'template/jquery.events/jquery.event.drag-2.2.js'}
    44{combine_script id='jquery.event.drop' load='footer' require='jquery' path=$EASYCAPTCHA_PATH|cat:'template/jquery.events/jquery.event.drop-2.2.js'}
    55
    66{combine_script id='easycaptcha.drag' load='footer' require='jquery.event.drag,jquery.event.drop' path=$EASYCAPTCHA_PATH|cat:'template/drag.js'}
    7 
    8 {html_style}
    9 #easycaptcha, #easycaptcha_noscript {ldelim}
    10   display:inline-block;
    11   position:relative;
    12   padding:10px;
    13   border-radius:8px;
    14   background: {$EASYCAPTCHA_CONF.bg1};
    15   background: -webkit-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    16   background: -moz-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    17   background: -ms-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    18   background: -o-linear-gradient(top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    19   background: linear-gradient(to bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    20   color:{$EASYCAPTCHA_CONF.txt};
    21 }
    22 #easycaptcha .drag_item {ldelim}
    23   position:absolute;
    24   top:15px;
    25   width:{$EASYCAPTCHA_CONF.size}px;
    26   height:{$EASYCAPTCHA_CONF.size}px;
    27   border-radius:5px;
    28   border:1px solid {$EASYCAPTCHA_CONF.bd1};
    29   background:{$EASYCAPTCHA_CONF.obj};
    30   z-index:10;
    31   cursor:move;
    32 }
    33 #easycaptcha .drag_item.active {ldelim}
    34   z-index:100;
    35   opacity:0.75;
    36 }
    37 #easycaptcha .drag_item img {ldelim}
    38   width:{$EASYCAPTCHA_CONF.size}px;
    39   height:{$EASYCAPTCHA_CONF.size}px;
    40   border-radius:5px;
    41 }
    42 #easycaptcha .drop_zone {ldelim}
    43   -moz-box-sizing:borderbox;
    44   box-sizing:borderbox;
    45   padding:5px;
    46   width:{$EASYCAPTCHA_CONF.size}px;
    47   height:{$EASYCAPTCHA_CONF.size}px;
    48   margin-left:{math equation='15+(x+5)*y' x=$EASYCAPTCHA_CONF.size y=$EASYCAPTCHA_CONF.nb}px;
    49   line-height:{$EASYCAPTCHA_CONF.size}px;
    50   background: {$EASYCAPTCHA_CONF.bg1};
    51   background: -webkit-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    52   background: -moz-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    53   background: -ms-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    54   background: -o-linear-gradient(bottom, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    55   background: linear-gradient(to top, {$EASYCAPTCHA_CONF.bg1} 0%, {$EASYCAPTCHA_CONF.bg2} 100%);
    56   border:1px dotted {$EASYCAPTCHA_CONF.bd2};
    57   border-radius:5px;
    58   text-align:center;
    59   text-transform:uppercase;
    60   color:{$EASYCAPTCHA_CONF.txt};
    61 }
    62 #easycaptcha .drop_zone.active {ldelim}
    63   background:{$EASYCAPTCHA_CONF.sel};
    64 }
    65 #easycaptcha .drop_zone.valid {ldelim}
    66   background:{$EASYCAPTCHA_CONF.sel};
    67   box-shadow:0 0 0 2px {$EASYCAPTCHA_CONF.sel};
    68 }
    69 {/html_style}
     7{combine_css id='easycaptcha.drag' path=$EASYCAPTCHA_PATH|cat:'template/drag.css' template=true version=$EASYCAPTCHA.lastmod}
    708
    719{capture name=easycaptcha}
     
    7614<div id="easycaptcha" style="display:none;">
    7715{counter start=0 assign=i}
    78 {foreach from=$EASYCAPTCHA_CONF.selection item=image}
    79   <div class="drag_item" style="left:{math equation='10+(x+5)*y' x=$EASYCAPTCHA_CONF.size y=$i}px;" data-id="{$image}">
    80     <img src="{$ROOT_URL}{$EASYCAPTCHA_PATH}drag/get.php?{$EASYCAPTCHA_CONF.theme}&amp;{$image}">
     16{foreach from=$EASYCAPTCHA.drag.selection item=image}
     17  <div class="drag_item" style="left:{math equation='10+(x+5)*y' x=$EASYCAPTCHA.drag.size y=$i}px;" data-id="{$image}">
     18    <img src="{$ROOT_URL}{$EASYCAPTCHA_PATH}drag/get.php?{$EASYCAPTCHA.drag.theme}&amp;{$image}">
    8119  </div>
    8220  {counter}
     
    8725{* <!-- fields are not type "hidden" for LiveValidation in GuestBook and ContactForm --> *}
    8826<input type="text" name="easycaptcha" value="" style="display:none;">
    89 <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA_CONF.key}" style="display:none;">
     27<input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;">
    9028{/capture}
    9129
    9230
    9331{* <!-- TIC TAC TOE --> *}
    94 {else if $EASYCAPTCHA_CHALLENGE == 'tictac'}
    95 {html_style}
    96 #easycaptcha table {ldelim}
    97   width:{$EASYCAPTCHA_CONF.size}px;
    98   height:{$EASYCAPTCHA_CONF.size}px;
    99   border-collapse:collapse;
    100   display:inline-block;
    101   margin:0;
    102   background:url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?t={$smarty.now}') no-repeat;
    103 }
    104 #easycaptcha td {ldelim}
    105   border:none;
    106   padding:0;
    107 }
    108 #easycaptcha label {ldelim}
    109   display:block;
    110   width:{math equation="floor(x/3)" x=$EASYCAPTCHA_CONF.size}px;
    111   height:{math equation="floor(x/3)" x=$EASYCAPTCHA_CONF.size}px;
    112   cursor:url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?cross=96') 16 16, pointer;
    113 }
    114 #easycaptcha input {ldelim}
    115   display:none;
    116 }
    117 #easycaptcha label.selected {ldelim}
    118   background:url('{$ROOT_URL}{$EASYCAPTCHA_PATH}tictac/gen.php?cross={$EASYCAPTCHA_CONF.size}') no-repeat;
    119 }
    120 {/html_style}
     32{else if $EASYCAPTCHA.challenge == 'tictac'}
     33{combine_css id='easycaptcha.tictac' path=$EASYCAPTCHA_PATH|cat:'template/tictac.css' template=true version=$EASYCAPTCHA.lastmod}
    12134
    122 {footer_script require='jquery'}{literal}
     35{footer_script require='jquery'}
    12336(function($){
    12437$('#easycaptcha input').on('change', function() {
     
    12740});
    12841}(jQuery));
    129 {/literal}{/footer_script}
     42{/footer_script}
    13043
    13144{capture name=easycaptcha}
     
    15063</div>
    15164
    152 <input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA_CONF.key}" style="display:none;">
     65<input type="text" name="easycaptcha_key" value="{$EASYCAPTCHA.key}" style="display:none;">
    15366{/capture}
    15467
Note: See TracChangeset for help on using the changeset viewer.