Changeset 28344


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

add 'guest_only' option

Location:
extensions/CryptograPHP
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/admin.php

    r26554 r28344  
    2828      ),
    2929    'comments_action' => $_POST['comments_action'],
     30    'guest_only'      => isset($_POST['guest_only']),
    3031    'theme'           => $_POST['theme'],
    3132    'captcha_type'    => $_POST['captcha_type'],
  • extensions/CryptograPHP/include/category.inc.php

    r27040 r28344  
    2727  $securimage = new Securimage();
    2828
    29   if (!is_a_guest()) return $action;
    30 
    3129  if ($securimage->check($_POST['captcha_code']) == false)
    3230  {
  • extensions/CryptograPHP/include/contactform.inc.php

    r26072 r28344  
    1414  $securimage = new Securimage();
    1515
    16   if (!is_a_guest()) return $action;
    17 
    1816  if ($securimage->check($_POST['captcha_code']) == false)
    1917  {
  • extensions/CryptograPHP/include/guestbook.inc.php

    r26072 r28344  
    1414  $securimage = new Securimage();
    1515
    16   if (!is_a_guest()) return $action;
    17 
    1816  if ($securimage->check($_POST['captcha_code']) == false)
    1917  {
  • extensions/CryptograPHP/include/picture.inc.php

    r26072 r28344  
    2727  $securimage = new Securimage();
    2828
    29   if (!is_a_guest()) return $action;
    30 
    3129  if ($securimage->check($_POST['captcha_code']) == false)
    3230  {
  • extensions/CryptograPHP/language/en_UK/plugin.lang.php

    r26554 r28344  
    3737$lang['Tip: type "random" on a color field to have a random color'] = 'Tip: type "random" on a color field to have a random color';
    3838$lang['We detected that EasyCaptcha 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 EasyCaptcha 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.';
    39 
    40 ?>
     39$lang['Only for unauthenticated users'] = 'Only for unauthenticated users';
  • extensions/CryptograPHP/language/fr_FR/plugin.lang.php

    r26554 r28344  
    3737$lang['Tip: type "random" on a color field to have a random color'] = 'Astuce: inscrivez "random" dans un champs de couleur pour avoir une couleur aléatoire';
    3838$lang['We detected that EasyCaptcha 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 EasyCaptcha 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.';
    39 
    40 ?>
     39$lang['Only for unauthenticated users'] = 'Seulement pour les utilisateurs non connectés';
  • extensions/CryptograPHP/main.inc.php

    r26072 r28344  
    6161  global $conf, $pwg_loaded_plugins, $page;
    6262 
    63   if (!is_a_guest())
     63  if (!is_a_guest() && $conf['cryptographp']['guest_only'])
    6464  {
    6565    return;
     
    9494{
    9595  global $conf;
    96  
    97   if (!is_a_guest())
    98   {
    99     return;
    100   }
    10196
    10297  if ($conf['cryptographp']['activate_on']['register'])
  • extensions/CryptograPHP/maintain.inc.php

    r26554 r28344  
    1919      $default_config = array(
    2020        'activate_on'     => array(
    21               'picture'     => true,
    22               'category'    => true,
    23               'register'    => true,
    24               'contactform' => true,
    25               'guestbook'   => true,
    26               ),
     21          'picture'     => true,
     22          'category'    => true,
     23          'register'    => true,
     24          'contactform' => true,
     25          'guestbook'   => true,
     26          ),
    2727        'comments_action' => 'reject',
     28        'guest_only'      => true,
    2829        'theme'           => 'gray',
    2930        'captcha_type'    => 'string',
     
    7374        unset($old_conf['image_bg_color']);
    7475      }
     76      if (!isset($old_conf['guest_only']))
     77      {
     78        $old_conf['guest_only'] = true;
     79      }
    7580     
    7681      $conf['cryptographp'] = serialize($old_conf);
  • extensions/CryptograPHP/template/admin.tpl

    r26554 r28344  
    173173  <ul>
    174174    <li>
     175      <b><label for="guest_only">{'Only for unauthenticated users'|translate}</label></b>
     176      <input type="checkbox" name="guest_only" id="guest_only" {if $crypto.guest_only}checked{/if}>
     177    </li>
     178    <li>
    175179      <b>{'Activate on'|translate}</b>
    176180      <select name="activate_on[]" multiple>
Note: See TracChangeset for help on using the changeset viewer.