Ignore:
Timestamp:
Mar 18, 2010, 11:08:28 PM (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/admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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">
Note: See TracChangeset for help on using the changeset viewer.