Ignore:
Timestamp:
May 4, 2014, 4:23:56 PM (10 years ago)
Author:
mistic100
Message:

add 'guest_only' option

Location:
extensions/EasyCaptcha
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/EasyCaptcha/admin.php

    r26831 r28345  
    2828      ),
    2929    'comments_action' => $_POST['comments_action'],
     30    'guest_only' => isset($_POST['guest_only']),
    3031    'challenge' => $_POST['challenge'],
    3132    'drag' => array(
  • extensions/EasyCaptcha/include/category.inc.php

    r27041 r28345  
    2424  global $conf, $page;
    2525
    26   if (!is_a_guest()) return $action;
    27 
    2826  if (!easycaptcha_check())
    2927  {
  • extensions/EasyCaptcha/include/contactform.inc.php

    r26069 r28345  
    1111  global $conf, $page;
    1212
    13   if (!is_a_guest()) return $action;
    14 
    1513  if (!easycaptcha_check())
    1614  {
  • extensions/EasyCaptcha/include/guestbook.inc.php

    r26069 r28345  
    1111  global $conf, $page;
    1212
    13   if (!is_a_guest()) return $action;
    14 
    1513  if (!easycaptcha_check())
    1614  {
  • extensions/EasyCaptcha/include/picture.inc.php

    r26069 r28345  
    2424  global $conf, $page;
    2525
    26   if (!is_a_guest()) return $action;
    27 
    2826  if (!easycaptcha_check())
    2927  {
  • extensions/EasyCaptcha/language/en_UK/plugin.lang.php

    r26536 r28345  
    3636$lang['We detected that Crypto Captcha plugin is available on your gallery. Both plugins can be used at the same time, but you should not under any circumstances activate both of them on the same page.'] = 'We detected that Crypto Captcha plugin is available in your gallery. Both plugins can be used at the same time, but you should not under any circumstances activate both of them on the same page.';
    3737$lang['Nowhere'] = 'Nowhere';
    38 ?>
     38$lang['Only for unauthenticated users'] = 'Only for unauthenticated users';
  • extensions/EasyCaptcha/language/fr_FR/plugin.lang.php

    r26536 r28345  
    3636$lang['We detected that Crypto Captcha plugin is available on your gallery. Both plugins can be used at the same time, but you should not under any circumstances activate both of them on the same page.'] = 'Nous avons détecté que Crypto Captcha est activé sur votre galerie. Les deux plugins peuvent fonctionner en même temps, mais sous aucun prétexte ils ne doivent être activés sur les mêmes pages.';
    3737$lang['Nowhere'] = 'Nulle part';
    38 ?>
     38$lang['Only for unauthenticated users'] = 'Seulement pour les utilisateurs non connectés';
  • extensions/EasyCaptcha/main.inc.php

    r26069 r28345  
    5555  global $conf, $pwg_loaded_plugins, $page;
    5656
    57   if (!is_a_guest())
     57  if (!is_a_guest() && $conf['cryptographp']['guest_only'])
    5858  {
    5959    return;
     
    8989  global $conf;
    9090
    91   if (!is_a_guest())
    92   {
    93     return;
    94   }
    95 
    9691  if ($conf['EasyCaptcha']['activate_on']['register'])
    9792  {
  • extensions/EasyCaptcha/maintain.inc.php

    r26025 r28345  
    2121          ),
    2222        'comments_action' => 'reject',
     23        'guest_only'      => true,
    2324        'challenge' => 'random',
    2425        'drag' => array(
     
    5657        $old_conf['lastmod'] = time();
    5758      }
     59      if (!isset($old_conf['guest_only']))
     60      {
     61        $old_conf['guest_only'] = true;
     62      }
    5863
    5964      $conf['EasyCaptcha'] = serialize($old_conf);
  • extensions/EasyCaptcha/template/admin.tpl

    r26068 r28345  
    119119  <ul>
    120120    <li>
     121      <b><label for="guest_only">{'Only for unauthenticated users'|translate}</label></b>
     122      <input type="checkbox" name="guest_only" id="guest_only" {if $easycaptcha.guest_only}checked{/if}>
     123    </li>
     124    <li>
    121125      <b>{'Activate on'|translate}</b>
    122126      <select name="activate_on[]" multiple>
Note: See TracChangeset for help on using the changeset viewer.