Changeset 5181


Ignore:
Timestamp:
03/18/10 23:08:28 (10 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

  • Bug 1474 fixed : Customizable text for ConfirmMail.tpl
  • Bug 1467 fixed : FCK Editor's functionnalities are available on registration's confirmation return page customization fields
  • Bug 1508 fixed : Plugin's name'll now be UserAdvManager (deletion of "nbc_" in code and PEM). Plugin's name is correctly displayed in plugins manager.
Location:
extensions/NBC_UserAdvManager/trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/ConfirmMail.php

    r5056 r5181  
    33define('PHPWG_ROOT_PATH','./../../'); 
    44include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); 
    5 include_once (NBC_UAM_PATH.'include/constants.php'); 
    6 include_once (NBC_UAM_PATH.'include/functions.inc.php'); 
     5include_once (UAM_PATH.'include/constants.php'); 
     6include_once (UAM_PATH.'include/functions.inc.php'); 
    77 
    88// +-----------------------------------------------------------------------+ 
     
    1010// +-----------------------------------------------------------------------+ 
    1111//check_status(ACCESS_NONE); 
    12 load_language('plugin.lang', NBC_UAM_PATH); 
     12load_language('plugin.lang', UAM_PATH); 
    1313 
    1414if (isset($_GET['key'])) 
    1515{ 
    1616 
     17  global $conf; 
     18   
     19  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
     20 
    1721  if (VerifyConfirmMail($_GET['key'])) 
     22  { 
    1823    $template->assign( 
    1924                        array( 
    20                                 'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_ok'), 
     25                                'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[5], 
    2126                        ) 
    2227                ); 
    23   else   
     28  }   
     29  else 
     30  {   
    2431    $template->assign( 
    2532                        array( 
    26                                 'CONFIRM_MAIL_MESSAGE' => l10n('confirm_mail_bad'), 
     33                                'CONFIRM_MAIL_MESSAGE' => $conf_UAM_ConfirmMail[6], 
    2734                        ) 
    28                 );         
    29 //    redirect(make_index_url()); 
     35                ); 
     36  } 
     37 
     38  //$refresh_txt = l10n('ConfirmMail_redirection'); 
     39  //$refresh_time = '10'; 
     40  //redirect(make_index_url(),'',$refresh_time); 
    3041} 
    3142 
     
    5061$template->set_filenames( 
    5162  array( 
    52         'confirm_mail'=>NBC_UAM_PATH.'ConfirmMail.tpl', 
     63        'confirm_mail'=>UAM_PATH.'ConfirmMail.tpl', 
    5364        ) 
    5465); 
  • extensions/NBC_UserAdvManager/trunk/ConfirmMail.tpl

    r4159 r5181  
    44    <ul class="categoryActions"> 
    55      <li> 
    6       {if isset($GALLERY_URL) } 
     6      {if isset($GALLERY_URL)} 
    77        <a href="{$GALLERY_URL}" title="{'return to homepage'|@translate}"> 
    88          <img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"> 
  • extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php

    r5105 r5181  
    99check_status(ACCESS_ADMINISTRATOR); 
    1010 
    11 if (!defined('NBC_UAM_PATH')) define('NBC_UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 
     11if (!defined('UAM_PATH')) define('UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 
    1212 
    1313//ini_set('error_reporting', E_ALL); 
     
    1818$my_base_url = get_admin_plugin_menu_link(__FILE__); 
    1919 
    20 load_language('plugin.lang', NBC_UAM_PATH); 
    21 load_language('help/plugin.lang', NBC_UAM_PATH); 
     20load_language('plugin.lang', UAM_PATH); 
     21load_language('help/plugin.lang', UAM_PATH); 
    2222 
    2323$page['global'] = array(); 
     
    5858// |                      Getting plugin version                           | 
    5959// +-----------------------------------------------------------------------+ 
    60 $plugin =  PluginVer(NBC_UAM_PATH); 
     60$plugin =  PluginInfos(UAM_PATH); 
    6161$version = $plugin['version'] ; 
    6262 
     
    6666// +----------------------------------------------------------+ 
    6767 
    68 /* Pending because this may cause problems with special characters in emails */ 
    69 /*$toolbar = 'Basic'; 
     68/* Available only for ConfirmMail return page customization */ 
     69$toolbar = 'Basic'; 
    7070$width = '750px'; 
    7171$height = '300px'; 
    7272$areas = array(); 
    73 array_push( $areas,'UAM_MailInfo_Text','UAM_ConfirmMail_Text','UAM_GhostTracker_ReminderText','UAM_ConfirmMail_ReMail_Txt1','UAM_ConfirmMail_ReMail_Txt2'); 
     73array_push( $areas,'UAM_ConfirmMail_Custom_Txt1','UAM_ConfirmMail_Custom_Txt2'); 
    7474 
    7575if (function_exists('set_fckeditor_instance')) 
     
    8686 
    8787  set_fckeditor_instance($areas, $toolbar, $width, $height); 
    88 }*/ 
     88} 
    8989 
    9090 
     
    144144      $_POST['UAM_Admin_ConfMail']); 
    145145 
    146     $conf['nbc_UserAdvManager'] = serialize($newconf_UAM); 
     146    $conf['UserAdvManager'] = serialize($newconf_UAM); 
    147147 
    148148                $query = ' 
    149149                UPDATE '.CONFIG_TABLE.' 
    150                 SET value="'.addslashes($conf['nbc_UserAdvManager']).'" 
    151                 WHERE param="nbc_UserAdvManager" 
     150                SET value="'.addslashes($conf['UserAdvManager']).'" 
     151                WHERE param="UserAdvManager" 
    152152                LIMIT 1 
    153153                ;'; 
     
    160160 
    161161    $_POST['UAM_ConfirmMail_ReMail_Txt2'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_ReMail_Txt2'])); 
     162     
     163    $_POST['UAM_ConfirmMail_Custom_Txt1'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Custom_Txt1'])); 
     164     
     165    $_POST['UAM_ConfirmMail_Custom_Txt2'] = str_replace("\'", "'", str_replace("\\\\", "\\", $_POST['UAM_ConfirmMail_Custom_Txt2'])); 
    162166 
    163167 
     
    167171      $_POST['UAM_ConfirmMail_ReMail_Txt1'], 
    168172      $_POST['UAM_ConfirmMail_Remail'], 
    169       $_POST['UAM_ConfirmMail_ReMail_Txt2']); 
    170  
    171     $conf['nbc_UserAdvManager_ConfirmMail'] = serialize($newconf_UAM_ConfirmMail); 
     173      $_POST['UAM_ConfirmMail_ReMail_Txt2'], 
     174      $_POST['UAM_ConfirmMail_Custom_Txt1'], 
     175      $_POST['UAM_ConfirmMail_Custom_Txt2']); 
     176 
     177    $conf['UserAdvManager_ConfirmMail'] = serialize($newconf_UAM_ConfirmMail); 
    172178     
    173179          $query = ' 
    174180      UPDATE '.CONFIG_TABLE.' 
    175                         SET value="'.addslashes($conf['nbc_UserAdvManager_ConfirmMail']).'" 
    176                         WHERE param="nbc_UserAdvManager_ConfirmMail" 
     181                        SET value="'.addslashes($conf['UserAdvManager_ConfirmMail']).'" 
     182                        WHERE param="UserAdvManager_ConfirmMail" 
    177183                        LIMIT 1 
    178184                ;'; 
     
    194200  } 
    195201 
    196   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     202  $conf_UAM = unserialize($conf['UserAdvManager']); 
    197203 
    198204/* Group setting for unvalidated and validated users */ 
     
    289295  $nb_para2=(isset($_POST["nb_para2"])) ? $_POST["nb_para2"]:""; 
    290296 
    291   $conf_UAM_ConfirmMail = unserialize($conf['nbc_UserAdvManager_ConfirmMail']); 
     297  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    292298   
    293299  $template->assign( 
     
    296302    'nb_para2'                       => $nb_para2, 
    297303    'UAM_VERSION'                    => $version, 
    298     'NBC_UAM_PATH'                   => NBC_UAM_PATH, 
     304    'UAM_PATH'                       => UAM_PATH, 
    299305                'UAM_MAIL_INFO_TRUE'             => $conf_UAM[0]=='true' ?  'checked="checked"' : '' , 
    300306                'UAM_MAIL_INFO_FALSE'            => $conf_UAM[0]=='false' ?  'checked="checked"' : '' , 
     
    339345    'UAM_CONFIRMMAIL_REMAIL_TXT1'                => $conf_UAM_ConfirmMail[2], 
    340346    'UAM_CONFIRMMAIL_REMAIL_TXT2'                => $conf_UAM_ConfirmMail[4], 
     347    'UAM_CONFIRMMAIL_CUSTOM_TXT1'                => $conf_UAM_ConfirmMail[5], 
     348    'UAM_CONFIRMMAIL_CUSTOM_TXT2'                => $conf_UAM_ConfirmMail[6], 
    341349    ) 
    342350  ); 
     
    401409                  while($row = mysql_fetch_assoc($result)) 
    402410                  { 
    403                           $conf_nbc_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[13]); 
    404                           for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 
     411                          $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[13]); 
     412                          for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++) 
    405413                          { 
    406                                         $pattern = '/'.$conf_nbc_MailExclusion[$i].'/'; 
     414                                        $pattern = '/'.$conf_MailExclusion[$i].'/'; 
    407415                                  if (preg_match($pattern, $row['mail_address'])) 
    408416                                  { 
     
    457465  case 'userlist': 
    458466   
    459   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     467  $conf_UAM = unserialize($conf['UserAdvManager']); 
    460468   
    461469  if (isset($conf_UAM[20]) and $conf_UAM[20]=='true') 
     
    570578        array( 
    571579          'UAM_VERSION' => $version, 
    572           'NBC_UAM_PATH'=> NBC_UAM_PATH, 
     580          'UAM_PATH'    => UAM_PATH, 
    573581          ) 
    574582        ); 
     
    618626  case 'usermanager': 
    619627 
    620   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
    621  
    622   $conf_UAM_ConfirmMail = unserialize($conf['nbc_UserAdvManager_ConfirmMail']); 
     628  $conf_UAM = unserialize($conf['UserAdvManager']); 
     629 
     630  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    623631         
    624632  if (isset($conf_UAM[2]) and $conf_UAM[2]=='true' and ((isset($conf_UAM[3]) and $conf_UAM[3] <> '-1') or (isset($conf_UAM[9]) and $conf_UAM[9] <> '-1')) and isset($conf_UAM_ConfirmMail[0]) and $conf_UAM_ConfirmMail[0]=='true') 
     
    11351143    $template->assign( 
    11361144      array( 
    1137         'UAM_VERSION'      => $version, 
    1138         'NBC_UAM_PATH'     => NBC_UAM_PATH, 
     1145        'UAM_VERSION'  => $version, 
     1146        'UAM_PATH'     => UAM_PATH, 
    11391147      ) 
    11401148    ); 
     
    11721180  case 'ghosttracker': 
    11731181 
    1174   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     1182  $conf_UAM = unserialize($conf['UserAdvManager']); 
    11751183         
    11761184  if (isset($conf_UAM[17]) and $conf_UAM[17]=='true') 
     
    14911499      $template->assign( 
    14921500        array( 
    1493           'UAM_VERSION'      => $version, 
    1494           'NBC_UAM_PATH'     => NBC_UAM_PATH, 
     1501          'UAM_VERSION'  => $version, 
     1502          'UAM_PATH'     => UAM_PATH, 
    14951503        ) 
    14961504      ); 
  • extensions/NBC_UserAdvManager/trunk/admin/ghosttracker.tpl

    r5056 r5181  
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 
    33 
    4 {html_head}<link rel="stylesheet" type="text/css" href="{$NBC_UAM_PATH}admin/uam.css">{/html_head} 
     4{html_head}<link rel="stylesheet" type="text/css" href="{$UAM_PATH}admin/uam.css">{/html_head} 
    55 
    66<script type="text/javascript"> 
  • extensions/NBC_UserAdvManager/trunk/admin/global.tpl

    r5085 r5181  
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 
    33 
    4 {html_head}<link rel="stylesheet" type="text/css" href="{$NBC_UAM_PATH}admin/uam.css">{/html_head} 
     4{html_head}<link rel="stylesheet" type="text/css" href="{$UAM_PATH}admin/uam.css">{/html_head} 
    55 
    66<script type="text/javascript"> 
     
    1414 
    1515<script type="text/javascript"> 
    16 function nbc_blockToggleDisplay( headerId, contentId ) 
     16function uam_blockToggleDisplay( headerId, contentId ) 
    1717{ldelim} 
    1818  if (typeof(headerId)=='string') 
     
    3838<div id="instructionConfig1" class="instructionBlock" > 
    3939 
    40   <div id="config1_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('config1_header', 'Config1')"> 
     40  <div id="config1_header" class="instructionBlockHeaderCollapsed" onclick="uam_blockToggleDisplay('config1_header', 'Config1')"> 
    4141    <span class="cluetip" title="{'UAM_restricTitle'|translate}|{'UAM_restricTitle_d'|translate}">{'UAM_Title1'|@translate}</span> 
    4242  </div> 
     
    9696<div id="instructionConfig2" class="instructionBlock" > 
    9797     
    98   <div id="config2_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('config2_header', 'Config2')"> 
     98  <div id="config2_header" class="instructionBlockHeaderCollapsed" onclick="uam_blockToggleDisplay('config2_header', 'Config2')"> 
    9999    <span class="cluetip" title="{'UAM_confirmTitle'|translate}|{'UAM_confirmTitle_d'|translate}">{'UAM_Title2'|@translate}</span> 
    100100  </div> 
     
    235235--> 
    236236        </ul> 
     237<br><hr><br> 
     238 
     239{if $UAM_CONFIRM_MAIL_TRUE} 
     240        <li><label class="cluetip" title="{'UAM_confirmmail_custom1'|translate}|{'UAM_confirmmail_custom1_d'|translate}">{'UAM_confirmmail_custom_Txt1'|@translate}</label><br><br> 
     241          <textarea name="UAM_ConfirmMail_Custom_Txt1" id="UAM_ConfirmMail_Custom_Txt1" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT1}</textarea><br> 
     242        </li> 
     243{if 'FCK_PATH'|@defined} 
     244  <div style="text-align:right;"> 
     245    <a href="#" onClick="toogleEditor('UAM_ConfirmMail_Custom_Txt1'); return false;">FCK Editor On/Off</a> 
     246  </div> 
     247{/if} 
     248         
     249        <li><label class="cluetip" title="{'UAM_confirmmail_custom2'|translate}|{'UAM_confirmmail_custom2_d'|translate}">{'UAM_confirmmail_custom_Txt2'|@translate}</label><br><br> 
     250          <textarea name="UAM_ConfirmMail_Custom_Txt2" id="UAM_ConfirmMail_Custom_Txt2" rows="10" cols="80" {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT2}</textarea><br> 
     251        </li> 
     252{if 'FCK_PATH'|@defined} 
     253  <div style="text-align:right;"> 
     254    <a href="#" onClick="toogleEditor('UAM_ConfirmMail_Custom_Txt2'); return false;">FCK Editor On/Off</a> 
     255  </div> 
     256{/if} 
     257{else} 
     258        <li><label class="cluetip" title="{'UAM_confirmmail_custom1'|translate}|{'UAM_confirmmail_custom1_d'|translate}">{'UAM_confirmmail_custom_Txt1'|@translate}</label><br><br> 
     259          <textarea name="UAM_ConfirmMail_Custom_Txt1" id="UAM_ConfirmMail_Custom_Txt1" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT1}</textarea><br><br> 
     260        </li> 
     261 
     262        <li><label class="cluetip" title="{'UAM_confirmmail_custom2'|translate}|{'UAM_confirmmail_custom2_d'|translate}">{'UAM_confirmmail_custom_Txt2'|@translate}</label><br><br> 
     263          <textarea name="UAM_ConfirmMail_Custom_Txt2" id="UAM_ConfirmMail_Custom_Txt2" rows="10" cols="80" readonly {$TAG_INPUT_ENABLED}>{$UAM_CONFIRMMAIL_CUSTOM_TXT2}</textarea><br><br> 
     264        </li> 
     265{/if} 
    237266      </ul> 
    238267    </fieldset> 
     
    243272<div id="instructionConfig3" class="instructionBlock" > 
    244273 
    245   <div id="config3_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('config3_header', 'Config3')"> 
     274  <div id="config3_header" class="instructionBlockHeaderCollapsed" onclick="uam_blockToggleDisplay('config3_header', 'Config3')"> 
    246275    <span class="cluetip" title="{'UAM_miscTitle'|translate}|{'UAM_miscTitle_d'|translate}">{'UAM_Title3'|@translate}</span> 
    247276  </div> 
     
    292321<div id="instructionTips" class="instructionBlock" > 
    293322     
    294   <div id="Tips_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('Tips_header', 'Tips')"> 
     323  <div id="Tips_header" class="instructionBlockHeaderCollapsed" onclick="uam_blockToggleDisplay('Tips_header', 'Tips')"> 
    295324    <span class="cluetip" title="{'UAM_tipsTitle'|translate}|{'UAM_tipsTitle_d'|translate}">{'UAM_Title4'|@translate}</span> 
    296325  </div> 
     
    298327  <div id="Tips" class="instructionBlockContent" style="display:none"> 
    299328    <fieldset> 
    300       <div id="Tips1_header" class="instructionBlockHeaderCollapsed" onclick="nbc_blockToggleDisplay('Tips1_header', 'Tips1')"> 
     329      <div id="Tips1_header" class="instructionBlockHeaderCollapsed" onclick="uam_blockToggleDisplay('Tips1_header', 'Tips1')"> 
    301330        <span>{'UAM_Tips1'|@translate}</span> 
    302331      </div> 
     
    314343  var n1=document.getElementById("nb_para").value ; 
    315344  var n2=document.getElementById("nb_para2").value; 
    316    nbc_blockToggleDisplay(n1,n2 ); 
     345   uam_blockToggleDisplay(n1,n2 ); 
    317346</script> 
  • extensions/NBC_UserAdvManager/trunk/admin/userlist.tpl

    r5056 r5181  
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 
    33 
    4 {html_head}<link rel="stylesheet" type="text/css" href="{$NBC_UAM_PATH}admin/uam.css">{/html_head} 
     4{html_head}<link rel="stylesheet" type="text/css" href="{$UAM_PATH}admin/uam.css">{/html_head} 
    55 
    66<script type="text/javascript"> 
  • extensions/NBC_UserAdvManager/trunk/admin/usermanager.tpl

    r5056 r5181  
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.cluetip.packed.js"} 
    33 
    4 {html_head}<link rel="stylesheet" type="text/css" href="{$NBC_UAM_PATH}admin/uam.css">{/html_head} 
     4{html_head}<link rel="stylesheet" type="text/css" href="{$UAM_PATH}admin/uam.css">{/html_head} 
    55 
    66<script type="text/javascript"> 
  • extensions/NBC_UserAdvManager/trunk/changelog.txt.php

    r5105 r5181  
    11<?php 
    22/* 
    3 Plugin Name: NBC_UserAdvManager 
     3Plugin Name: UserAdvManager 
    44** Change log ** 
    55*************************************** 
     
    152152 
    153153-- 2.14.1 : Bug 1497 fixed - Using users tracker without Ghost Tracker is now OK 
     154 
     155-- 2.14.2 : Bug 1474 fixed - Messages on registration's confirmation return page (ConfirmMail.tpl) are customizable  
     156            Bug 1467 fixed - FCK Editor's functionnalities are available on registration's confirmation return page customization fields 
     157            Bug 1508 fixed - Plugin's name is now UserAdvManager (deletion of "nbc_" in code and PEM) 
    154158*/ 
    155159?> 
  • extensions/NBC_UserAdvManager/trunk/include/functions.inc.php

    r5084 r5181  
    11<?php 
    2 include_once (NBC_UAM_PATH.'include/constants.php'); 
    3 load_language('plugin.lang', NBC_UAM_PATH); 
     2include_once (UAM_PATH.'include/constants.php'); 
     3load_language('plugin.lang', UAM_PATH); 
    44 
    55/* Function called from main.inc.php to send validation email */ 
     
    99  global $conf; 
    1010 
    11   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     11  $conf_UAM = unserialize($conf['UserAdvManager']); 
    1212   
    1313        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 
     
    3636    $language = $data['language']; /* Usefull for debugging */ 
    3737    switch_lang_to($data['language']); 
    38     load_language('plugin.lang', NBC_UAM_PATH); 
     38    load_language('plugin.lang', UAM_PATH); 
    3939  } 
    4040 
     
    151151  global $conf; 
    152152 
    153   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
    154  
    155   $conf_UAM_ConfirmMail = unserialize($conf['nbc_UserAdvManager_ConfirmMail']); 
     153  $conf_UAM = unserialize($conf['UserAdvManager']); 
     154 
     155  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    156156   
    157157        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 
     
    172172  switch_lang_to($data['language']); 
    173173    
    174   load_language('plugin.lang', NBC_UAM_PATH); 
     174  load_language('plugin.lang', UAM_PATH); 
    175175 
    176176  switch($typemail) 
     
    253253  global $conf; 
    254254 
    255   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     255  $conf_UAM = unserialize($conf['UserAdvManager']); 
    256256   
    257257        include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); 
     
    271271  switch_lang_to($data['language']); 
    272272    
    273   load_language('plugin.lang', NBC_UAM_PATH); 
     273  load_language('plugin.lang', UAM_PATH); 
    274274   
    275275  $subject = '['.$conf['gallery_title'].'] '.l10n_args(get_l10n_args('Ghost_reminder_of_%s', $username));      
     
    333333  global $conf; 
    334334 
    335   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     335  $conf_UAM = unserialize($conf['UserAdvManager']); 
    336336  $Confirm_Mail_ID = FindAvailableConfirmMailID(); 
    337337 
     
    387387    } 
    388388     
    389     return get_absolute_root_url().NBC_UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID; 
     389    return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID; 
    390390  } 
    391391} 
     
    417417                pwg_query($query); 
    418418     
    419     return get_absolute_root_url().NBC_UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID; 
     419    return get_absolute_root_url().UAM_PATH.'ConfirmMail.php?key='.$Confirm_Mail_ID; 
    420420  } 
    421421} 
     
    465465  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 
    466466   
    467   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
    468  
    469   $conf_UAM_ConfirmMail = unserialize($conf['nbc_UserAdvManager_ConfirmMail']); 
     467  $conf_UAM = unserialize($conf['UserAdvManager']); 
     468 
     469  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    470470 
    471471  $query = " 
     
    633633  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 
    634634 
    635   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     635  $conf_UAM = unserialize($conf['UserAdvManager']); 
    636636         
    637637  $query = " 
     
    736736  global $conf; 
    737737 
    738   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     738  $conf_UAM = unserialize($conf['UserAdvManager']); 
    739739 
    740740  if (isset($login) and isset($conf_UAM[8]) and $conf_UAM[8] <> '') 
    741741  { 
    742     $conf_nbc_CharExclusion = preg_split("/,/",$conf_UAM[8]); 
    743     for ($i = 0 ; $i < count($conf_nbc_CharExclusion) ; $i++) 
    744     { 
    745       $pattern = '/'.$conf_nbc_CharExclusion[$i].'/i'; 
     742    $conf_CharExclusion = preg_split("/,/",$conf_UAM[8]); 
     743    for ($i = 0 ; $i < count($conf_CharExclusion) ; $i++) 
     744    { 
     745      $pattern = '/'.$conf_CharExclusion[$i].'/i'; 
    746746      if (preg_match($pattern, $login)) 
    747747      { 
     
    763763  global $conf; 
    764764 
    765   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     765  $conf_UAM = unserialize($conf['UserAdvManager']); 
    766766   
    767767        if (isset($email) and isset($conf_UAM[13]) and $conf_UAM[13] <> '') 
    768768        { 
    769769                //$ncsemail = strtolower($email); 
    770                 $conf_nbc_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[13]); 
    771                 for ($i = 0 ; $i < count($conf_nbc_MailExclusion) ; $i++) 
     770                $conf_MailExclusion = preg_split("/[\s,]+/",$conf_UAM[13]); 
     771                for ($i = 0 ; $i < count($conf_MailExclusion) ; $i++) 
    772772                { 
    773                         $pattern = '/'.$conf_nbc_MailExclusion[$i].'/i'; 
     773                        $pattern = '/'.$conf_MailExclusion[$i].'/i'; 
    774774                        if (preg_match($pattern, $email)) 
    775775      { 
     
    791791           
    792792        /* Get ConfirmMail configuration */ 
    793   $conf_UAM_ConfirmMail = unserialize($conf['nbc_UserAdvManager_ConfirmMail']); 
     793  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    794794  /* Get UAM configuration */ 
    795   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     795  $conf_UAM = unserialize($conf['UserAdvManager']); 
    796796   
    797797  $users = array(); 
     
    882882        global $conf, $page; 
    883883 
    884   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     884  $conf_UAM = unserialize($conf['UserAdvManager']); 
    885885   
    886886  $users = array(); 
     
    967967           
    968968        /* Get ConfirmMail configuration */ 
    969   $conf_UAM_ConfirmMail = unserialize($conf['nbc_UserAdvManager_ConfirmMail']); 
     969  $conf_UAM_ConfirmMail = unserialize($conf['UserAdvManager_ConfirmMail']); 
    970970           
    971971        /* Get UAM configuration */ 
    972   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     972  $conf_UAM = unserialize($conf['UserAdvManager']); 
    973973         
    974974        $query = " 
     
    10921092 
    10931093/* Email sending debugger function */ 
    1094 function MailLog  ($to, $subject, $content, $language) 
    1095 { 
    1096    $fo=fopen (NBC_UAM_PATH.'admin/maillog.txt','a') ; 
     1094function MailLog($to, $subject, $content, $language) 
     1095{ 
     1096   $fo=fopen (UAM_PATH.'admin/maillog.txt','a') ; 
    10971097   fwrite($fo,"======================\n") ; 
    10981098   fwrite($fo,'le ' . date('D, d M Y H:i:s') . "\r\n"); 
     
    11051105 
    11061106 
    1107 /* Function called from UAM_admin.php to get the plugin version */ 
    1108 function PluginVer($dir) 
     1107/* Function called from UAM_admin.php and main.inc.php to get the plugin version and name */ 
     1108function PluginInfos($dir) 
    11091109{ 
    11101110  $path = $dir; 
     
    11531153function clean_obsolete_files() 
    11541154{ 
    1155   if (file_exists(NBC_UAM_PATH.'obsolete.list') 
    1156     and $old_files = file(NBC_UAM_PATH.'obsolete.list', FILE_IGNORE_NEW_LINES) 
     1155  if (file_exists(UAM_PATH.'obsolete.list') 
     1156    and $old_files = file(UAM_PATH.'obsolete.list', FILE_IGNORE_NEW_LINES) 
    11571157    and !empty($old_files)) 
    11581158  { 
     
    11601160    foreach($old_files as $old_file) 
    11611161    { 
    1162       $path = NBC_UAM_PATH.$old_file; 
     1162      $path = UAM_PATH.$old_file; 
    11631163      if (is_file($path)) 
    11641164      { 
  • extensions/NBC_UserAdvManager/trunk/language/de_DE/plugin.lang.php

    r5085 r5181  
    33global $lang,$conf; 
    44 
    5 $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     5$conf_UAM = unserialize($conf['UserAdvManager']); 
    66 
    77 
     
    221221- Eine Galerie mit allen oder einigen privaten Kategorien, sichtbar nur durch registrierte Benutzer<br> 
    222222- Mindestens 2 der folgenden Piwigo Nutzergruppen: "Warten", ohne die Erlaubnis der privaten Gruppen und "Validiert" mit allen Berechtigungen für den privaten Kategorien<br> 
    223 - NBC_UAM plugin<br> 
     223- UAM plugin<br> 
    224224- PWG Stuffs plugin, für das Hinzufügen eines Moduls Art "Personal Block"<br> 
    225225- Optional können Sie das Plugin Extended Description Multi-Sprachen<br> 
     
    227227              <li> 
    228228Etappen:<br><br> 
    229 A. In plugin NBC_UAM: 
     229A. In plugin UAM: 
    230230              <ol> 
    231231                <li>Aktivieren Sie Anmeldebestätigung</li> 
     
    240240                <li>Fügen Sie ein neues Modul Typ "Personal-Block: Zeigt einen Block Personal (z. B. eine redaktionelle)"</li> 
    241241                <li>Konfigurieren Sie das Modul unter Angabe der Titel (zB "Anmeldung bis Validierung") und seine Beschreibung, und aktivieren Sie nur "Warten" in der Liste der Gruppen erlaubt</li> 
    242                 <li>Kompletten Inhalt des Moduls mit der Meldung Informationen, die den Benutzern angezeigt werden nicht validiert. Als NBC_UAM kann Markup-Sprachen verwendet werden, wenn das Plugin Extended Description aktiviert ist</li> 
     242                <li>Kompletten Inhalt des Moduls mit der Meldung Informationen, die den Benutzern angezeigt werden nicht validiert. Als UAM kann Markup-Sprachen verwendet werden, wenn das Plugin Extended Description aktiviert ist</li> 
    243243                <li>Check "Display das Modul auf der Homepage der Website"</li> 
    244244                <li>Überprüfen Sie die Konfiguration des Moduls</li> 
  • extensions/NBC_UserAdvManager/trunk/language/en_UK/plugin.lang.php

    r5085 r5181  
    33global $lang,$conf; 
    44 
    5 $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     5$conf_UAM = unserialize($conf['UserAdvManager']); 
    66 
    77 
     
    2020$lang['title_confirm_mail'] = 'Validate your registration'; 
    2121$lang['confirm_mail_page_title'] = 'Validate your registration'; 
    22 $lang['confirm_mail_ok'] = '<br><br><br>Thank you to have confirmed your email address and your registration on the gallery. Have fun !<br><br><br><br>'; 
    2322 
    2423 
     
    192191$lang['Add of %s'] = 'Profile created for %s'; 
    193192$lang['Update of %s'] = 'Profile %s updated'; 
    194 /* Email confirmation page */ 
    195 $lang['confirm_mail_bad'] = '<br><br><br>Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.<br><br><br><br>'; 
     193 
    196194/* Mailing */ 
    197195$lang['Ghost_reminder_of_%s'] = '%s, this is a reminder email'; 
     
    222220- A gallery with all or some private categories, visible only by registered users<br> 
    223221- At least 2 following Piwigo\'s users groups: "Waiting," without permission on private categories, and "Validated" with all the permissions on the private categories<br> 
    224 - NBC_UAM plugin<br> 
     222- UAM plugin<br> 
    225223- PWG Stuffs plugin, for adding a module type "Personal Block"<br> 
    226224- Optionally, the plugin Extended Description to support multi-languages<br> 
     
    228226              <li> 
    229227Stages:<br><br> 
    230 A. In plugin NBC_UAM: 
     228A. In plugin UAM: 
    231229              <ol> 
    232230                <li>Enable registration confirmation</li> 
     
    241239                <li>Add a new module type "Personal block: Shows a block staff (eg an editorial)"</li> 
    242240                <li>Configure the module, indicating the title (eg "Registration pending validation") and its description, and only check "Waiting" in the list of groups allowed</li> 
    243                 <li>Complete content of the module with the message information to be displayed to users not validated. As NBC_UAM, languages markup may be used if the plugin is enabled Extended Description</li> 
     241                <li>Complete content of the module with the message information to be displayed to users not validated. As UAM, languages markup may be used if the plugin is enabled Extended Description</li> 
    244242                <li>Check "Display the module on the homepage of the site"</li> 
    245243                <li>Validate the configuration of the module</li> 
     
    247245          </ul>'; 
    248246// --------- End: New or revised $lang ---- from version 2.14.0 
     247 
     248 
     249// --------- Starting below: New or revised $lang ---- from version 2.14.2 
     250$lang['UAM_confirmmail_custom_Txt'] = 'Validation page customization'; 
     251/* Email confirmation page */ 
     252// --------- End: New or revised $lang ---- from version 2.14.2 
    249253?> 
  • extensions/NBC_UserAdvManager/trunk/language/es_ES/plugin.lang.php

    r5085 r5181  
    33global $lang,$conf; 
    44 
    5 $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     5$conf_UAM = unserialize($conf['UserAdvManager']); 
    66 
    77 
     
    222222- Una galería con todas o algunas categorías privado, visible sólo por los usuarios registrados<br> 
    223223- Al menos 2 siguientes Piwigo grupos de usuarios: "Espera," sin permiso en las categorías de privados, y "Validado" con todos los permisos en las categorías de privados<br> 
    224 - NBC_UAM plugin<br> 
     224- UAM plugin<br> 
    225225- PWG Stuffs plugin, para agregar un tipo de módulo "Personal Block"<br> 
    226226- Opcionalmente, la Extended Description plugin para soportar múltiples idiomas<br> 
     
    228228              <li> 
    229229Etapas:<br><br> 
    230 A. En plugin NBC_UAM: 
     230A. En plugin UAM: 
    231231              <ol> 
    232232                <li>Activar la confirmación de registro</li> 
     
    241241                <li>Añadir un tipo de módulo nuevo "bloque de Personal: Muestra una plantilla de bloque (por ejemplo, un editorial)"</li> 
    242242                <li>Configurar el módulo, lo que indica el título (por ejemplo, "en espera de la validación de Registro") y su descripción, y solamente "Espera" en la lista de grupos permitido</li> 
    243                 <li>El contenido completo del módulo con la información del mensaje que se mostrará a los usuarios no validados. Como NBC_UAM, lenguajes de marcas pueden ser utilizados si el plugin Extended Description está activado</li> 
     243                <li>El contenido completo del módulo con la información del mensaje que se mostrará a los usuarios no validados. Como UAM, lenguajes de marcas pueden ser utilizados si el plugin Extended Description está activado</li> 
    244244                <li>Active la casilla "Mostrar el módulo en la página principal del sitio"</li> 
    245245                <li>Validar la configuración del módulo</li> 
  • extensions/NBC_UserAdvManager/trunk/language/fr_FR/help/plugin.lang.php

    r5105 r5181  
    145145<b>A NOTER</b> : La liste n\'affiche pas les inscrits qui n\'auraient pas validé leur inscription (si l\'option de validation de l\'inscription est activée). Ces utilisateurs sont alors gérés de manière particulière dans l\'onglet &quot;Suivi des validations&quot;.'; 
    146146// --------- End: New or revised $lang ---- from version 2.14.1 
     147 
     148 
     149// --------- Starting below: New or revised $lang ---- from version 2.14.2 
     150$lang['UAM_confirmmail_custom1'] = 'Personnalisation du retour de confirmation - Confirmation acceptée'; 
     151$lang['UAM_confirmmail_custom1_d'] = 'Lorque l\'option &quot;Confirmation d\'inscription&quot; est active, ce champ permet de personnaliser <b><u>le texte d\'acceptation</u></b> de la confirmation d\'inscription sur la page affichée lorsqu\'un utilisateur clique sur le lien de confirmation qu\'il a reçu par email.<br><br> 
     152A l\'installation du plugin, un texte standard est donnée en exemple.<br><br> 
     153Ce champ est compatible avec l\'extension FCK Editor et, pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.<br><br> 
     154<b style=&quot;color: red;&quot;>La modification du texte n\'est possible QUE si l\'option &quot;Confirmation d\'inscription&quot; est activée.</b>'; 
     155$lang['UAM_confirmmail_custom2'] = 'Personnalisation du retour de confirmation - Confirmation rejetée'; 
     156$lang['UAM_confirmmail_custom2_d'] = 'Lorque l\'option &quot;Confirmation d\'inscription&quot; est active, ce champ permet de personnaliser <b><u>le texte de rejet</u></b> de la confirmation d\'inscription sur la page affichée lorsqu\'un utilisateur clique sur le lien de confirmation qu\'il a reçu par email.<br><br> 
     157A l\'installation du plugin, un texte standard est donnée en exemple.<br><br> 
     158Ce champ est compatible avec l\'extension FCK Editor et, pour une utilisation multi-langues, vous pouvez utiliser les balises [lang] du plugin Extended Description si celui-ci est actif.<br><br> 
     159<b style=&quot;color: red;&quot;>La modification du texte n\'est possible QUE si l\'option &quot;Confirmation d\'inscription&quot; est activée.</b>'; 
     160// --------- End: New or revised $lang ---- from version 2.14.2 
    147161?> 
  • extensions/NBC_UserAdvManager/trunk/language/fr_FR/plugin.lang.php

    r5130 r5181  
    33global $lang,$conf; 
    44 
    5 $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     5$conf_UAM = unserialize($conf['UserAdvManager']); 
    66 
    77 
     
    2020$lang['title_confirm_mail'] = 'Confirmation de votre inscription'; 
    2121$lang['confirm_mail_page_title'] = 'Confirmation d\'inscription'; 
    22 $lang['confirm_mail_ok'] = '<br><br><br>Merci d\'avoir confirmé votre mail et aussi et surtout votre inscription sur le site, profitez bien des photos ...<br><br><br><br>'; 
    2322 
    2423 
     
    192191$lang['Add of %s'] = 'Profil créé pour %s'; 
    193192$lang['Update of %s'] = 'Mise à jour du profil de %s'; 
    194 /* Email confirmation page */ 
    195 $lang['confirm_mail_bad'] = '<br><br><br>Votre clef d\'activation unique est erronée ou expirée ou vous avez déjà validé votre compte, veuillez contacter le webmaster pour régler ce problème.<br><br><br><br>'; 
    196193/* Mailing */ 
    197194$lang['Ghost_reminder_of_%s'] = '%s, ceci est un email de rappel.'; 
     
    222219- Une galerie avec tout ou partie des catégories privées, visibles par les seuls utilisateurs inscrits<br> 
    223220- Au moins les 2 groupes d\'utilisateurs Piwigo suivants : &quot;Attente&quot;, sans aucune permission sur les catégories privées, et &quot;Validés&quot;, avec toutes les permissions sur les catégories privées<br> 
    224 - Le plugin NBC_UAM<br> 
     221- Le plugin UAM<br> 
    225222- Le plugin PWG Stuffs, pour l\'ajout d\'un module de type &quot;Bloc personnel&quot;<br> 
    226223- En option, le plugin Extended Description, pour le support multi-langues<br> 
     
    228225              <li> 
    229226Réalisation:<br><br> 
    230 A. Dans le plugin NBC_UAM: 
     227A. Dans le plugin UAM: 
    231228              <ol> 
    232229                <li>Activer la confirmation d\'inscription</li> 
     
    241238                <li>Ajouter un nouveau module de type &quot;Bloc personnel : Affiche un bloc personnel (un édito par exemple)&quot;</li> 
    242239                <li>Configurer le module, en indiquant son titre (ex : &quot;Inscription en attente de validation&quot;) et sa description, et cocher uniquement&quot;Attente&quot; dans la liste des groupes autorisés</li> 
    243                 <li>Compléter le contenu du module avec le texte du message d\'information qui sera affiché aux utilisateurs non validés. Comme dans NBC_UAM, les balises de langues peuvent être utilisées si le plugin Extended Description est activé</li> 
     240                <li>Compléter le contenu du module avec le texte du message d\'information qui sera affiché aux utilisateurs non validés. Comme dans UAM, les balises de langues peuvent être utilisées si le plugin Extended Description est activé</li> 
    244241                <li>Cocher &quot;Afficher le module sur la page d\'accueil du site&quot;</li> 
    245242                <li>Valider la configuration du module</li> 
     
    247244          </ul>'; 
    248245// --------- End: New or revised $lang ---- from version 2.14.0 
     246 
     247 
     248// --------- Starting below: New or revised $lang ---- from version 2.14.0 
     249$lang['UAM_confirmmail_custom_Txt1'] = 'Personnalisation du retour de confirmation - Confirmation acceptée'; 
     250$lang['UAM_confirmmail_custom_Txt2'] = 'Personnalisation du retour de confirmation - Confirmation rejetée'; 
     251/* Email confirmation page */ 
     252//$lang['ConfirmMail_redirection'] = 'Redirection automatique vers l\'accueil.'; 
     253// --------- End: New or revised $lang ---- from version 2.14.2 
    249254?> 
  • extensions/NBC_UserAdvManager/trunk/language/it_IT/plugin.lang.php

    r5180 r5181  
    33global $lang,$conf; 
    44 
    5 $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     5$conf_UAM = unserialize($conf['UserAdvManager']); 
    66 
    77 
     
    106106/* UserList Tab */ 
    107107$lang['UserList_Title'] = 'Monitoraggio degli utenti registrati'; 
    108 $lang['Tab_UserList'] = 'Monitoraggio degli utenti'; 
    109108$lang['Nb_Days'] = 'Numero di giorni<br>dall\'ultima visita'; 
    110109// --------- End: New or revised $lang ---- from version 2.13.0 
     
    148147$lang['UAM_Confirm_Mail_false'] = ' Disattivare (di default)'; 
    149148$lang['UAM_ConfirmMail_Text'] = ' Personalizzare il testo dell\'Email di conferma:'; 
     149$lang['UAM_Confirm_grpstat_notice'] = 'ATTENZIONE: Si consiglia di utilizzare o il gruppo o lo statuto di convalida ma non entrambi simultaneamente.'; 
    150150$lang['UAM_Confirm_Group'] = 'Gruppi di convalida<br>(------- per non assegnare nessun gruppo)'; 
    151151$lang['UAM_Confirm_Status'] = 'Convalida Statuti<br>(Invia ------- per mantenere il valore di default di Piwigo)'; 
    152 $lang['UAM_Confirm_grpstat_notice'] = 'ATTENZIONE: Si consiglia di utilizzare o il gruppo o lo statuto di convalida ma non entrambi simultaneamente.'; 
    153152$lang['UAM_No_Confirm_Group'] = 'Gruppo per gli utenti che non hanno convalidato la loro iscrizione<br>'; 
    154153$lang['UAM_Validated_Group'] = 'Gruppo per gli utenti che hanno convalidato la loro iscrizione<br>'; 
     
    171170$lang['UAM_LastVisit_true'] = ' Attivare'; 
    172171$lang['UAM_LastVisit_false'] = ' Disattivare (di default)'; 
    173 $lang['UAM_No_Comment_Anonymous'] = 'Commenti : Pesudo obbligatorio per gli ospiti'; 
     172$lang['UAM_No_Comment_Anonymous'] = 'Commenti : Pseudo obbligatorio per gli ospiti'; 
    174173$lang['UAM_No_Comment_Anonymous_true'] = ' Attivare'; 
    175174$lang['UAM_No_Comment_Anonymous_false'] = ' Disattivare (di default)'; 
     
    189188/* UserList Tab */ 
    190189$lang['SubTitle5'] = 'Infos sugli utenti'; 
     190$lang['Tab_UserList'] = 'Monitoraggio degli utenti'; 
    191191/* Mailing */ 
    192192$lang['Add of %s'] = 'Profilo creato per %s'; 
  • extensions/NBC_UserAdvManager/trunk/main.inc.php

    r5105 r5181  
    11<?php 
    22/* 
    3 Plugin Name: NBC UserAdvManager 
    4 Version: 2.14.1 
     3Plugin Name: UserAdvManager 
     4Version: 2.14.2 
    55Description: Renforcer la gestion des utilisateurs - Enforce users management 
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=216 
     
    99*/ 
    1010 
    11 /* History:  NBC_UAM_PATH.'Changelog.txt.php' */ 
     11/* History:  UAM_PATH.'Changelog.txt.php' */ 
    1212 
    1313/* 
     
    3838 
    3939if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    40 if (!defined('NBC_UAM_DIR')) define('NBC_UAM_DIR' , basename(dirname(__FILE__))); 
    41 if (!defined('NBC_UAM_PATH')) define('NBC_UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 
    42  
    43 include_once (NBC_UAM_PATH.'include/constants.php'); 
    44 include_once (NBC_UAM_PATH.'include/functions.inc.php'); 
    45  
    46 load_language('plugin.lang', NBC_UAM_PATH); 
     40if (!defined('UAM_DIR')) define('UAM_DIR' , basename(dirname(__FILE__))); 
     41if (!defined('UAM_PATH')) define('UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 
     42 
     43include_once (UAM_PATH.'include/constants.php'); 
     44include_once (UAM_PATH.'include/functions.inc.php'); 
     45 
     46load_language('plugin.lang', UAM_PATH); 
    4747 
    4848 
     
    5252function UAM_admin_menu($menu) 
    5353{ 
     54// +-----------------------------------------------------------------------+ 
     55// |                      Getting plugin name                              | 
     56// +-----------------------------------------------------------------------+ 
     57  $plugin =  PluginInfos(UAM_PATH); 
     58  $name = $plugin['name']; 
     59   
    5460  array_push($menu, 
    5561    array( 
    56       'NAME' => 'UserAdvManager', 
    57       'URL'  => get_admin_plugin_menu_link(NBC_UAM_PATH.'/admin/UAM_admin.php') 
     62      'NAME' => $name, 
     63      'URL'  => get_admin_plugin_menu_link(UAM_PATH.'/admin/UAM_admin.php') 
    5864    ) 
    5965  ); 
     
    6975  global $conf, $user; 
    7076 
    71   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     77  $conf_UAM = unserialize($conf['UserAdvManager']); 
    7278 
    7379  /* Admins and Guests are not tracked for Ghost Tracker or Users Tracker */ 
     
    120126  global $conf; 
    121127 
    122   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     128  $conf_UAM = unserialize($conf['UserAdvManager']); 
    123129   
    124130  /* Sending registration confirmation by email */ 
     
    244250  $PasswordCheck = 0; 
    245251 
    246   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     252  $conf_UAM = unserialize($conf['UserAdvManager']); 
    247253 
    248254  /* Password enforcement control */ 
     
    301307    global $conf, $user, $template; 
    302308 
    303     $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     309    $conf_UAM = unserialize($conf['UserAdvManager']); 
    304310 
    305311    if (isset($_POST['validate']) and !is_admin()) 
     
    378384function UAM_InitPage() 
    379385{ 
    380   load_language('plugin.lang', NBC_UAM_PATH); 
     386  load_language('plugin.lang', UAM_PATH); 
    381387  global $conf, $template, $page, $lang, $errors; 
    382388 
    383   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     389  $conf_UAM = unserialize($conf['UserAdvManager']); 
    384390 
    385391/* Admin user management */ 
     
    403409function UAM_CheckEmptyCommentAuthor($comment_action, $comm) 
    404410{ 
    405   load_language('plugin.lang', NBC_UAM_PATH); 
     411  load_language('plugin.lang', UAM_PATH); 
    406412  global $infos, $conf, $template; 
    407413 
    408   $conf_UAM = unserialize($conf['nbc_UserAdvManager']); 
     414  $conf_UAM = unserialize($conf['UserAdvManager']); 
    409415 
    410416/* User creation OR update */ 
  • extensions/NBC_UserAdvManager/trunk/maintain.inc.php

    r5086 r5181  
    11<?php 
    22 
    3 if(!defined("NBC_UAM_PATH")) define('NBC_UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 
    4 if (!defined('NBC_UAM_ROOT')) { 
    5   define('NBC_UAM_ROOT',     dirname(__FILE__).'/'); 
    6 } 
    7  
    8 include_once (NBC_UAM_PATH.'include/constants.php'); 
    9 include_once (NBC_UAM_PATH.'include/functions.inc.php'); 
     3if(!defined("UAM_PATH")) define('UAM_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 
     4if (!defined('UAM_ROOT')) { 
     5  define('UAM_ROOT',     dirname(__FILE__).'/'); 
     6} 
     7 
     8include_once (UAM_PATH.'include/constants.php'); 
     9include_once (UAM_PATH.'include/functions.inc.php'); 
    1010 
    1111 
     
    2626  $q = ' 
    2727INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 
    28 VALUES ("nbc_UserAdvManager","'.addslashes(serialize($default1)).'","NBC_UAM parameters") 
     28VALUES ("UserAdvManager","'.addslashes(serialize($default1)).'","UAM parameters") 
    2929  ;'; 
    3030  pwg_query($q); 
     
    3939This is a reminder message because you registered on our gallery but you do not validate your registration and your validation key will expire. To allow you access to our gallery, you have 2 days to confirm your registration by clicking on the link in the message you should have received when you registered. 
    4040 
    41 Note: After this period, your account will be permanently deleted.'); 
     41Note: After this period, your account will be permanently deleted.','Thank you to have confirmed your email address and your registration on the gallery. Have fun !','Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.'); 
    4242 
    4343  $q = ' 
    4444INSERT INTO '.CONFIG_TABLE.' (param, value, comment) 
    45 VALUES ("nbc_UserAdvManager_ConfirmMail","'.addslashes(serialize($default2)).'","NBC_UAM ConfirmMail parameters") 
     45VALUES ("UserAdvManager_ConfirmMail","'.addslashes(serialize($default2)).'","UAM ConfirmMail parameters") 
    4646  ;'; 
    4747  pwg_query($q); 
     
    136136    upgrade_213(); 
    137137  } 
     138 
     139 
     140/* Check for upgrade from 2.14.1 to 2.14.2 */ 
     141/* *************************************** */ 
     142        $query1 = ' 
     143SELECT param 
     144  FROM '.CONFIG_TABLE.' 
     145WHERE param = "nbc_UserAdvManager_ConfirmMail" 
     146;'; 
     147  $count1 = mysql_num_rows(pwg_query($query1)); 
     148   
     149        $query1 = ' 
     150SELECT param 
     151  FROM '.CONFIG_TABLE.' 
     152WHERE param = "nbc_UserAdvManager_ConfirmMail" 
     153;'; 
     154  $count2 = mysql_num_rows(pwg_query($query1));  
     155   
     156        if ($count1 == 1 or $count2 == 1) 
     157        { 
     158  /* upgrade from branch 2.14.1 to 2.14.2 */ 
     159  /* ************************************ */ 
     160                upgrade_214_1(); 
     161        } 
    138162} 
    139163 
     
    143167  global $conf; 
    144168 
    145   if (isset($conf['nbc_UserAdvManager'])) 
     169  if (isset($conf['UserAdvManager'])) 
    146170  { 
    147171    $q = ' 
    148172DELETE FROM '.CONFIG_TABLE.' 
    149 WHERE param="nbc_UserAdvManager" 
     173WHERE param="UserAdvManager" 
    150174;'; 
    151175 
     
    153177  } 
    154178 
    155   if (isset($conf['nbc_UserAdvManager_ConfirmMail'])) 
     179  if (isset($conf['UserAdvManager_ConfirmMail'])) 
    156180  { 
    157181    $q = ' 
    158182DELETE FROM '.CONFIG_TABLE.' 
    159 WHERE param="nbc_UserAdvManager_ConfirmMail" 
     183WHERE param="UserAdvManager_ConfirmMail" 
    160184;'; 
    161185 
     
    303327;'; 
    304328    pwg_query($query); 
    305   } 
     329     
     330    upgrade_214_1(); 
     331  } 
     332} 
     333 
     334function upgrade_214_1() 
     335{ 
     336  global $conf; 
     337 
     338/* Changing parameter name */ 
     339  $q = ' 
     340UPDATE '.CONFIG_TABLE.' 
     341SET param = "UserAdvManager" 
     342WHERE param = "nbc_UserAdvManager" 
     343;'; 
     344  pwg_query($q); 
     345   
     346  $q = ' 
     347UPDATE '.CONFIG_TABLE.' 
     348SET param = "UserAdvManager_ConfirmMail" 
     349WHERE param = "nbc_UserAdvManager_ConfirmMail" 
     350;'; 
     351  pwg_query($q); 
     352 
     353/* Upgrading ConfirmMail options */ 
     354  $conf_UAM2 = explode(';', $conf['UserAdvManager_ConfirmMail']); 
     355 
     356  $upgrade_UAM2 = array($conf_UAM2[0],$conf_UAM2[1],$conf_UAM2[2],$conf_UAM2[3],$conf_UAM2[4],'Thank you to have confirmed your email address and your registration on the gallery. Have fun !','Your activation key is incorrect or expired or you have already validated your account, please contact the webmaster to fix this problem.'); 
     357 
     358  $query = ' 
     359UPDATE '.CONFIG_TABLE.' 
     360  SET value = "'.addslashes(serialize($upgrade_UAM2)).'" 
     361  WHERE param = "UserAdvManager_ConfirmMail" 
     362;'; 
     363  pwg_query($query); 
    306364} 
    307365?> 
Note: See TracChangeset for help on using the changeset viewer.