Ignore:
Timestamp:
Aug 28, 2010, 10:20:24 PM (14 years ago)
Author:
Eric
Message:

bug 1434 fixed : Bridge between Register_FluxBB and UAM for users registration control

  • Language files updated (FR and EN are OK. DE is to do)
  • Admin page small refactory
  • Database upgrade process updated for new plugin version
  • Version 2.3.0 hard coded
Location:
extensions/Register_FluxBB/trunk/admin
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/Register_FluxBB/trunk/admin/admin.php

    r5635 r6815  
    572572        case 'manage':
    573573 
    574   if ( isset($_POST['submit']) and !is_adviser() and isset($_POST['FluxBB_prefix']) and isset($_POST['FluxBB_admin']) and isset($_POST['FluxBB_guest']) and isset($_POST['FluxBB_del_pt']) and isset($_POST['FluxBB_confirm']) and isset($_POST['FluxBB_details']) )
    575   {
    576     $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'];
     574  if (isset($_POST['submit']) and !is_adviser() and isset($_POST['FluxBB_prefix']) and isset($_POST['FluxBB_admin']) and isset($_POST['FluxBB_guest']) and isset($_POST['FluxBB_del_pt']) and isset($_POST['FluxBB_confirm']) and isset($_POST['FluxBB_details']))
     575  {
     576    $conf['Register_FluxBB'] = $_POST['FluxBB_prefix'].';'.addslashes($_POST['FluxBB_admin']).';'.addslashes($_POST['FluxBB_guest']).';'.$_POST['FluxBB_del_pt'].';'.$_POST['FluxBB_confirm'].';'.$_POST['FluxBB_details'].';'.$_POST['FluxBB_UAM'].';'.$_POST['FluxBB_group'];
    577577
    578578    $query = '
     
    598598      'FluxBB_ADMIN'         => stripslashes($conf_Register_FluxBB[1]),
    599599      'FluxBB_GUEST'         => stripslashes($conf_Register_FluxBB[2]),
    600       'FluxBB_DEL_PT_TRUE'   => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'true') ? 'checked="checked"' : '' ,
    601       'FluxBB_DEL_PT_FALSE'  => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'false') ? 'checked="checked"' : '' ,
    602       'FluxBB_CONFIRM_TRUE'  => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'true') ? 'checked="checked"' : '' ,
    603       'FluxBB_CONFIRM_FALSE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'false') ? 'checked="checked"' : '' ,
    604       'FluxBB_DETAILS_TRUE'  => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'true') ? 'checked="checked"' : '' ,
    605       'FluxBB_DETAILS_FALSE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'false') ? 'checked="checked"' : '' ,
     600      'FluxBB_DEL_PT_TRUE'   => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'true') ? 'checked="checked"' : '',
     601      'FluxBB_DEL_PT_FALSE'  => (isset($conf_Register_FluxBB[3]) and $conf_Register_FluxBB[3] == 'false') ? 'checked="checked"' : '',
     602      'FluxBB_CONFIRM_TRUE'  => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'true') ? 'checked="checked"' : '',
     603      'FluxBB_CONFIRM_FALSE' => (isset($conf_Register_FluxBB[4]) and $conf_Register_FluxBB[4] == 'false') ? 'checked="checked"' : '',
     604      'FluxBB_DETAILS_TRUE'  => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'true') ? 'checked="checked"' : '',
     605      'FluxBB_DETAILS_FALSE' => (isset($conf_Register_FluxBB[5]) and $conf_Register_FluxBB[5] == 'false') ? 'checked="checked"' : '',
     606    )
     607  );
     608
     609// If UAM exists and if UAM ConfirmMail is set, we can set this feature
     610  if (function_exists('FindAvailableConfirmMailID'))
     611  { 
     612    $conf_UAM = unserialize($conf['UserAdvManager']);
     613    $UAM_bridge = false;
     614   
     615    if (isset($conf_UAM[1]) and ($conf_UAM[1] == 'true' or $conf_UAM[1] == 'local') and isset($conf_UAM[2]) and $conf_UAM[2] != '-1')
     616    {
     617      $UAM_bridge = true;
     618    }
     619  }
     620 
     621  $template->assign(
     622    array
     623    (
     624      'UAM_BRIDGE'            => $UAM_bridge,
     625      'FluxBB_UAM_LINK_TRUE'  => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'true') ? 'checked="checked"' : '',
     626      'FluxBB_UAM_LINK_FALSE' => (isset($conf_Register_FluxBB[6]) and $conf_Register_FluxBB[6] == 'false') ? 'checked="checked"' : '',
     627      'FluxBB_GROUP'          => $conf_Register_FluxBB[7],
    606628    )
    607629  );
  • extensions/Register_FluxBB/trunk/admin/template/manage.tpl

    r5606 r6815  
    11{html_head}<link rel="stylesheet" type="text/css" href="{$REGFLUXBB_PATH}admin/template/register_fluxbb.css">{/html_head}
     2
     3<script type="text/javascript">
     4function blockToggleDisplay(headerId, contentId)
     5{ldelim}
     6  var revHeader = document.getElementById(headerId);
     7  var revContent = document.getElementById(contentId);
     8
     9  if (revContent.style.display == 'none')
     10  {ldelim}
     11    revContent.style.display = 'block';
     12    revHeader.className = 'instructionBlockHeaderExpanded';
     13  {rdelim}
     14  else
     15  {ldelim}
     16    revContent.style.display = 'none';
     17    revHeader.className = 'instructionBlockHeaderCollapsed';
     18  {rdelim}
     19{rdelim}
     20
     21function rfbb_blockToggleDisplay( headerId, contentId )
     22{ldelim}
     23  if (typeof(headerId)=='string')
     24  {ldelim}
     25   if ( headerId.length>  1)
     26       blockToggleDisplay(headerId, contentId) ;
     27      document.getElementById("nb_para").value =headerId ;
     28      document.getElementById("nb_para2").value =contentId;
     29  {rdelim}
     30{rdelim}
     31</script>
    232
    333<div class="titrePage">
     
    838  <fieldset>
    939        <legend>{'Config_Title'|@translate}</legend>
    10     <div align="left">{'Config_Disclaimer'|@translate}</div>
     40    {'Config_Disclaimer'|@translate}
     41    <br><br>
    1142    <ul>
    1243        <li><label>{'Prefix'|@translate}</label><br>
    13                 <input type="text" name="FluxBB_prefix" size="20" style="text-align: center;" value={$FluxBB_PREFIX}><br>
     44                <input type="text" name="FluxBB_prefix" value={$FluxBB_PREFIX} size="20" style="text-align: center;"><br>
     45      <br>
    1446        </li>
    15       <br>
    1647        <li><label>{'Admin'|@translate}</label><br>
    1748                <input type="text" name="FluxBB_admin" value={$FluxBB_ADMIN} size="20" style="text-align: center;"><br>
    1849                {'User'|@translate}
     50      <br>
    1951        </li>
    20       <br>
    2152        <li><label>{'Guest'|@translate}</label><br>
    2253                <input type="text" name="FluxBB_guest" value={$FluxBB_GUEST} size="20" style="text-align: center;"><br>
     54      <br>
    2355        </li>
    24       <br>
    2556        <li><label>{'Del_Pt'|@translate}</label><br>
    2657        <input type="radio" value="true" {$FluxBB_DEL_PT_TRUE} name="FluxBB_del_pt">{'Del_Pt_true'|@translate}<br>
    2758        <input type="radio" value="false" {$FluxBB_DEL_PT_FALSE} name="FluxBB_del_pt">{'Del_Pt_false'|@translate}<br>
     59      <br>
    2860        </li>
    29       <br>
    3061        <li><label>{'Confirm'|@translate}</label><br>
    3162        <input type="radio" value="true" {$FluxBB_CONFIRM_TRUE} name="FluxBB_confirm">{'Confirm_true'|@translate}<br>
    3263        <input type="radio" value="false" {$FluxBB_CONFIRM_FALSE} name="FluxBB_confirm">{'Confirm_false'|@translate}<br>
     64      <br>
    3365        </li>
    34       <br>
    3566        <li><label>{'Details'|@translate}</label><br>
    3667        <input type="radio" value="true" {$FluxBB_DETAILS_TRUE} name="FluxBB_details">{'Details_true'|@translate}<br>
    3768        <input type="radio" value="false" {$FluxBB_DETAILS_FALSE} name="FluxBB_details">{'Details_false'|@translate}<br>
     69      <br>
    3870        </li>
     71      {if $UAM_BRIDGE}
     72        <li><label>{'Bridge_UAM'|@translate}</label><br>
     73        <input type="radio" value="true" {$FluxBB_UAM_LINK_TRUE} name="FluxBB_UAM">{'Bridge_UAM_true'|@translate}<br>
     74        <input type="radio" value="false" {$FluxBB_UAM_LINK_FALSE} name="FluxBB_UAM">{'Bridge_UAM_false'|@translate}<br>
     75      <br>
     76      </li>
     77        <li><label>{'FluxBB_Group'|@translate}</label><br>
     78                <input type="text" name="FluxBB_group" value={$FluxBB_GROUP} size="6" style="text-align: center;"><br>
     79        </li>
     80      {/if}
    3981    </ul>
    40     <br>
    41         {'No_Reg_advise'|@translate}
    4282    <br>
    4383        <div align="center"><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}></div>
    4484  </fieldset>
     85
     86  <div id="instructionConfig1" class="instructionBlock" >
     87    <div id="config1_header" class="instructionBlockHeaderCollapsed" onclick="rfbb_blockToggleDisplay('config1_header', 'Config1')">
     88        {'About_Reg'|@translate}
     89      </span>
     90    </div>
     91 
     92    <div id="Config1" class="instructionBlockContent" style="display:none">
     93      {'No_Reg_advise'|@translate}
     94    </div>
     95  </div>
     96  <div id="instructionConfig2" class="instructionBlock" >
     97    <div id="config2_header" class="instructionBlockHeaderCollapsed" onclick="rfbb_blockToggleDisplay('config2_header', 'Config2')">
     98        {'About_Bridge'|@translate}
     99      </span>
     100    </div>
     101 
     102    <div id="Config2" class="instructionBlockContent" style="display:none">
     103      {'UAM_Bridge_advice'|@translate}
     104    </div>
     105  </div>
    45106</form>
  • extensions/Register_FluxBB/trunk/admin/template/register_fluxbb.css

    r6294 r6815  
    4747  background-color: #ffd5dc;
    4848}
     49
     50/* Bloc expand-collapse instructions */
     51.instructionBlockHeaderCollapsed, .instructionBlockHeaderExpanded
     52{
     53  background-color:#111;
     54  background-position:15px center;
     55  background-repeat:no-repeat;
     56  color:#ff3363;
     57  cursor:pointer;
     58  font-size:110%;
     59  overflow:hidden;
     60  padding:8px 41px;
     61  text-align: left;
     62}
     63
     64.instructionBlockHeaderCollapsed span, .instructionBlockHeaderExpanded span
     65{
     66  border-bottom: none;
     67}
     68 
     69.instructionBlockHeaderCollapsed
     70{
     71  background-image: url(./icon/expand.gif);
     72}
     73
     74.instructionBlockHeaderExpanded
     75{
     76  background-image: url(./icon/collapse.gif);
     77}
     78
     79.instructionBlockContent
     80{
     81  padding:0 15px 15px;
     82}
Note: See TracChangeset for help on using the changeset viewer.