Ignore:
Timestamp:
Jan 21, 2010, 3:13:47 PM (14 years ago)
Author:
cljosse
Message:

[mail_supervisor] Add option for new register

Location:
extensions/Mail_supervisor
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/Mail_supervisor/admin/mail_black_liste.tpl

    r4451 r4715  
    2626<td><input type="checkbox" name="no_connect" value="on" {$no_connect} />&nbsp;&nbsp;{'no_connect'|translate}</td>
    2727<td><input type="checkbox" name="set_auto" value="on" {$set_auto} />&nbsp;&nbsp;{'set_auto'|translate}</td>
     28<td><input type="checkbox" name="set_id" value="on" {$set_id} />&nbsp;&nbsp;{'set_id'|translate}</td>
    2829<tr><p></p><td>
    2930<input class="submit" type="submit" name="submit" value={'Valider'|translate} /></td></tr>
    3031 </table>
    3132</fieldset>
    32 
    33                 <input name="info1" type="hidden" />
     33<input name="info1" type="hidden" />
    3434 <fieldset >
    3535    <legend>{'black_liste'|translate}</legend>
  • extensions/Mail_supervisor/admin/mail_superv_admin.php

    r4452 r4715  
    8888                if(!isset($pays)) Get_geo();
    8989               
    90 $mails_options = explode("," , $conf['mail_superv']);
    91                 if (!isset($mails_options[6])) $mails_options[6] = $ip ;
     90$mails_options = explode("," , $conf['mail_superv']);
     91        if (!isset($mails_options[7])) $mails_options[7] = 'off' ; //set_id
     92                if (!isset($mails_options[6])) $mails_options[6] = $ip   ;
    9293                if (!isset($mails_options[5])) $mails_options[5] = 'off' ;
    9394                if (!isset($mails_options[4])) $mails_options[4] = 'off' ;
     
    366367                        $mails_options[4] = isset($_POST['no_connect']) ? $_POST['no_connect'] : "off" ;
    367368                        $mails_options[5] = isset($_POST['set_auto']) ? $_POST['set_auto'] : "off" ;
     369                                $mails_options[7] = isset($_POST['set_auto']) ? $_POST['set_id'] : "off" ;
    368370                                sauve_options();
    369371                            $infos_message .=  l10n('save_config') . '<br />';   
     
    402404                        'no_connect' => ($mails_options[4] == 'on') ? 'checked="checked"' : '' ,
    403405                                                'set_auto' => ($mails_options[5] == 'on') ? 'checked="checked"' : '' ,
    404                                                
     406                                                'set_id' => ($mails_options[7] == 'on') ? 'checked="checked"' : '' ,
    405407                                                'IP' =>  $ip ,                                         
    406408                                                'PAYS' =>  $pays  ,
  • extensions/Mail_supervisor/include/fonctions.php

    r4451 r4715  
    4141global $lang ;
    4242
    43 
    4443include_once (MAIL_SUPERV_PATH.'include/function_test_send.php');
    45 
    46 
    4744    load_language('plugin.lang', MAIL_SUPERV_PATH);
    48 
    49 
    5045global  $superv_champs , $superv_type ,$superv_bl_champs , $superv_bl_type ;
    5146         
     
    5651 if ( isset($mails_options) )
    5752        {
    58           if ( count($mails_options) > 6 )
     53         
     54         while ( count($mails_options) < 10 )
    5955           {
     56         
     57              $mails_options[]='?';
     58           }
     59           
    6060                $valeurs = implode( ',',$mails_options);
    6161                $query = '
     
    6565                LIMIT 1';
    6666                        pwg_query($query);
    67           }
     67         
    6868        }
    6969}
     
    638638 
    639639if (count($mails_options) < 7 ) return false ;
    640   Get_Geo();
     640     Get_Geo();
    641641     $champs=implode(',',$superv_bl_champs);
    642642     $query = "
  • extensions/Mail_supervisor/language/fr_FR/plugin.lang.php

    r4451 r4715  
    88$lang['no_connect'] = 'Empêche l\' adresse IP de se connecter au site.';
    99$lang['set_auto'] = 'Enregistre automatiquement l\' adresse IP dans la liste noire si elle existe dans la base de données de "stopforumspam" .';
     10$lang['set_id'] = 'Lors de l\'enregistrement du nouvel utilisateur, vérifie que l\' adresse mail n\'est pas dans la base de données de "stopforumspam" .';
    1011$lang['unset_black_list'] = 'Supprime de la liste noire';
    1112$lang['set_black_list'] = 'Mise sur la liste noire';
  • extensions/Mail_supervisor/main.inc.php

    r4452 r4715  
    22/*
    33Plugin Name: Mail supervisor
    4 Version: 1.2.9.a
     4Version: 1.3.1
    55Description: Mail supervisor surveille l'envoie des mails.
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=315
     
    7979                                        );                                                                                                                                     
    8080
    81 
     81 global $conf ;
     82 
    8283add_event_handler('send_mail', 'clj_mail',EVENT_HANDLER_PRIORITY_NEUTRAL - 1 , 6);
    8384
     
    347348}
    348349
     350        $mails_options = explode("," , $conf['mail_superv']);
     351         
    349352//==========================================================================================
     353if ($mails_options[7]=='on'  ) {
    350354 add_event_handler('register_user_check', 'Test_spam_g', EVENT_HANDLER_PRIORITY_NEUTRAL +2  , 2);
    351  
     355 }
    352356function Test_spam_g ($err, $user)
    353357{
     358
     359if (count($err)!=0 ) return $err ;
    354360if ( !isset($_POST['submit_add']) && !isset($_POST['submit'])  ) return $err ;
    355 if (count($err)!=0 ) return $err ;
    356361//Liableelard
    357362include_once (MAIL_SUPERV_PATH.'include/fonctions.php');
     
    363368        $user_name = $user['username'];
    364369}
     370$user_name ="";
    365371 $ip='0';
    366372                if (test_spam($ip,$user_name ,$mail ))
     
    371377                    $err[] = $user_name . " : " .$mail . " ". l10n('is_a_spam')   ;
    372378                 }
     379                 
    373380return $err ;
    374381}
  • extensions/Mail_supervisor/maintain.inc.php

    r4361 r4715  
    100100    $query = '
    101101    INSERT INTO '.CONFIG_TABLE.' (param, value, comment)
    102     VALUES ("mail_superv","off,off,off,off,off,on,127.0.0.1,?? ,?? ,?? ","Parametres du plugin Mail superviseur")
     102    VALUES ("mail_superv","off,off,off,off,off,on,127.0.0.1,on ,?? ,?? ","Parametres du plugin Mail superviseur")
    103103    ;';
    104104    pwg_query($query);
Note: See TracChangeset for help on using the changeset viewer.