Ignore:
Timestamp:
Sep 19, 2011, 9:48:39 PM (13 years ago)
Author:
Eric
Message:
  • Bug 2415 fixed - New feature added : Privacy level can now be set for unvalidated / validated users.
  • Small admin panel refactory : Ghost users management and other misc options are splitted.
  • Plugin database upgrade : maintain.inc.php and upgradedb.inc.php
  • Language files refactory (EN and FR)
  • Preparing version 2.30.0 (actually 2.30.0RC1) for compliance with Piwigo 2.3.0
Location:
extensions/UserAdvManager/trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/UserAdvManager/trunk/admin/UAM_admin.php

    r11318 r12189  
    190190      $_POST['UAM_Stuffs'],
    191191      $_POST['UAM_HidePassw'],
     192      (isset($_POST['UAM_No_Valid_Level'])?$_POST['UAM_No_Valid_Level']:''),
     193      (isset($_POST['UAM_Valid_Level'])?$_POST['UAM_Valid_Level']:''),
     194      (isset($_POST['UAM_Downgrade_Level'])?$_POST['UAM_Downgrade_Level']:''),
    192195      );
    193196
     
    382385            );
    383386        }
     387
     388
     389  //Level setting for unvalidated, validated users and downgrade status
     390  $level_options[-1] = '------------';
     391  $No_Valid_Level = -1;
     392  $Valid_Level = -1;
     393  $Downgrade_Level = -1;
     394
     395  // Get unvalidated privacy levels values
     396  foreach ($conf['available_permission_levels'] as $level)
     397  {
     398    $level_options[$level] = l10n(sprintf('Level %d', $level));
     399          if (isset($conf_UAM[35]) and $conf_UAM[35] == $level)
     400          {
     401            $No_Valid_Level = $level;
     402          }
     403      //Template initialization for unvalidated users level
     404      $template->assign(
     405        'No_Valid_Level',
     406        array(
     407                                        'Level_options' => $level_options,
     408                                'Level_selected' => $No_Valid_Level
     409                                        )
     410                        );
     411  }
     412
     413  // Get validated privacy levels values
     414  foreach ($conf['available_permission_levels'] as $level)
     415  {
     416    $level_options[$level] = l10n(sprintf('Level %d', $level));
     417          if (isset($conf_UAM[36]) and $conf_UAM[36] == $level)
     418          {
     419            $Valid_Level = $level;
     420          }
     421      //Template initialization for unvalidated users level
     422      $template->assign(
     423        'Valid_Level',
     424        array(
     425                                        'Level_options' => $level_options,
     426                                'Level_selected' => $Valid_Level
     427                                        )
     428                        );
     429  }
     430
     431  // Get downgrade privacy levels values
     432  foreach ($conf['available_permission_levels'] as $level)
     433  {
     434    $level_options[$level] = l10n(sprintf('Level %d', $level));
     435          if (isset($conf_UAM[37]) and $conf_UAM[37] == $level)
     436          {
     437            $Downgrade_Level = $level;
     438          }
     439      //Template initialization for unvalidated users level
     440      $template->assign(
     441        'Downgrade_Level',
     442        array(
     443                                        'Level_options' => $level_options,
     444                                'Level_selected' => $Downgrade_Level
     445                                        )
     446                        );
     447  }
    384448
    385449  //Save last opened paragraph in configuration tab
     
    455519    'UAM_HIDEPASSW_TRUE'             => $conf_UAM[34]=='true' ?  'checked="checked"' : '' ,
    456520    'UAM_HIDEPASSW_FALSE'            => $conf_UAM[34]=='false' ?  'checked="checked"' : '' ,
     521                'UAM_NO_VALID_LEVEL'             => $conf_UAM[35],
     522                'UAM_VALID_LEVEL'                => $conf_UAM[36],
     523    'UAM_DOWNGRADE_LEVEL'            => $conf_UAM[37],
    457524                'UAM_PASSWORD_TEST_SCORE'        => $UAM_Password_Test_Score,
    458525    'UAM_ERROR_REPORTS1'             => $UAM_Exclusionlist_Error,
  • extensions/UserAdvManager/trunk/admin/template/global.tpl

    r11318 r12189  
    389389                  <div id="uam_leftmargin">
    390390                    {html_options name="UAM_Validated_Status" options=$Confirm_Status.Status_options selected=$Confirm_Status.Status_selected}
     391                  </div>
     392                <br><br>
     393                </li>
     394              </ul>
     395
     396              <li>
     397                <label class="cluetip" title="{'UAM_confirmlevelTitle'|translate}|{'UAM_confirmlevelTitle_d'|translate}">
     398                  {'UAM_Confirm_Level'|@translate}
     399                </label>
     400              <br><br>
     401              </li>
     402             
     403              <ul>
     404                <li>
     405                  <label>
     406                    {'UAM_No_Valid_Level'|@translate}
     407                  </label>
     408                <br>
     409                  <div id="uam_leftmargin">
     410                    {html_options name="UAM_No_Valid_Level" options=$No_Valid_Level.Level_options selected=$No_Valid_Level.Level_selected}
     411                  </div>
     412                <br><br>
     413                </li>
     414
     415                <li>
     416                  <label>
     417                    {'UAM_Valid_Level'|@translate}
     418                  </label>
     419                <br>
     420                  <div id="uam_leftmargin">
     421                    {html_options name="UAM_Valid_Level" options=$Valid_Level.Level_options selected=$Valid_Level.Level_selected}
    391422                  </div>
    392423                <br><br>
     
    536567
    537568    <div id="config3_header" class="instructionBlockHeaderCollapsed" onclick="uam_blockToggleDisplay('config3_header', 'Config3')">
    538       <span class="cluetip" title="{'UAM_miscTitle'|translate}|{'UAM_miscTitle_d'|translate}">{'UAM_Title3'|@translate}</span>
     569      <span class="cluetip" title="{'UAM_GT_MainTitle'|translate}|{'UAM_GT_MainTitle_d'|translate}">{'UAM_Title3'|@translate}</span>
    539570    </div>
    540571 
     
    630661                        <div id="uam_leftmargin">
    631662                          {html_options name="UAM_Downgrade_Status" options=$Downgrade_Status.Status_options selected=$Downgrade_Status.Status_selected}
     663                        </div>
     664                      <br><br>
     665                      </li>
     666
     667                      <li>
     668                        <label>
     669                          {'UAM_Expired_Level'|@translate}
     670                        </label>
     671                      <br>
     672                        <div id="uam_leftmargin">
     673                          {html_options name="UAM_Downgrade_Level" options=$Downgrade_Level.Level_options selected=$Downgrade_Level.Level_selected}
    632674                        </div>
    633675                      <br><br>
     
    660702        </ul>
    661703      </fieldset>
    662 
     704    </div>
     705  </div>
     706
     707  <div id="instructionConfig5" class="instructionBlock" >
     708
     709    <div id="config5_header" class="instructionBlockHeaderCollapsed" onclick="uam_blockToggleDisplay('config5_header', 'Config5')">
     710      <span class="cluetip" title="{'UAM_miscTitle'|translate}|{'UAM_miscTitle_d'|translate}">{'UAM_Title5'|@translate}</span>
     711    </div>
     712 
     713    <div id="Config5" class="instructionBlockContent" style="display:none">
    663714      <fieldset>
     715        <ul>
     716          <li>
     717            <label><b>{'UAM_MiscOptions'|@translate}</b></label>
     718          </li>
     719        </ul>
    664720        <fieldset>
    665721          <ul>
Note: See TracChangeset for help on using the changeset viewer.