Index: /extensions/event_cats/CHANGELOG.txt
===================================================================
--- /extensions/event_cats/CHANGELOG.txt	(revision 6269)
+++ /extensions/event_cats/CHANGELOG.txt	(revision 6269)
@@ -0,0 +1,33 @@
+2010-01-04 1.2.2
+                  Compatibility with Piwigo 2.1
+
+2010-01-04 1.2.1
+                  Improve EN translation thanks to Tosca
+
+2010-01-03 1.2.0
+                  Add feature 1335, Possibility to display the 'Connection'
+                  link in identification block menu for generic users
+                  finish (yes !) english translation
+
+2009-12-13 1.1.5
+                  Fix bugs 1324 and 1325
+
+2009-12-10 1.1.4
+                  Improve help banner
+
+2009-12-07 1.1.3
+                  Better help banner management ; finalize banner texts
+
+2009-12-07 1.1.2
+                  Better help banner example : some examples
+
+2009-12-07 1.1.1
+                  Better help banner example ; but still no text in it
+
+2009-12-07 1.1.0
+                  First bugs (1305 and 1306) corrected
+                  add newly created user/group association with cat/AP (was forgotten)
+                  begin help banner
+
+2009-12-03 1.0.0
+                  Conception version
Index: /extensions/event_cats/admin/evntcats_admin.php
===================================================================
--- /extensions/event_cats/admin/evntcats_admin.php	(revision 6268)
+++ /extensions/event_cats/admin/evntcats_admin.php	(revision 6269)
@@ -380,16 +380,31 @@
 print '<pre>';
 //print_r('ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH);
-print('ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH);
+print('ROOT_URL + ... : '.preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches));
+print('<br />');
+print_r($matches);
 print '</pre>';
 */
 
-$template->assign('ec_howto',
- ($ec_howto and (count($page['errors']) ==0 and count($page['infos']) == 0)));
-
-$template->assign('ec_help_banner_OK', (read_ec_conf('in_help_display') == '1'));
+$template->assign(
+ 'HeaderIncTPL', realpath('plugins/event_cats/admin/template/header.inc.tpl')
+);
+
+$template->assign(
+ 'FooterIncTPL', realpath('plugins/event_cats/admin/template/footer.inc.tpl')
+);
+
+$template->assign(
+ 'ec_howto',
+ ($ec_howto and (count($page['errors']) == 0 and count($page['infos']) == 0))
+);
+
+$template->assign(
+ 'ec_help_banner_OK',
+ (read_ec_conf('in_help_display') == '1')
+);
 
 $template->assign('EVNTCATS_PATH', EVNTCATS_PATH);
 $template->assign('RACINE_URL', ROOT_URL);
-$template->assign('U_HELP', get_root_url().'popuphelp.php?page=ec_help');
+$template->assign('U_HELP', get_root_url().'popuphelp.php?page=help');
 
 if (isset($conf['ec_debug1'])) $template->assign('ec_debug1', array(
Index: /extensions/event_cats/admin/template/autolog_entries.tpl
===================================================================
--- /extensions/event_cats/admin/template/autolog_entries.tpl	(revision 6268)
+++ /extensions/event_cats/admin/template/autolog_entries.tpl	(revision 6269)
@@ -3,5 +3,5 @@
 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
 
-{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'}
+{include file=$HeaderIncTPL}
 
 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *}
@@ -32,4 +32,6 @@
   {/if}
 </div><span id = "ec_help_ban"></span>
+
+<br />
 
 {* <!-- Form to view codes --> *}
@@ -158,3 +160,3 @@
 </script>
 
-{include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'}
+{include file=$FooterIncTPL}
Index: /extensions/event_cats/admin/template/autolog_new.tpl
===================================================================
--- /extensions/event_cats/admin/template/autolog_new.tpl	(revision 6268)
+++ /extensions/event_cats/admin/template/autolog_new.tpl	(revision 6269)
@@ -3,5 +3,5 @@
 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
 
-{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'}
+{include file=$HeaderIncTPL}
 
 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *}
@@ -338,3 +338,3 @@
 //--></script>
 
-{include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'}
+{include file=$FooterIncTPL}
Index: /extensions/event_cats/admin/template/config.tpl
===================================================================
--- /extensions/event_cats/admin/template/config.tpl	(revision 6268)
+++ /extensions/event_cats/admin/template/config.tpl	(revision 6269)
@@ -3,5 +3,5 @@
 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
 
-{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'}
+{include file=$HeaderIncTPL}
 
 {* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *}
@@ -208,3 +208,3 @@
 //--></script>
 
-{include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'}
+{include file=$FooterIncTPL}
Index: /extensions/event_cats/admin/template/duplication.tpl
===================================================================
--- /extensions/event_cats/admin/template/duplication.tpl	(revision 6268)
+++ /extensions/event_cats/admin/template/duplication.tpl	(revision 6269)
@@ -3,5 +3,5 @@
 {* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
 
-{include file='../../../plugins/event_cats/admin/template/header.inc.tpl'}
+{include file=$HeaderIncTPL}
 
 {* <!-- For help banner --> *}
@@ -182,4 +182,4 @@
 </form>
 
-{include file='../../../plugins/event_cats/admin/template/footer.inc.tpl'}
+{include file=$FooterIncTPL}
 
Index: tensions/event_cats/admin/template/ec_cat_modify.inc.tpl
===================================================================
--- /extensions/event_cats/admin/template/ec_cat_modify.inc.tpl	(revision 6268)
+++ 	(revision )
@@ -1,11 +1,0 @@
-{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
-
-{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
-
-{* <!-- Include TPL file to add an "Event Cats" fieldset
-        in admin cat_modify pages --> *}
-
-<fieldset id="event_cats_inc">
-  <legend>YESSSSSSSSSSSSSS !!!</legend>
-</fieldset>
-
Index: /extensions/event_cats/admin/template/header.inc.tpl
===================================================================
--- /extensions/event_cats/admin/template/header.inc.tpl	(revision 6268)
+++ /extensions/event_cats/admin/template/header.inc.tpl	(revision 6269)
@@ -6,5 +6,5 @@
 
 {* <!-- Page title --> *}
-<div class = "titrePage" style = "margin-top: -20px;">
+<div class = "titrePage">
   <h2>{'Admin page title'|@translate} {$EVNTCATS_VERSION}</h2>
 </div>
@@ -23,5 +23,5 @@
     {'Acknowledgement'|@translate}
   </div>
-  <p>
+  <br />
 {/if}
 
Index: tensions/event_cats/ec_no_quick_connect.tpl
===================================================================
--- /extensions/event_cats/ec_no_quick_connect.tpl	(revision 6268)
+++ 	(revision )
@@ -1,8 +1,0 @@
-{* <!-- Event Cats (event categories) LucMorizur June 2009 - ... --> *}
-
-{* <!-- Keeps file coded in UTF-8 without BOM : é --> *}
-
-<script type = "text/javascript"><!--
-  document.all.quickconnect.innerHTML = '';
-//--></script>
-
Index: /extensions/event_cats/main.inc.php
===================================================================
--- /extensions/event_cats/main.inc.php	(revision 6268)
+++ /extensions/event_cats/main.inc.php	(revision 6269)
@@ -3,7 +3,7 @@
 /*
 Plugin Name: Event Cats
-Version: auto
+Version: 1.2.1
 Description: A single URL can be enough to be identified, and a user can duplicate his account to create a new one getting immediately the same properties. / On peut être identifié grâce à un simple URL, et on peut dupliquer son compte pour créer un nouveau compte ayant immédiatement les mêmes propriétés.
-Plugin URI: http://piwigo.org/ext/extension_svn.php?eid=326
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=326
 Author: LucMorizur
 Author URI: http://lucmorizur.free.fr
@@ -44,5 +44,8 @@
 define( // -------------------------------------------------------------------
   'EVNTCATS_INFO_VERSION', // VERSION HISTORY :
-   '1.2.1' // Improve EN translation thanks to Tosca
+   '1.2.2' // Corrections for Piwigo 2.1 compatibility
+// '2.1.0' // When done, will simplfy and allow EC management from categories
+//            management pages in admin pages... yes yes...
+// '1.2.1' // Improve EN translation thanks to Tosca
 // '1.2.0' // Add feature 1335, Possibility to display the 'Connection'
 //         // link in identification block menu for generic users ;
@@ -73,18 +76,7 @@
 include_once(EVNTCATS_PATH.'include/evntcats_main_funcs.inc.php');
 
-function ec_cat_modify_prefilter($content, &$smarty) {
-  $search = '<fieldset id="image_order">';
-  // $addon = '<fieldset id="event_cats_inc"><legend>YESSSSSSSSSSSSSS !!!</legend></fieldset>';
-  $addon = "{include file='../../../plugins/event_cats/admin/template/ec_cat_modify.inc.tpl'} ";
-  $replacement = $addon.$search;
-  return str_replace($search, $replacement, $content);
-  // return $content;
-}
-
 class event_cats {
 // Sets the administration panel of the plugin
   function plugin_admin_menu($menu) {
-    global $template;
-    
     array_push($menu,
       array(
@@ -94,17 +86,6 @@
       )
     );
-    
-                                                                               // to be removed :
-                                                                                  $template->delete_compiled_templates();
-    $template->set_prefilter('categories', 'ec_cat_modify_prefilter');
-    
     return $menu;
   }
-  
-  function ec_cat_modify() {
-    global $template;
-    $template->set_prefilter('categories', 'ec_cat_modify_prefilter');
-  }
-  
 } // End class
 
@@ -120,6 +101,6 @@
 function ec_popup_help_content($popup_help_content, $page) {
   return (
-   $help_content = (is_admin() and $page == 'ec_help') ?
-    load_language('help.html', EVNTCATS_PATH, array('return' => true)) : false
+   $help_content = (is_admin() and $page = 'help') ?
+    load_language($page.'.html', EVNTCATS_PATH, array('return' => true)) : false
   ) ? $popup_help_content.$help_content : $popup_help_content;
 }
@@ -149,5 +130,7 @@
     if (!is_a_guest()) {
       $url = '';
-      foreach ($_GET as $item => $value) $url.= '&'.$item.'='.$value;
+      foreach ($_GET as $item => $value) {
+        $url.= '&'.$item.'='.$value;
+      }
       logout_user();
       redirect(make_index_url().$url);
@@ -305,4 +288,12 @@
  * required in the configuration.
  *
+ * ec_duplicate_prefilter
+ * is used to modify the "quick connect" block in identification menu block,
+ * so that visitors identifying themselves this way, are redirected to the
+ * page they're currently displaying, instead of home page. This
+ * functionnality has been added at version 2.1.0 in Piwigo core
+ * (see bug:1484 Redirection after quickconnect), thus it is useless to
+ * implement it from here for Piwigo versions higher or equal to 2.1.0.
+ *
  * @param no parameter
  * @return no return value
@@ -311,11 +302,20 @@
 add_event_handler('blockmanager_apply', 'duplicate_account_url');
 
+function ec_duplicate_prefilter($content, &$smarty) {
+  $search = "<legend>{'Quick connect'|@translate}</legend>";
+  $addon = '<input type="hidden" name="redirect" value="{$U_REDIRECT}">';
+  $replacement = "<legend>{'Quick connect'|@translate}</legend>".$addon;
+  return str_replace($search, $replacement, $content);
+}
+
 function duplicate_account_url() {
   global $lang, $template, $user;
-    
+  
+  if (version_compare(PHPWG_VERSION, '2.1.0', '<')) {
     // Makes the "quick connect" fieldset able to redirect to current page
-    // after user identification, just as does above "connection" link.
+    // after user identification, just as does the "connection" link.
     $template->assign(array('U_REDIRECT' => $_SERVER['REQUEST_URI']));
     $template->set_prefilter('menubar', 'ec_duplicate_prefilter');
+  }
   
   // Adds duplication link, if needed
@@ -349,13 +349,4 @@
 }
 
-function ec_duplicate_prefilter($content, &$smarty) {
-  $search = "<legend>{'Quick connect'|@translate}</legend>";
-  $addon = '<input type="hidden" name="redirect" value="{$U_REDIRECT}">';
-  $replacement = "<legend>{'Quick connect'|@translate}</legend>".$addon;
-  return str_replace($search, $replacement, $content);
-}
-
-// add_event_handler('get_admin_plugin_menu_links','ec_cat_modify');
-
 add_event_handler(
  'get_admin_plugin_menu_links',
