Changeset 4233 for extensions/event_cats


Ignore:
Timestamp:
Nov 9, 2009, 12:22:37 AM (15 years ago)
Author:
LucMorizur
Message:

[Event Cats] Duplication management

Location:
extensions/event_cats
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/duplication.inc.php

    r4228 r4233  
    11<?php
    22
     3$t = read_ec_conf('reg_display');
     4if ($t == '0') $reg_display = array('0', '');
     5else $reg_display = explode(';', $t);
    36
    4 
     7$template->assign('reg_display', $reg_display);
    58$template->assign('ec_conf', $ec_conf);
    69
  • extensions/event_cats/admin/template/duplication.tpl

    r4228 r4233  
    1010  <fieldset>
    1111    <legend>{'ec_duplication_config'|@translate}</legend>
    12     <ul>
    13       <li>
    14         <label for = "ec_config_item_{$ec_key}">
    15           {$ec_key} : {$ec_item}
    16         </label><br>
    17       </li>
    18     </ul>
     12    <table>
     13      <tr>
     14        <td>
     15          <span style = "font-weight:bold;">{'ec_duplication_allowance'|@translate}</span>
     16        </td>
     17        <td>
     18          <label for = "ec_dup_conf_none_id">
     19            <input type = "radio" name = "ec_dup_conf" id = "ec_dup_conf_none_id" />
     20            {'ec_dup_allowance_none'|@translate}
     21          </label><br>
     22          <label for = "ec_dup_conf_group_id">
     23            <input type = "radio" name = "ec_dup_conf" id = "ec_dup_conf_group_id" />
     24            {'ec_dup_allowance_group'|@translate}
     25          </label><br>
     26          <label for = "ec_dup_conf_all_id">
     27            <input type = "radio" name = "ec_dup_conf" id = "ec_dup_conf_all_id" />
     28            {'ec_dup_allowance_all'|@translate}
     29          </label><br>
     30        </td>
     31        <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>
     32        <td>
     33          <span style = "font-weight:bold;">{'ec_duplication_display'|@translate}</span>
     34        </td>
     35        <td>
     36          <label for = "ec_dup_disp_normal_id">
     37            <input type = "radio" name = "ec_dup_disp" id = "ec_dup_disp_normal_id" />
     38            {'ec_dup_display_normal'|@translate}{if $reg_display.0 != '0'} ("{$reg_display.1}"){/if}
     39          </label><br>
     40          <label for = "ec_dup_disp_dup_id">
     41            <input type = "radio" name = "ec_dup_disp" id = "ec_dup_disp_dup_id" />
     42            {'ec_dup_display_dup'|@translate} ("{'ec_duplication'|@translate}")
     43          </label><br>
     44        </td>
     45      </tr>
     46    </table>
    1947    <input class = "submit" type = "submit" name = "ec_duplic_conf_submit" value = "{'ec_dup_conf_submit_lbl'|@translate}" />
    2048  </fieldset>
  • extensions/event_cats/include/ec_conf.inc.php

    r4173 r4233  
    3333 _ the number of digits when creating a new code automatically
    3434   ($ec_conf[2] <=> read_ec_conf('auto_code_dg_nb')) ;
    35  _ -----------------------------------------------------------
    36    --------------------------------------- ( $ec_conf[3] <=>
    37    read_ec_conf('') ) ;
     35 _ the way the "register" link is displayed, together with the original $lang
     36   value for this label ( $ec_conf[3] <=> read_ec_conf('') ) ;
    3837 _ whether the "how to" banner has already been displayed or not
    3938   ($ec_conf[4] <=> read_ec_conf('howto')) ;
     
    8382    case 'auto_code_dg_nb':
    8483      $ec_conf[2] = $v;
    85     break;                  /*
    86     case 'cat_display':
     84    break;
     85    case 'reg_display':
    8786      $ec_conf[3] = $v;
    88     break;                  */
     87    break;
    8988    case 'howto':
    9089      $ec_conf[4] = $v;
     
    102101  return (pwg_query("
    103102   UPDATE `".CONFIG_TABLE."`
    104    SET `value` = '".implode(',', $ec_conf)."'
     103   SET `value` = \"".implode(',', $ec_conf)."\"
    105104   WHERE `param` = 'event_cats';
    106105  ") !== false);
     
    121120    case 'activated'         : return $ec_conf[0];
    122121    case 'dup_allow'         : return $ec_conf[1];
    123     case 'auto_code_dg_nb'   : return $ec_conf[2]; /*
    124     case 'cat_display'       : return $ec_conf[3]; */
     122    case 'auto_code_dg_nb'   : return $ec_conf[2];
     123    case 'reg_display'       : return $ec_conf[3];
    125124    case 'howto'             : return $ec_conf[4];
    126125    case 'unknown_code'      : return $ec_conf[5];
  • extensions/event_cats/language/fr_FR/plugin.lang.php

    r4228 r4233  
    7373$lang['ec_up_code_lbl_refused']   = 'Accès refusé';
    7474// Duplication
     75$lang['ec_duplication']           = 'Dupliquer';
    7576$lang['ec_duplication_config']    = 'Configuration';
    76 $lang['ec_dup_conf_submit_lbl']   = 'Configuration';
     77$lang['ec_duplication_allowance'] = 'Autorisation de la duplication :';
     78$lang['ec_dup_allowance_none']    = 'Aucun compte';
     79$lang['ec_dup_allowance_group']   = 'Sélection par groupe';
     80$lang['ec_dup_allowance_all']     = 'Tous les comptes';
     81$lang['ec_duplication_display']   = 'Affichage du lien de duplication :';
     82$lang['ec_dup_display_normal']    = 'Normal';
     83$lang['ec_dup_display_dup']       = 'Modifié';
     84$lang['ec_dup_conf_submit_lbl']   = 'Sauvegarder la configuration de la duplication';
    7785// JS checks
    7886$lang['ec_confirm_test']          = "Vraiment tester le code sélectionné ?\n\rCela terminera votre session d'administration.";
  • extensions/event_cats/main.inc.php

    r4169 r4233  
    263263function duplicate_account_url() {
    264264  global $lang, $template;
    265 
     265 
     266  if (is_admin() and read_ec_conf('reg_display') == '0')
     267   change_ec_conf('reg_display', '1;'.$lang['Register']);
    266268  if (!is_admin() and !is_a_guest()) {
    267269    $template->assign( 'U_REGISTER', get_root_url().'register.php');
Note: See TracChangeset for help on using the changeset viewer.