Changeset 5058


Ignore:
Timestamp:
Mar 5, 2010, 3:10:29 PM (11 years ago)
Author:
LucMorizur
Message:

[Event Cats] Add "Event Cats" fieldset in admin category modification page ;
modify header information about developpement period of all files

Location:
extensions/event_cats
Files:
1 added
16 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/template/autolog_entries.js

    r4421 r5058  
    1 /* Event Cats Javascript functions LucMorizur June - ... 2009 */
     1/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    33// Keeps file coded in UTF-8 without BOM : é
  • extensions/event_cats/admin/template/autolog_entries.tpl

    r4470 r5058  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
     1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    33{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
  • extensions/event_cats/admin/template/autolog_new.js

    r4472 r5058  
    1 /* Event Cats Javascript functions LucMorizur June - ... 2009 */
     1/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    33// Keeps file coded in UTF-8 without BOM : é
  • extensions/event_cats/admin/template/autolog_new.tpl

    r4486 r5058  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
     1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    33{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
  • extensions/event_cats/admin/template/config.js

    r4421 r5058  
    1 /* Event Cats Javascript functions LucMorizur June - ... 2009 */
     1/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    33// Keeps file coded in UTF-8 without BOM : é
  • extensions/event_cats/admin/template/config.tpl

    r4554 r5058  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
     1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    33{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
  • extensions/event_cats/admin/template/duplication.tpl

    r4443 r5058  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
     1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    33{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
  • extensions/event_cats/admin/template/footer.inc.tpl

    r4470 r5058  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
     1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    33{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
  • extensions/event_cats/admin/template/header.inc.tpl

    r4470 r5058  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
     1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    33{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
  • extensions/event_cats/admin/template/header.js

    r4470 r5058  
    1 /* Event Cats Javascript functions LucMorizur June - ... 2009 */
     1/* Event Cats Javascript functions LucMorizur June 2009 - ... */
    22
    33// Keeps file coded in UTF-8 without BOM : é
  • extensions/event_cats/ec_no_quick_connect.tpl

    r4553 r5058  
    1 {* <!-- Event Cats (event categories) LucMorizur June - ... 2009 --> *}
     1{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
    22
    33{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
  • extensions/event_cats/language/en_UK/duplic.lang.php

    r4472 r5058  
    44For plugin Event Cats, translation of "duplication" link
    55English
    6 LucMorizur June - ... 2009
     6LucMorizur June 2009 - ...
    77*/
    88
  • extensions/event_cats/language/en_UK/plugin.lang.php

    r4613 r5058  
    44Language module for plugin Even Cats
    55English
    6 LucMorizur June - ... 2009
     6LucMorizur June 2009 - ...
    77*/
    88
  • extensions/event_cats/language/fr_FR/duplic.lang.php

    r4421 r5058  
    44For plugin Event Cats, translation of "duplication" link
    55French (Français)
    6 LucMorizur June - ... 2009
     6LucMorizur June 2009 - ...
    77*/
    88
  • extensions/event_cats/language/fr_FR/plugin.lang.php

    r4554 r5058  
    44Language module for plugin Even Cats
    55French (Français)
    6 LucMorizur June - ... 2009
     6LucMorizur June 2009 - ...
    77*/
    88
  • extensions/event_cats/main.inc.php

    r4885 r5058  
    4040//ini_set('display_errors', true);
    4141
    42 global $conf, $prefixeTable, $ec_lists;
     42global $conf, $prefixeTable, $ec_lists, $template;
    4343
    4444define( // -------------------------------------------------------------------
     
    7373include_once(EVNTCATS_PATH.'include/evntcats_main_funcs.inc.php');
    7474
     75function ec_cat_modify_prefilter($content, &$smarty) {
     76  $search = '<fieldset id="image_order">';
     77  // $addon = '<fieldset id="event_cats_inc"><legend>YESSSSSSSSSSSSSS !!!</legend></fieldset>';
     78  $addon = "{include file='../../../plugins/event_cats/admin/template/ec_cat_modify.inc.tpl'} ";
     79  $replacement = $addon.$search;
     80  return str_replace($search, $replacement, $content);
     81  // return $content;
     82}
     83
    7584class event_cats {
    7685// Sets the administration panel of the plugin
    7786  function plugin_admin_menu($menu) {
     87    global $template;
     88   
    7889    array_push($menu,
    7990      array(
     
    8394      )
    8495    );
     96   
     97                                                                               // to be removed :
     98                                                                                  $template->delete_compiled_templates();
     99    $template->set_prefilter('categories', 'ec_cat_modify_prefilter');
     100   
    85101    return $menu;
    86102  }
     103 
     104  function ec_cat_modify() {
     105    global $template;
     106    $template->set_prefilter('categories', 'ec_cat_modify_prefilter');
     107  }
     108 
    87109} // End class
    88110
     
    127149    if (!is_a_guest()) {
    128150      $url = '';
    129       foreach ($_GET as $item => $value) {
    130         $url.= '&'.$item.'='.$value;
    131       }
     151      foreach ($_GET as $item => $value) $url.= '&'.$item.'='.$value;
    132152      logout_user();
    133153      redirect(make_index_url().$url);
     
    293313function duplicate_account_url() {
    294314  global $lang, $template, $user;
     315   
     316    // Makes the "quick connect" fieldset able to redirect to current page
     317    // after user identification, just as does above "connection" link.
     318    $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI']));
     319    $template->set_prefilter('menubar', 'ec_duplicate_prefilter');
    295320 
    296321  // Adds duplication link, if needed
     
    321346      get_root_url().'identification.php?redirect='.$_SERVER['REQUEST_URI']
    322347    );
    323     // Removes "quick connection" fieldset (form)
    324     $template->set_filenames(array(
    325       'ec_no_quick_connect' =>
    326       realpath(EVNTCATS_PATH.'ec_no_quick_connect.tpl')
    327     ));
    328     $begin = 'PLUGIN_INDEX_CONTENT_BEFORE';
    329     $old_begin = $template->get_template_vars($begin);
    330     $template->assign_var_from_handle($begin, 'ec_no_quick_connect');
    331     $template->concat($begin, $old_begin);
    332   }
    333 }
     348  }
     349}
     350
     351function ec_duplicate_prefilter($content, &$smarty) {
     352  $search = "<legend>{'Quick connect'|@translate}</legend>";
     353  $addon = '<input type="hidden" name="redirect" value="{$U_REDIRECT}">';
     354  $replacement = "<legend>{'Quick connect'|@translate}</legend>".$addon;
     355  return str_replace($search, $replacement, $content);
     356}
     357
     358// add_event_handler('get_admin_plugin_menu_links','ec_cat_modify');
    334359
    335360add_event_handler(
Note: See TracChangeset for help on using the changeset viewer.