Index: /extensions/user_tags/CHANGELOG
===================================================================
--- /extensions/user_tags/CHANGELOG	(revision 11080)
+++ /extensions/user_tags/CHANGELOG	(revision 11081)
@@ -1,2 +1,7 @@
+User Tags 0.5.0 - 2011-05-27
+================================
+* Fix incompatibility with piwigo 2.2
+* Change jquery plugin from fcbkcomplete to tokeninput
+
 User Tags 0.4.2 - 2011-02-19
 ================================
Index: /extensions/user_tags/MANIFEST
===================================================================
--- /extensions/user_tags/MANIFEST	(revision 11080)
+++ /extensions/user_tags/MANIFEST	(revision 11081)
@@ -1,65 +1,68 @@
+user_tags/js/jquery.addtags.js
 user_tags/BUGS
-user_tags/imgs/edit.png
+user_tags/include/t4u_admin_action.inc.php
+user_tags/include/t4u_config.class.php
+user_tags/include/t4u_content.class.php
+user_tags/include/constants.inc.php
+user_tags/include/default_values.inc.php
+user_tags/maintain.inc.php
 user_tags/MANIFEST
-user_tags/maintain.inc.php
-user_tags/template/add_tags.tpl
-user_tags/template/admin.tpl
-user_tags/js/jquery.addtags.js
-user_tags/js/jquery.fcbkcomplete.js
+user_tags/init.php
 user_tags/main.inc.php
-user_tags/language/fr_FR/help/readme.html
-user_tags/language/fr_FR/help/index.php
+user_tags/COPYING
+user_tags/language/es_ES/plugin.lang.php
+user_tags/language/es_ES/index.php
+user_tags/language/es_ES/description.txt
+user_tags/language/es_ES/help/index.php
+user_tags/language/es_ES/help/readme.html
+user_tags/language/en_UK/plugin.lang.php
+user_tags/language/en_UK/index.php
+user_tags/language/en_UK/description.txt
+user_tags/language/en_UK/help/index.php
+user_tags/language/en_UK/help/readme.html
+user_tags/language/de_DE/plugin.lang.php
+user_tags/language/de_DE/index.php
+user_tags/language/de_DE/description.txt
+user_tags/language/de_DE/help/index.php
+user_tags/language/de_DE/help/readme.html
+user_tags/language/lv_LV/plugin.lang.php
+user_tags/language/lv_LV/index.php
+user_tags/language/lv_LV/description.txt
+user_tags/language/lv_LV/help/index.php
+user_tags/language/lv_LV/help/readme.html
+user_tags/language/no_NO/plugin.lang.php
+user_tags/language/no_NO/index.php
+user_tags/language/no_NO/description.txt
+user_tags/language/no_NO/help/index.php
+user_tags/language/no_NO/help/readme.html
+user_tags/language/it_IT/plugin.lang.php
+user_tags/language/it_IT/index.php
+user_tags/language/it_IT/description.txt
+user_tags/language/it_IT/help/index.php
+user_tags/language/it_IT/help/readme.html
+user_tags/language/zh_CN/plugin.lang.php
+user_tags/language/zh_CN/index.php
+user_tags/language/zh_CN/description.txt
+user_tags/language/zh_CN/help/index.php
+user_tags/language/zh_CN/help/readme.html
+user_tags/language/hu_HU/plugin.lang.php
+user_tags/language/hu_HU/index.php
+user_tags/language/hu_HU/description.txt
+user_tags/language/hu_HU/help/index.php
+user_tags/language/hu_HU/help/readme.html
+user_tags/language/fr_FR/plugin.lang.php
 user_tags/language/fr_FR/index.php
 user_tags/language/fr_FR/description.txt
-user_tags/language/fr_FR/plugin.lang.php
-user_tags/language/de_DE/help/readme.html
-user_tags/language/de_DE/help/index.php
-user_tags/language/de_DE/index.php
-user_tags/language/de_DE/description.txt
-user_tags/language/de_DE/plugin.lang.php
-user_tags/language/no_NO/help/readme.html
-user_tags/language/no_NO/help/index.php
-user_tags/language/no_NO/index.php
-user_tags/language/no_NO/description.txt
-user_tags/language/no_NO/plugin.lang.php
+user_tags/language/fr_FR/help/index.php
+user_tags/language/fr_FR/help/readme.html
+user_tags/language/templates/plugin.lang.php
 user_tags/language/templates/index.php
-user_tags/language/templates/plugin.lang.php
-user_tags/language/en_UK/help/readme.html
-user_tags/language/en_UK/help/index.php
-user_tags/language/en_UK/index.php
-user_tags/language/en_UK/description.txt
-user_tags/language/en_UK/plugin.lang.php
-user_tags/language/lv_LV/help/readme.html
-user_tags/language/lv_LV/help/index.php
-user_tags/language/lv_LV/index.php
-user_tags/language/lv_LV/description.txt
-user_tags/language/lv_LV/plugin.lang.php
-user_tags/language/it_IT/help/readme.html
-user_tags/language/it_IT/help/index.php
-user_tags/language/it_IT/index.php
-user_tags/language/it_IT/description.txt
-user_tags/language/it_IT/plugin.lang.php
-user_tags/language/es_ES/help/readme.html
-user_tags/language/es_ES/help/index.php
-user_tags/language/es_ES/index.php
-user_tags/language/es_ES/description.txt
-user_tags/language/es_ES/plugin.lang.php
-user_tags/language/hu_HU/help/readme.html
-user_tags/language/hu_HU/help/index.php
-user_tags/language/hu_HU/index.php
-user_tags/language/hu_HU/description.txt
-user_tags/language/hu_HU/plugin.lang.php
+user_tags/css/admin.css
+user_tags/css/style.css
+user_tags/css/imgs/close.png
+user_tags/public.php
+user_tags/admin.php
+user_tags/imgs/edit.png
 user_tags/CHANGELOG
-user_tags/include/constants.inc.php
-user_tags/include/t4u_content.class.php
-user_tags/include/default_values.inc.php
-user_tags/include/t4u_config.class.php
-user_tags/include/t4u_admin_action.inc.php
-user_tags/admin.php
-user_tags/COPYING
-user_tags/css/style.css
-user_tags/css/admin.css
-user_tags/css/imgs/close.png
-user_tags/init.php
-user_tags/public.php
-user_tags/TODO
+user_tags/template/admin.tpl
+user_tags/template/add_tags.tpl
Index: tensions/user_tags/TODO
===================================================================
--- /extensions/user_tags/TODO	(revision 11080)
+++ 	(revision )
@@ -1,3 +1,0 @@
-* add token
-* update tags with an ajax request
-* cancel button needs a confirmation when something has changed.
Index: /extensions/user_tags/admin.php
===================================================================
--- /extensions/user_tags/admin.php	(revision 11080)
+++ /extensions/user_tags/admin.php	(revision 11081)
@@ -3,5 +3,5 @@
 // | User Tags  - a plugin for Piwigo                                      |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// | Copyright(C) 2010-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -29,4 +29,8 @@
 $save_config = false;
 
+if (!empty($_GET['action']) && in_array($_GET['action'], array('add', 'get'))) {
+  include_once T4U_PLUGIN_ROOT . "/include/t4u_admin_action.inc.php";
+}
+
 $status_options[null] = '----------';
 foreach (get_enums(USER_INFOS_TABLE, 'status') as $status) {
@@ -38,5 +42,5 @@
       && $_POST['permission_add']!=$me->getPermission('add')) {
     $me->setPermission('add', $_POST['permission_add']);
-    array_push($GLOBALS['page']['infos'], l10n('Add permission updated'));
+    $page['infos'][] = l10n('Add permission updated');
     $save_config = true;
   }
@@ -44,5 +48,5 @@
       && $_POST['permission_delete']!=$me->getPermission('delete')) {
     $me->setPermission('delete', $_POST['permission_delete']);
-    array_push($GLOBALS['page']['infos'], l10n('Delete permission updated'));
+    $page['infos'] = l10n('Delete permission updated');
     $save_config = true;
   }
@@ -53,12 +57,12 @@
 }
 
-$GLOBALS['template']->set_filenames(array('plugin_admin_content' => T4U_TEMPLATE . '/admin.tpl'));
-$GLOBALS['template']->assign('T4U_CSS', T4U_CSS);
+$template->set_filenames(array('plugin_admin_content' => T4U_TEMPLATE . '/admin.tpl'));
+$template->assign('T4U_CSS', T4U_CSS);
 
-$GLOBALS['template']->assign('T4U_PERMISSION_ADD', $me->getPermission('add')); 
-$GLOBALS['template']->assign('T4U_PERMISSION_DELETE', $me->getPermission('delete')); 
-$GLOBALS['template']->assign('STATUS_OPTIONS', $status_options);
-$GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+$template->assign('T4U_PERMISSION_ADD', $me->getPermission('add'));
+$template->assign('T4U_PERMISSION_DELETE', $me->getPermission('delete'));
+$template->assign('STATUS_OPTIONS', $status_options);
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
 
-$GLOBALS['template']->assign('U_HELP', get_root_url().'admin/popuphelp.php?page=readme');
+$template->assign('U_HELP', get_root_url().'admin/popuphelp.php?page=readme');
 ?>
Index: /extensions/user_tags/css/style.css
===================================================================
--- /extensions/user_tags/css/style.css	(revision 11080)
+++ /extensions/user_tags/css/style.css	(revision 11081)
@@ -8,32 +8,17 @@
 .t4u-clickable{cursor:pointer;}
 #t4u-addtags-form .t4u-disabled{color:#999;border-color:#666;}
-ul.holder{margin:0;border:1px solid #999;overflow:hidden;padding:4px 5px;}
-*:first-child+html ul.holder{padding-bottom:2px;}
-* html ul.holder{padding-bottom:2px;}
-ul.holder li{float:left;list-style-type:none;margin:2px 5px;white-space:nowrap;}
-ul.holder li.bit-box{-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #CAD8F3;background:#DEE7F8;padding:1px 5px 2px 2px;}
-ul.holder li.bit-box-focus{border-color:#598BEC;background:#598BEC;color:#fff;}
-ul.holder li.bit-input input{width:auto;overflow:visible;margin:0;border:0;outline:0;padding:3px 0 2px 2px;}
-ul.holder li.bit-input input.smallinput{width:20px;}
-#add{border:1px solid #999;width:550px;margin:50px;padding:20px 30px 10px 10px;}
-form ol li{list-style-type:none;}
-form ol{font:11px "Lucida Grande","Verdana";margin:0;padding:0;}
-form ol li.input-text{margin-bottom:10px;list-style-type:none;padding-bottom:10px;}
-form ol li.input-text label{font-weight:bold;cursor:pointer;display:block;font-size:13px;margin-bottom:10px;}
-form ol li.input-text input{width:500px;padding:5px 5px 6px 6px;font:11px "Lucida Grande","Verdana";border:1px solid #999;}
-form ul.holder{width:auto;max-width:500px;}
-ul.holder li.bit-box{padding-right:15px;position:relative;z-index:1000;}
-ul.holder li.bit-hover{background:#BBCEF1;border:1px solid #6D95E0;}
-ul.holder li.bit-box-focus{border-color:#598BEC;background:#598BEC;color:#fff;}
-ul.holder li.bit-box a.closebutton{position:absolute;right:4px;top:5px;display:block;width:7px;height:7px;font-size:1px;background:url(./imgs/close.png);}
-ul.holder li.bit-box a.closebutton:hover{background-position:7px;}
-ul.holder li.bit-box-focus a.closebutton,ul.holder li.bit-box-focus a.closebutton:hover{background-position:bottom;}
-.facebook-auto{display:none;position:absolute;width:512px;background:#eee;}
-.facebook-auto .default{padding:5px 7px;border:1px solid #ccc;border-width:0 1px 1px;font-family:"Lucida Grande","Verdana";font-size:11px;}
-.facebook-auto ul{display:none;margin:0;padding:0;overflow:auto;position:absolute;z-index:9999;}
-.facebook-auto ul li{padding:5px 12px;z-index:1000;cursor:pointer;margin:0;list-style-type:none;border:1px solid #ccc;border-width:0 1px 1px;font:11px "Lucida Grande","Verdana";background-color:#eee;}
-.facebook-auto ul li em{font-weight:bold;font-style:normal;background:#ccc;}
-.facebook-auto ul li.auto-focus{background:#4173CC;color:#fff;}
-.facebook-auto ul li.auto-focus em{background:none;}
-.deleted{background-color:#4173CC!important;color:#fff!important;}
-.ie6fix{height:1px;width:1px;position:absolute;top:0;left:0;z-index:1;}
+ul.token-input-list-facebook{overflow:hidden;height:auto!important;height:1%;width:400px;border:1px solid #8496ba;cursor:text;font-size:12px;font-family:Verdana;min-height:1px;z-index:999;margin:0;padding:0;background-color:#fff;list-style-type:none;clear:left;}
+ul.token-input-list-facebook li input{border:0;width:100px;padding:3px 8px;background-color:white;margin:2px 0;-webkit-appearance:caret;}
+li.token-input-token-facebook,li.token-input-new-token-facebook{overflow:hidden;height:auto!important;height:15px;margin:3px;padding:1px 3px;background-color:#eff2f7;color:#000;cursor:default;border:1px solid #ccd5e4;font-size:11px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;float:left;white-space:nowrap;}
+li.token-input-new-token-facebook{background-color:#FAF;}
+li.token-input-token-facebook span{margin-left:5px;cursor:pointer;}
+li.token-input-selected-token-facebook{background-color:#5670a6;border:1px solid #3b5998;color:#fff;}
+li.token-input-input-token-facebook{float:left;margin:0;padding:0;list-style-type:none;}
+div.token-input-dropdown-facebook{position:absolute;width:400px;background-color:#fff;overflow:hidden;border-left:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc;cursor:default;font-size:11px;font-family:Verdana;z-index:1;}
+div.token-input-dropdown-facebook p{margin:0;padding:5px;font-weight:bold;color:#777;}
+div.token-input-dropdown-facebook ul{margin:0;padding:0;}
+div.token-input-dropdown-facebook ul li{background-color:#fff;padding:3px;margin:0;list-style-type:none;}
+div.token-input-dropdown-facebook ul li.token-input-dropdown-item-facebook{background-color:#fff;}
+div.token-input-dropdown-facebook ul li.token-input-dropdown-item2-facebook{background-color:#fff;}
+div.token-input-dropdown-facebook ul li em{font-weight:bold;font-style:normal;}
+div.token-input-dropdown-facebook ul li.token-input-selected-dropdown-item-facebook{background-color:#3b5998;color:#fff;}
Index: /extensions/user_tags/include/default_values.inc.php
===================================================================
--- /extensions/user_tags/include/default_values.inc.php	(revision 11080)
+++ /extensions/user_tags/include/default_values.inc.php	(revision 11081)
@@ -3,5 +3,5 @@
 // | User Tags  - a plugin for Piwigo                                      |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// | Copyright(C) 2010-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/user_tags/include/t4u_admin_action.inc.php
===================================================================
--- /extensions/user_tags/include/t4u_admin_action.inc.php	(revision 11080)
+++ /extensions/user_tags/include/t4u_admin_action.inc.php	(revision 11081)
@@ -25,5 +25,5 @@
 
 if (!empty($_GET['action']) && ($_GET['action']=='add') 
-    && isset($_POST['tags']) && $plugin_config->getPermission('add') ) {
+    && isset($_POST['tags']) && $me->getPermission('add')) {
   include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
 
@@ -31,28 +31,66 @@
     $_POST['tags'] = array();
   }
-  $tag_ids = get_fckb_tag_ids($_POST['tags']);
+  $tag_ids = __get_tag_ids($_POST['tags']);
   set_tags($tag_ids, $_POST['image_id']);
 
   if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) {
     header("Content-Type: application/json");
-    $message['info'] = 'Tags updated';
+    $message['info'] = l10n('Tags updated');
 
     echo json_encode($message);
     exit();
   } else {
-    redirect(get_absolute_root_url().$_POST['referer']);
+    redirect(get_root_url().$_POST['referer']);
   }
-} elseif (!empty($_GET['action']) && $_GET['action']=='get' && $plugin_config->getPermission('add') ) {
-  include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-      
+} elseif (!empty($_GET['action']) && $_GET['action']=='get' && $me->getPermission('add')) {
   $query = '
 SELECT
     id AS tag_id,
     name AS tag_name
-  FROM '.TAGS_TABLE.'
-;';
+  FROM '.TAGS_TABLE;
+
+  if (!empty($_GET['q'])) {
+    $query .= ' WHERE url_name like \'%'.pwg_db_real_escape_string($_GET['q']).'%\';';
+  } else {
+    $query .= ';';
+  }
   header("Content-Type: application/json");
-  echo json_encode(get_fckb_taglist($query));
+  echo json_encode(__get_taglist($query));
   exit();
 }
+
+/*
+ * temporary functions before piwigo 2.3
+ * See admin/include/functions.php in piwigo core
+ */
+function __get_taglist($query) {
+  $result = pwg_query($query);
+
+  $taglist = array();
+  while ($row = pwg_db_fetch_assoc($result)) {
+    $taglist[] = array('name' => $row['tag_name'],
+		       'id' => '~~'.$row['tag_id'].'~~'
+		       );
+  }
+
+  $cmp = create_function('$a,$b', 'return strcasecmp($a[\'name\'], $b[\'name\']);');
+  usort($taglist, $cmp);
+
+  return $taglist;
+}
+
+function __get_tag_ids($raw_tags) {
+  $tag_ids = array();
+  $raw_tags = explode(',',$raw_tags);
+
+  foreach ($raw_tags as $raw_tag) {
+    if (preg_match('/^~~(\d+)~~$/', $raw_tag, $matches)) {
+      $tag_ids[] = $matches[1];
+    } else {
+      $tag_ids[] = tag_id_from_tag_name($raw_tag);
+    }
+  }
+
+  return $tag_ids;
+}
 ?>
Index: /extensions/user_tags/include/t4u_config.class.php
===================================================================
--- /extensions/user_tags/include/t4u_config.class.php	(revision 11080)
+++ /extensions/user_tags/include/t4u_config.class.php	(revision 11081)
@@ -99,14 +99,14 @@
   }
   
-  public function getActionUrl($base_url, $action) {
-    global $conf;
-
-    $url = $base_url;
-    if ($conf['question_mark_in_urls']) {
-      $url .= '&';
+  public function getActionUrl($action, $method='POST') {
+    $url = get_root_url().'admin.php?page=plugin';
+    $file = basename($this->plugin_dir) . '/' .'admin.php';
+    if (strtoupper($method)=='POST') {
+	$url .= '&amp;section='.urlencode($file);
+	$url .= '&amp;action='.urlencode($action);
     } else {
-      $url .= '?';      
+	$url .= '&section='.$file;
+	$url .= '&action='.$action;
     }
-    $url .= 'action='.$action;           
 
     return $url;
Index: /extensions/user_tags/include/t4u_content.class.php
===================================================================
--- /extensions/user_tags/include/t4u_content.class.php	(revision 11080)
+++ /extensions/user_tags/include/t4u_content.class.php	(revision 11081)
@@ -30,21 +30,5 @@
 
     if (!$this->plugin_config->hasPermission('add')) {
-      return $content;
-    }
-
-    load_language('plugin.lang', T4U_PLUGIN_LANG);
-
-    if (version_compare(PHPWG_VERSION, '2.2', '>=') || (PHPWG_VERSION=='Colibri')) {
-      $template->func_combine_script(array('id' => 'jquery',
-					   'path' => 'themes/default/js/jquery.min.js'
-					   ),
-				     $template->smarty
-				     );
-    } else {
-      $template->func_known_script(array('id' => 'jquery',
-					 'src' => get_root_url().'themes/default/js/jquery.packed.js'
-					 ),
-				   $template->smarty
-				   );
+      return false;
     }
 
@@ -52,8 +36,8 @@
     $template->assign('T4U_CSS', T4U_CSS);
     $template->assign('T4U_IMGS', T4U_IMGS);
-    $template->assign('T4U_ADD_SCRIPT', $this->plugin_config->getActionUrl($picture['url'], 'add'));
-    $template->assign('T4U_GET_SCRIPT', $this->plugin_config->getActionUrl($picture['url'], 'get'));
+    $template->assign('T4U_ADD_SCRIPT', $this->plugin_config->getActionUrl('add', 'GET'));
+    $template->assign('T4U_GET_SCRIPT', $this->plugin_config->getActionUrl('get', 'GET'));
     $template->assign('T4U_IMAGE_ID', $picture['id']);
-    $template->assign('T4U_REFERER', htmlentities($picture['url']));
+    $template->assign('T4U_REFERER', urlencode($picture['url']));
     $template->assign('T4U_PERMISSION_DELETE', $this->plugin_config->hasPermission('delete'));
 
Index: /extensions/user_tags/js/jquery.addtags.js
===================================================================
--- /extensions/user_tags/js/jquery.addtags.js	(revision 11080)
+++ /extensions/user_tags/js/jquery.addtags.js	(revision 11081)
@@ -1,1 +1,1 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(4($){$.l=4(u,3){$(u).n(\'\');$(u).Y().m(3).13(Q).X(1c)};$.R.l=4(3){9.T(4(){U $.l(9,3)})};K 9})(15);4 D(3){c h=\'12: \';$(\'#2-r\').C(\'2-7\').y(\'7\',\'7\');g(3.A){h=\'<a t="S">\'+8[3.A]+\'</a>\'}W g(3.M){h=\'<a t="Z">\'+8[3.M]+\'</a>\'}g(h!=\'\'){$(\'#o p.f\').m(\'<a 6="P-O"></a>\');$(\'#P-O\').l(h)}}4 x(1a){$(\'#2-r\').11(\'2-7\').17(\'7\');K}$(4(){c 5=\'<i 14="\'+b[\'L\']+\'" 16="F" 6="2-G-i">\';5+=\'<B 6="d" q="d">\';5+=1b;5+=\'</B>\';5+=\'<v 6="2-19-6" s="I" q="18" f="\'+b[\'10\']+\'">\';5+=\'<v 6="2-H" s="I" q="H" f="\'+b[\'V\']+\'">\';5+=\'<v 6="2-r" s="E" 7="7" t="2-7" f="\'+8[\'1u\']+\'">\';5+=\'</i>\';g($(\'#o\').1A>0){$(\'#o p.1B\').m(\'<1z 6="2-1y" 1w="\'+b[\'1x\']+\'" 1D="\'+8[\'z\']+\'">\').y(\'1d\',8[\'z\']).C(\'2-1I\').J(4(){$(9).1K(\'J\');c w=$(9).1J().1H(\'p.f\');c 1E=w.n();w.n(5);$(\'#d\').1F({1C:b[\'1v\'],1j:8[\'1k\'],1i:N,1h:N,1e:j,1f:j,1g:j,1l:x,1m:x,1s:1t,1r:j});$(\'#2-G-i\').E(4(e){c k=$(9).1q();g(k.1n(\'d%1o%1p=\')==-1){k+=\'&d=\'}$.F(b[\'L\'],k,4(3){D(3)});e.1G()})})}});',62,109,'||t4u|data|function|newRow|id|disabled|vocab|this|div|path|var|tags||value|if|message|form|true|serialized_form|flashMessage|append|html|Tags|td|name|update|type|class|source|input|tags_value|t4u_onchange|attr|click_to_add_tags|info|select|addClass|t4u_form_sucess|submit|post|addtags|referer|hidden|click|return|t4u_add_script|error|false|messages|flash|500|fn|infos|each|new|t4u_referer|else|fadeOut|hide|errors|t4u_image_id|removeClass|Message|fadeIn|action|jQuery|method|removeAttr|image_id|image|item|related_tags|3000|title|filter_hide|firstselected|filter_selected|filter_case|cache|complete_text|start_to_type|onremove|onselect|lastIndexOf|5B|5D|serialize|newel|maxitems|100|update_tags|t4u_get_script|src|t4u_edit_icon|edit|img|length|label|json_url|alt|old_tags_value|fcbkcomplete|preventDefault|find|clickable|parent|unbind'.split('|'),0,{}))
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){7 3e={1Y:"4G 4F a 4I 2u",2i:"4K u",2v:"4C...",3v:"&4x;",42:4z,2F:1,1a:C,1v:C,2J:"4H",4h:"55",3S:"q",2A:",",2I:H,2H:C,3x:H,4q:1D,15:C,2z:C,2x:C,2s:H};7 25={3l:"c-y-4Z",c:"c-y-c",3t:"c-y-4R-c",3C:"c-y-1l-c",2n:"c-y-3u-c",2V:"c-y-4W-c",E:"c-y-E",4i:"c-y-E-B",4j:"c-y-E-4V",2p:"c-y-3u-E-B",3i:"c-y-y-c"};7 U={2j:0,1X:1,1p:2};7 x={3j:8,3s:9,3q:13,3p:27,54:32,4X:33,4Y:34,1p:35,4U:36,26:37,24:38,2b:39,2c:40,3K:4T,3n:4P};$.4a.3Z=6(1c,1N){7 3=$.2S({},3e,1N||{});r k.O(6(){1l $.1O(k,1c,3)})};$.1O=6(y,1c,3){4(3k(1c)==="4Q"){3.T=1c;4(3.22===50){4(3.T.2O("://")===-1){3.22=H}j{3.22=(58.59.1w(/\\/+/g)[1]!==3.T.1w(/\\/+/g)[1])}}}j 4(3k(1c)==="5a"){3.2P=1c}4(3.t){3.t=$.2S({},25,3.t)}j 4(3.2D){3.t={};$.O(25,6(3f,h){3.t[3f]=h+"-"+3.2D})}j{3.t=25}7 R=[];7 1b=0;7 1I=1l $.1O.45();7 2o;7 1E;7 m=$("<y 1B=\\"2q\\"  56=\\"52\\">").17({51:"53"}).W(6(){4(3.1a===C||3.1a!==1b){4p()}}).1K(6(){14()}).4N("5c 3B 1K 29",3A).3B(6(o){7 Y;7 1f;4y(o.X){P x.26:P x.2b:P x.24:P x.2c:4(!$(k).v()){Y=S.2U();1f=S.3D();4((Y.D&&Y.A(0)===w)||(1f.D&&1f.A(0)===w)){4(o.X===x.26||o.X===x.24){18($(w),U.2j)}j{18($(w),U.1X)}}j 4((o.X===x.26||o.X===x.24)&&Y.D){1g($(Y.A(0)))}j 4((o.X===x.2b||o.X===x.2c)&&1f.D){1g($(1f.A(0)))}}j{7 1r=C;4(o.X===x.2c||o.X===x.2b){1r=$(N).3D()}j{1r=$(N).2U()}4(1r.D){20(1r)}r H}1L;P x.3j:Y=S.2U();4(!$(k).v().D){4(w){2C($(w))}j 4(Y.D){1g($(Y.A(0)))}r H}j 4($(k).v().D===1){14()}j{2g(6(){2k()},5)}1L;P x.3s:P x.3q:P x.3K:P x.3n:4(N){2B($(N));r H}j 4(3.2s){4($(k).v().D>0){2f($(k).v(),$(k).v(),1D);$(k).v("")}r H}1L;P x.3p:14();r 1D;4A:4(4t.4v(o.4S)){2g(6(){2k()},5)}1L}});7 K=$(y).1h().v("").W(6(){m.W()}).1K(6(){m.1K()});7 w=C;7 M=0;7 N=C;7 19=$("<4n />").I(3.t.3l).1G(6(o){7 n=$(o.1t).1n("n");4(n&&n.A(0)&&$.f(n.A(0),"1j")){3G(n)}j{4(w){18($(w),U.1p)}m.W()}}).4m(6(o){7 n=$(o.1t).1n("n");4(n&&w!==k){n.I(3.t.2V)}}).5d(6(o){7 n=$(o.1t).1n("n");4(n&&w!==k){n.23(3.t.2V)}}).2h(K);7 S=$("<n />").I(3.t.3i).1k(19).1A(m);7 E=$("<1d>").I(3.t.E).1k("5Q").1h();7 2Q=$("<5L/>").2K(m).17({1o:"3o",2Z:-3h,2y:-3h,2X:"5G",3I:m.17("3I"),3F:m.17("3F"),3z:m.17("3z"),3y:m.17("3y"),5I:"5S"});K.v("");7 G=3.2H||K.f("5J");4(3.3x&&$.1u(3.15)){G=3.15.1y(K,G)}4(G&&G.D){$.O(G,6(J,h){2l(h.d,h.z)})}6 3A(){4(1E===(1E=m.v())){r}7 3E=1E.1s(/&/g,\'&5V;\').1s(/\\s/g,\' \').1s(/</g,\'&5T;\').1s(/>/g,\'&5U;\');2Q.16(3E);m.2X(2Q.2X()+30)}6 5Y(V){r((V>=48&&V<=5D)||(V>=5m&&V<=5l)||(V>=5n&&V<=5o)||(V>=5p&&V<=5j))}6 3w(d,h){3a(d,h,3.t.3C)}6 2l(d,h){3a(d,h,3.t.c)}6 3a(d,h,3N){7 1Q=$("<n><1P>"+h+"</1P></n>").I(3N).2h(S);$("<1P>"+3.3v+"</1P>").I(3.t.3t).1k(1Q).1G(6(){2C($(k).3U());r H});7 12={"d":d,"z":h};$.f(1Q.A(0),"1j",12);R=R.1T(0,M).2G([12]).2G(R.1T(M));M++;7 1Z=$.3r(R,6(21){r 21.d});K.v(1Z.3c(3.2A));1b+=1;r 1Q}6 2B(B){7 12=$.f(B.A(0),"1j")2f(12.d,12.z,H)}6 2f(d,z,3O){7 G={d:d,z:z};7 1i=3.2z;4(1b>0&&3.2I){7 1q=C;19.1R().O(6(){7 2L=$(k);7 2e=$.f(2L.A(0),"1j");4(2e&&2e.d===G.d){1q=2L;r H}});4(1q){1g(1q);S.2K(1q);m.W();r}}4(3O){3w(G.d,G.z)}j{2l(G.d,G.z)}4(3.1a!==C&&1b>=3.1a){m.1h();14();r}j{m.W()}m.v("");14();4($.1u(1i)){1i.1y(K,G)}}6 1g(c){c.I(3.t.2n);w=c.A(0);m.v("");14()}6 18(c,1o){c.23(3.t.2n);w=C;4(1o===U.2j){S.2h(c);M--}j 4(1o===U.1X){S.2K(c);M++}j{S.1k(19);M=1b}m.W()}6 3G(c){7 3M=w;4(w){18($(w),U.1p)}4(3M===c.A(0)){18(c,U.1p)}j{1g(c)}}6 2C(c){7 12=$.f(c.A(0),"1j");7 1i=3.2x;7 J=c.5B().D;4(J>M)J--;c.4e();w=C;m.W();R=R.1T(0,J).2G(R.1T(J+1));4(J<M)M--;7 1Z=$.3r(R,6(21){r 21.d});K.v(1Z.3c(3.2A));1b-=1;4(3.1a!==C){m.2r().v("").W()}4($.1u(1i)){1i.1y(K,12)}}6 14(){E.1h().4l();N=C}6 1x(){E.17({1o:"3o",2Z:$(19).4r().2Z+$(19).5P(),2y:$(19).4r().2y,5w:5v}).2r()}6 41(){4(3.2v){E.16("<p>"+3.2v+"</p>");1x()}}6 4p(){4(3.1Y){E.16("<p>"+3.1Y+"</p>");1x()}}6 4k(h,2u){r h.1s(1l 5u("(?![^&;]+;)(?!<[^<>]*)("+2u+")(?![^<>]*>)(?![^&;]+;)","5s"),"<b>$1</b>")}6 1J(l,u){4(u&&u.D){E.4l();7 1V=$("<4n>").1k(E).4m(6(o){20($(o.1t).1n("n"))}).5t(6(o){2B($(o.1t).1n("n"));r H}).1h();$.O(u,6(J,h){7 1z=$("<n>"+4k(h.z,l)+"</n>").1k(1V);4(J%2){1z.I(3.t.4i)}j{1z.I(3.t.4j)}4(J===0){20(1z)}$.f(1z.A(0),"1j",{"d":h.d,"z":h.z})});1x();4(3.4q){1V.5A("5z")}j{1V.2r()}}j{4(3.2i){E.16("<p>"+3.2i+"</p>");1x()}}}6 20(B){4(B){4(N){3Y($(N))}B.I(3.t.2p);N=B.A(0)}}6 3Y(B){B.23(3.t.2p);N=C}6 2k(){7 l=m.v().1F();4(l&&l.D){4(w){18($(w),U.1X)}4(l.D>=3.2F){41();5g(2o);2o=2g(6(){3X(l)},3.42)}j{14()}}}6 3X(l){7 2E=1I.A(l);4(2E){1J(l,2E)}j{4(3.T){7 L={};L.f={};4(3.T.2O("?")>-1){7 2M=3.T.1w("?");L.T=2M[0];7 3W=2M[1].1w("&");$.O(3W,6(J,h){7 3b=h.1w("=");L.f[3b[0]]=3b[1]})}j{L.T=3.T}L.f[3.3S]=l;L.1B=3.2J;L.3R=3.4h;4(3.22){L.3R="5E"}L.5k=6(u){4($.1u(3.15)){u=3.15.1y(K,u)}1I.2W(l,3.1v?u[3.1v]:u);4(m.v().1F()===l){1J(l,3.1v?u[3.1v]:u)}};$.5Z(L)}j 4(3.2P){7 u=$.5W(3.2P,6(4d){r 4d.z.1F().2O(l.1F())>-1});4($.1u(3.15)){u=3.15.1y(K,u)}1I.2W(l,u);1J(l,u)}}}};$.1O.45=6(1N){7 3=$.2S({47:46},1N);7 f={};7 1M=0;7 49=6(){f={};1M=0};k.2W=6(l,u){4(1M>3.47){49()}4(!f[l]){1M+=1}f[l]=u};k.A=6(l){r f[l]}}}(4f));(6($){$.28=6(2T,f){$(2T).16(\'\');$(2T).1h().1A(f).4M(46).4E(4D)};$.4a.28=6(f){k.O(6(){1l $.28(k,f)})};r k})(4f);6 2w(B){2N.2Y(\'2w\');2N.2Y(B);$(\'#Z\').1A(\'<1C h="\'+B.d+\'">\'+B.z+\'</1C>\');2a()}6 3m(B){$(\'#Z\').1R(\'1C\').O(6(i){4($(k).2q()==B.z){$(k).4e()}});2a()}6 2a(B){2N.2Y(\'2a\');$(\'#F-29\').23(\'F-11\').4w(\'11\');r}6 3J(f){7 1m=\'\';$(\'#F-29\').I(\'F-11\').1H(\'11\',\'11\');4(f.4c){1m=\'<1d 2m="4s">\'+f.4c+\'</1d>\'}j 4(f.44){1m=\'<1d 2m="4B">\'+f.44+\'</1d>\'}4(1m!=\'\'){$(\'#2R 31.h\').1A(\'<1d d="43-3V"></1d>\');$(\'#43-3V\').28(1m)}}$(6(){7 Q=\'<1U 57="\'+1e[\'3g\']+\'" 2J="3P" d="F-3d-1U">\';Q+=\'<3T d="Z" z="Z">\';Q+=5b;Q+=\'</3T>\';Q+=\'<y d="F-3L-d" 1B="4g" z="3H" h="\'+1e[\'4O\']+\'">\';Q+=\'<y d="F-1S" 1B="4g" z="1S" h="\'+1e[\'5y\']+\'">\';Q+=\'<y d="F-29" 1B="3Q" 11="11" 2m="F-11" h="\'+1W[\'4u\']+\'">\';Q+=\'</1U>\';4($(\'#2R\').D>0){$(\'#2R 31.4L\').1A(\'<5N d="F-5M" 5O="\'+1e[\'5K\']+\'" 5F="\'+1W[\'4b\']+\'">\').1H(\'5H\',1W[\'4b\']).I(\'F-5R\').1G(6(){$(k).5X(\'1G\');7 2d=$(k).3U().5f(\'31.h\');7 5e=2d.16();2d.16(Q);7 2t=[];$(\'#Z\').1R(\'1C\').O(6(){2t.5h({d:$(k).1H(\'d\'),z:$(k).2q()})});$.5i(1e[\'5q\'],6(f){$(\'#Z\').3Z(f,{1Y:1W[\'5r\'],2D:\'5C\',2F:2,1a:5x,2I:1D,2H:2t,2x:3m,2z:2w,2s:1D})});$(\'#F-3d-1U\').3Q(6(e){e.4o();7 10=\'3H=\'+$(\'#F-3L-d\',$(k)).v();10+=\'&1S=\'+$(\'#F-1S\',$(k)).v();10+=\'&Z=\';$(\'#Z\').1R(\'1C\').O(6(i){10+=$(k).1H(\'h\')+\',\'});10=10.4J(0,10.D-1);$.3P(1e[\'3g\'],10,6(f){3J(f)});e.4o()})})}});',62,372,'|||settings|if||function|var|||||token|id||data||value||else|this|query|input_box|li|event|||return||classes|results|val|selected_token|KEY|input|name|get|item|null|length|dropdown|t4u|li_data|false|addClass|index|hidden_input|ajax_params|selected_token_index|selected_dropdown_item|each|case|newRow|saved_tokens|input_token|url|POSITION|keycode|focus|keyCode|previous_token|tags|serialized_form|disabled|token_data||hide_dropdown|onResult|html|css|deselect_token|token_list|tokenLimit|token_count|url_or_data|div|path|next_token|select_token|hide|callback|tokeninput|appendTo|new|message|closest|position|END|found_existing_token|dropdown_item|replace|target|isFunction|jsonContainer|split|show_dropdown|call|this_li|append|type|option|true|input_val|toLowerCase|click|attr|cache|populate_dropdown|blur|break|size|options|TokenList|span|this_token|children|referer|slice|form|dropdown_ul|vocab|AFTER|hintText|token_ids|select_dropdown_item|el|crossDomain|removeClass|UP|DEFAULT_CLASSES|LEFT||flashMessage|update|t4u_on_change|RIGHT|DOWN|tags_value|existing_data|_add_token|setTimeout|insertBefore|noResultsText|BEFORE|do_search|insert_token|class|selectedToken|timeout|selectedDropdownItem|text|show|allowNewItems|existing_tags|term|searchingText|t4u_on_add|onDelete|left|onAdd|tokenDelimiter|add_token|delete_token|theme|cached_results|minChars|concat|prePopulate|preventDuplicates|method|insertAfter|existing_token|parts|console|indexOf|local_data|input_resizer|Tags|extend|source|prev|highlightedToken|add|width|log|top||td|||||||||_insert_token|kv|join|addtags|DEFAULT_SETTINGS|key|t4u_add_script|9999|inputToken|BACKSPACE|typeof|tokenList|t4u_on_delete|COMMA|absolute|ESCAPE|ENTER|map|TAB|tokenDelete|selected|deleteText|insert_new_token|processPrePopulate|letterSpacing|fontWeight|resize_input|keydown|tokenNew|next|escaped|fontFamily|toggle_select_token|image_id|fontSize|t4u_form_sucess|NUMPAD_ENTER|image|previous_selected_token|className|new_token|post|submit|dataType|queryParam|select|parent|messages|param_array|run_search|deselect_dropdown_item|tokenInput||show_dropdown_searching|searchDelay|flash|error|Cache|500|max_size||flush|fn|click_to_add_tags|info|row|remove|jQuery|hidden|contentType|dropdownItem|dropdownItem2|highlight_term|empty|mouseover|ul|preventDefault|show_dropdown_hint|animateDropdown|offset|infos|String|update_tags|fromCharCode|removeAttr|times|switch|300|default|errors|Searching|3000|fadeOut|in|Type|GET|search|substring|No|label|fadeIn|bind|t4u_image_id|188|string|delete|which|108|HOME|item2|highlighted|PAGE_UP|PAGE_DOWN|list|undefined|outline|off|none|SPACE|json|autocomplete|action|location|href|object|related_tags|keyup|mouseout|old_tags_value|find|clearTimeout|push|getJSON|222|success|111|96|186|192|219|t4u_get_script|start_to_type|gi|mousedown|RegExp|999|zindex|100|t4u_referer|fast|slideDown|prevAll|facebook|90|jsonp|alt|auto|title|whiteSpace|pre|t4u_edit_icon|tester|edit|img|src|outerHeight|body|clickable|nowrap|lt|gt|amp|grep|unbind|is_printable_character|ajax'.split('|'),0,{}))
Index: tensions/user_tags/js/jquery.fcbkcomplete.js
===================================================================
--- /extensions/user_tags/js/jquery.fcbkcomplete.js	(revision 11080)
+++ 	(revision )
@@ -1,1 +1,0 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('7E(7v(p,a,c,k,e,d){e=7v(c){7u(c<a?\'\':e(7C(c/a)))+((c=c%a)>35?7x.7A(c+29):c.7D(36))};7w(!\'\'.7y(/^/,7x)){7z(c--){d[e(c)]=k[c]||e(c)}k=[7v(e){7u d[e]}];e=7v(){7u\'\\\\w+\'};c=1};7z(c--){7w(k[c]){p=p.7y(7G 7B(\'\\\\b\'+e(c)+\'\\\\b\',\'g\'),k[c])}}7u p}(\'3X(3Q(p,a,c,k,e,d){e=3Q(c){3P(c<a?\\\'\\\':e(3W(c/a)))+((c=c%a)>35?3V.7c(c+29):c.55(36))};3T(!\\\'\\\'.3S(/^/,3V)){3R(c--){d[e(c)]=k[c]||e(c)}k=[3Q(e){3P d[e]}];e=3Q(){3P\\\'\\\\\\\\w+\\\'};c=1};3R(c--){3T(k[c]){p=p.3S(3U 56(\\\'\\\\\\\\b\\\'+e(c)+\\\'\\\\\\\\b\\\',\\\'g\\\'),k[c])}}3P p}(\\\'3t(c($){$.3x.3q=c(2n){m I.2h(c(){c 2J(){2H();2p();26(0)}c 2H(){t.B();t.n("2U","2U");4(t.n("1R").2V("[]")==-1){t.n("1R",t.n("1R")+"[]")}o=$(O.Q("32"));o.n("18","o");t.2Q(o);r=$(O.Q("21"));r.11("3K-E");r.16(\\\\\\\'<21 18="1u">\\\\\\\'+5.2X+"</21>");4(W){r.16(\\\\\\\'<2v 18="2s" 3L="3H" 3A="0"></2v>\\\\\\\');N=r.f(\\\\\\\'.2s\\\\\\\')}b=$(O.Q("32"));b.n("1j",1i+"3d");r.2f(b);o.2Q(r);4(5.2y){b.Y("12",5.12)}y 4(5.1H){b.Y("12",r.12())}}c 2p(){t.f("j").2h(c(i,j){j=$(j);4(j.1b("x")||j.36(\\\\\\\':x\\\\\\\')){V(j.G(),j.J(),R,j.1b("1f"));j.n("x","x")}y{j.35("x")}H.2B({1m:j.G(),h:j.J()});1d+=""+(H.k-1)+":"+j.G()+";"})}$(I).37("V",c(l,M){V(M.1A,M.h,0,0,0)});c V(1A,h,2K,1f,1r){4(!2k()){m p}6 7=O.Q("7");6 2N=O.3a(1A);6 1w=O.Q("a");6 2R="S-Z"+(1f?" 1f":"");$(7).n({"18":2R,"19":h});$(7).2f(2N);$(1w).n({"18":"3g","3b":"#"});7.3e(1w);o.16(7);$(1w).1q(c(){1M($(I).3c("7"));m p});4(!2K){$("#"+1i+"1V").2c();6 F;26(1r);4(t.f("j[h="+h+"]").k){F=t.f("j[h="+h+"]");F.z(0).2W("x","x");4(!F.1b("x")){F.11("x")}}y{6 F=$(O.Q("j"));F.n("h",h).z(0).2W("x","x");F.n("h",h).11("x");F.G(1A);t.16(F)}4(5.1S.k){2e(5.1S,F)}t.34()}o.f("7.S-Z.17").T("17");b.B();W?N.B():\\\\\\\'\\\\\\\'}c 1M(K){4(!K.1b(\\\\\\\'1f\\\\\\\')){K.27("1x");4(5.2g.k){6 F=t.f("j[h="+K.n("19")+"]");2e(5.2g,F)}t.f(\\\\\\\'j[h="\\\\\\\'+K.n("19")+\\\\\\\'"]\\\\\\\').35("x").T("x");K.2c();t.34();1L=0}}c 26(1r){6 7=$(O.Q("7"));6 w=$(O.Q("w"));6 1y=0;7.n({"18":"S-w","1j":1i+"1V"});w.n({"2E":"G","18":"X","2Z":"1"});o.16(7.16(w));w.A(c(){r.3f("1x")});w.1X(c(){r.27("1x")});o.1q(c(){w.A();4(b.k&&w.J().k){b.1e()}y{b.B();W?N.B():\\\\\\\'\\\\\\\';r.f(".1u").1e()}});w.3i(c(l){4((l.D==13&&5.2l)||(l.D==9&&5.2j)){m p}w.n("2Z",w.J().k+1)});w.1Z(c(l){4(l.D==2F){l.1k();m p}});w.39(c(l){6 C=1I(w.J());4(l.D==8&&C.k==0){b.B();W?N.B():\\\\\\\'\\\\\\\';4(!o.f("7.S-Z:28").1b(\\\\\\\'1f\\\\\\\')){4(o.f("7.S-Z.17").k==0){o.f("7.S-Z:28").11("17");m p}y{4(1L){m}1L=1;o.f("7.S-Z.17").27("1x",c(){1M($(I));m p})}}}4(l.D!=2T&&l.D!=38&&C.k!=0){1o=0;4(5.1F){4(5.H&&25){1t(C);1D()}y{1y++;6 2u=1y;2o(c(){4(2u!=1y)m;$.3h(5.1F+(5.1F.2V("?")>-1?"&":"?")+"3O="+C,q,c(M){1t(C,M);25=R;1D()})},5.2t)}}y{1t(C);1D()}r.f(".1u").B();b.1e()}});4(1r){2o(c(){w.A();r.f(".1u").1e()},1)}}c 1t(C,M){b.2D(\\\\\\\'\\\\\\\');4(!5.H&&M!=q){H=2C 2z();1d=""}2O(C);4(M!=q&&M.k){$.2h(M,c(i,J){H.2B({1m:J.1m,h:J.h});1d+=""+(H.k-1)+":"+J.1m+";"})}6 2i=5.1W<H.k?5.1W:H.k;6 29="i";4(5.20){29=""}6 1C,1l;1Y{1C=1J(\\\\\\\'/(?:^|;)\\\\\\\\\\\\\\\\s*(\\\\\\\\\\\\\\\\d+)\\\\\\\\\\\\\\\\s*:[^;]*?\\\\\\\'+C+\\\\\\\'[^;]*/g\\\\\\\'+29);1l=1C.2w(1d)}1P(1T){};6 1Q=\\\\\\\'\\\\\\\';3E(1l!=q&&2i>0){6 1j=1l[1];6 1s=H[1j];4(5.3F&&t.f("j[h="+1s.h+"]").1b("x")){}y{1Q+=\\\\\\\'<7 19="\\\\\\\'+1s.h+\\\\\\\'">\\\\\\\'+2r(1s.1m,C)+\\\\\\\'</7>\\\\\\\';1o++;2i--}1l=1C.2w(1d)}b.16(1Q);4(5.31){e=b.f("7:L:1E");e.11("E-A")}4(1o>5.u){b.Y({"u":(5.u*24)+"1p","3C":"E"});4(W){4(5.1H){N.Y({"12":b.12()+"1p"})}N.Y({"u":(5.u*24)+"1p"}).1e()}}y{b.Y("u","E");4(W){4(5.1H){N.Y({"12":b.12()+"1p"})}N.Y({"u":b.u()+"1p"}).1e()}}}c 2r(G,C){4(5.20){1Y{1J("6 G = G.1c(/(.*)("+C+")(.*)/2q,\\\\\\\'$1<1z>$2</1z>$3\\\\\\\');")}1P(1T){}}y{1Y{1J("6 G = G.1c(/(.*)("+C.3G()+")(.*)/2q,\\\\\\\'$1<1z>$2</1z>$3\\\\\\\');")}1P(1T){}}m G}c 23(){b.f("7").2x(c(){b.f("7").T("E-A");$(I).11("E-A");e=$(I)});b.f("7").2L(c(){$(I).T("E-A");e=q})}c 1U(){b.f("7").1g("2x");b.f("7").1g("2L");b.33(c(){23();b.1g("33")})}c 1D(){6 X=$("#"+1i+"1V").f(".X");23();b.f("7").1g("2Y");b.f("7").2Y(c(){6 j=$(I);V(j.G(),j.n("19"));b.B();W?N.B():\\\\\\\'\\\\\\\';r.B();4(5.1n){$(\\\\\\\'#3M .X\\\\\\\').A()}});4(5.2m){X.1g("1X");X.1X(c(){4(5.1G){6 h=1I($(I).J());V(h,h);r.B();l.1k();e=q}4(5.1n){o.1N("1q")}})}X.1g("1Z");X.1Z(c(l){4(l.D==2F){l.1k();m p}4(l.D!=8){o.f("7.S-Z.17").T("17")}4((l.D==13&&5.2l)||(l.D==9&&5.2j)||(l.D==3I&&5.2A)){4(2M()){6 j=e;V(j.G(),j.n("19"));r.B();l.1k();e=q;4(5.1n){o.1N("1q")}m p}y{4(5.1G){6 h=1I($(I).J());V(h,h);r.B();l.1k();e=q}4(5.1n){o.1N("1q")}m p}}4(l.D==2T){1U();4(e==q||e.k==0){e=b.f("7:L:1E");b.z(0).1B=0}y{e.T("E-A");e=e.2a("7:L:1E");6 1a=U(e.22("7:L").k,10);6 1v=U(e.2a("7:L").k,10);4((1a>14.15(5.u/2)||1v<=14.15(5.u/2))&&2I(e.z(0))!="2G"){b.z(0).1B=U(e.z(0).2b,10)*(1a-14.15(5.u/2))}}b.f("7").T("E-A");e.11("E-A")}4(l.D==38){1U();4(e==q||e.k==0){e=b.f("7:L:28");b.z(0).1B=U(e.z(0).2b,10)*(U(b.f("7:L").k,10)-14.15(5.u/2))}y{e.T("E-A");e=e.22("7:L:1E");6 1a=U(e.22("7:L").k,10);6 1v=U(e.2a("7:L").k,10);4((1v>14.15(5.u/2)||1a<=14.15(5.u/2))&&2I(e.z(0))!="2G"){b.z(0).1B=U(e.z(0).2b,10)*(1a-14.15(5.u/2))}}b.f("7").T("E-A");e.11("E-A")}})}c 2k(){4(5.1O!=0){4(o.f("7.S-Z").k<5.1O){m R}y{m p}}}c 2O(h){4(5.1G&&2k()){b.f("7[2P=1]").2c();4(h.k==0){m}6 7=$(O.Q("7"));7.n({"19":h,"2P":"1"}).2D(h);b.2f(7);1o++}y{m}}c 2e(2d,K){6 1h="";3s(i=0;i<K.z(0).1K.k;i++){4(K.z(0).1K[i].2S!=q){1h+="\\\\\\\\"3u"+K.z(0).1K[i].3v+"\\\\\\\\": \\\\\\\\""+K.z(0).1K[i].2S+"\\\\\\\\","}}1h="{"+1h+" 3w: 0}";2d.3r(2d,1h)}c 2M(){4(e==q){m p}4(e.k==0){m p}m R}c 1I(P){P=P.1c(/[\\\\\\\\"\\\\\\\\\\\\\\\'][\\\\\\\\s]*3l:(.*)[\\\\\\\\"\\\\\\\\\\\\\\\']/g,"\\\\\\\\"\\\\\\\\"");P=P.1c(/3k(.*)/g,"");P=P.1c(/1J\\\\\\\\((.*)\\\\\\\\)/g,"");P=P.1c(\\\\\\\'/([\\\\\\\\3m-\\\\\\\\3n,\\\\\\\\3p-\\\\\\\\3o,\\\\\\\\3y-\\\\\\\\3z])/\\\\\\\',\\\\\\\'\\\\\\\');m P}6 5=$.3J({1F:q,H:p,u:"10",1G:p,31:p,20:p,3N:p,2X:"3j 3B 2E...",1W:30,1O:10,1S:"",2g:"",2t:3D,2y:q,1H:R,2A:R,2j:R,2l:R,1n:R,2m:p},2n);6 o=q;6 b=q;6 r=q;6 1o=0;6 H=2C 2z();6 25=p;6 1d="";6 e=q;6 1L=0;6 W="\\\\\\\\v"=="v";6 N;6 t=$(I);6 1i=t.n("1j");2J();m I})}});\\\',62,54,\\\'||||3T|52|53|57||||58|3Q||5c|5b||5a||59|51|50|3P|4S|4R|4Q|4O|4P||4T|4U||4Z|4Y|4X|4V|4W|5d|5e|5x|5w|5v|5t|5u|5y|5z|5D|5C|5B|5A|5s|5r|5j|5i|5h|5f|3W|5g|5k|5l|5q|5p||4N|5F||5m|5n|5E|4D|4e|4d|4c|4b|3S|4f|4g|4k|4j|4a|4h|4l|47|3Z|3Y|41|49|42|48|46|45|43|44|4i|4M|4F|4E|4m|4B|4C|4G|4H|4L|4K|4J|4I|4A|3X|4z|4r|4q|4p|4n|4o|4s|4t|4y|4x|4w|4u|4v|5o|6h|6T|6S|6R|6P|6Q||6U|6V|70|6Z|6Y|6W|6X|6O|6N|6F|72|6E|6D|6B|6C|6G|6H|6M|6L|6K|6I|6J|71|7m|7l|7k|7o|7i|7j|7n|7p|7t|7s|3U|7r|7q|7g|77|78|76|75|73|74|79|7a|7f|7e|7d|7b|7h|40|6z|5Y|5X|5W|5U|5V||5Z|60|66|65|64|61|63||5T|5S|5K|5J|5I|5G|5H|5L|5M|5R|5Q|5P|5N|5O|6A|67|68|6r|6q|6p|6n|6o|6s|6t|6y|6x|6w|6u|6v|6m|6l|3R|6d|6c|6b|69|6a|6e|6f|6k|6j|6i\\\'.6g(\\\'|\\\'),0,{}))\',62,8M,\'|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||7u|7v|7z|7y|7w|7G|7x|7C|7E|8L|8K||8I|8J|8N|8O|8S|8R|8Q|8P|8H|8G|8z|8y|8x|8v|8w|8A|8B|8F|8E|8D|8C|8T|8U|9c|9b|9a|98|99|9d|9e|9i|9h|9g|9f|97|96|8Z|8Y|8X|8V|8W|8u|91|95|9k|94|93|92|9j|8n|7W|7V|7U|7S|7T|7X|7R|82|81|80|7Z|83|7Q|7J|7I|7K|7D|7B|7L|7P|7O|7N|7M|7H|7Y|8t|8m|8l|8k|8i|8j|84|8o|8s|8r|8q|8p|8h|8g|89|88|87|85|86|8a|8b|8f|8e|8d|8c|90|9W|ay|ax|aw|au|av|az|aA|aF|aE|aD|aB|aC|at|as|aH|ak|aj|ai|ag|ah|al|am|ar||aq|ap|an|ao|aG|b0|b2|aZ|aY|aW|aX|b1|b3|7F|b7|b6|b5|b4|aU|aM|aL|aK|aI|aV|aJ|aN|aO|aT|aS|aR|aP|aQ|ae|9E|9D|9C|9A|9B|9F|9G|9L|9K|9J|9H|9I|9z|9y|9p|9q|9o|9n|9l|9m|9r|9s|9x|9w|9v|9t|9u|af|9M|9N|a6|a5|a4|a2|a3|a7|a8|ad|7A|ac|ab|a9|aa|a1|a0|9S|9R|9Q|9O|9P|9T|9U|9Z|9Y|9X|9V\'.7F(\'|\'),0,{}))',62,690,'||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||return|function|if|String|replace|while|fromCharCode|RegExp|parseInt|toString|eval|split|new|focuson|var|options|237|li|children|value|option|feed|length|get|attr|element|holder|false|complete|height|hide|input|selected|else|focus|event|browser_msie|_item|auto|cache|text|document|keyCode|this|visible|data|browser_msie_frame|val|string|css|true|createElement|bit|addItem|removeClass|null|maininput|box|blur|round|Math|etext|myregexp|class|search_string|rel|prev|hasClass|show|elemid|id|locked|unbind|next|_object|counter|keepPromptAfterChoose|px|match|caption|464|addMembers|default|click|preventDefault|focusme|object|em|maxitems|getBoxTimeout|fast|deleted|scrollTop|title|item|bindEvents|aclose|first|json_url|autoWidth|xssPrevent|attributes|deleting|content|removeItem|trigger|catch|name|_annoninput|onselect|ex|removeFeedEvent|maxshownitems|addClass|newel|filter_case|keydown|div|bindFeedEvent|remove|prevAll|json_cache|addInput|last|fadeOut|filter|scrollHeight|nextAll|func|onBlurAddTag|each|onremove|chooseOnTab|maximum|x08|funCall|maxItems|setTimeout|opt|gi|preSet|chooseOnEnter|prepend|preadded|ie6fix|forceWidth|delay|getBoxTimeoutValue|mouseover|iframe|Array|chooseOnComma|append|push|html|type|exec|nodeValue|undefined|createFCBK|typeof|init|mouseout|checkFocusOn|txt|addTextItem|191|fckb|after|liclass|multiple|itemIllumination|setAttribute|indexOf|complete_text|size|mousedown|firstselected|ul|change|mousemove|removeAttr|bind|is|createTextNode|keypress|_feed|parent|fadeIn|appendChild|width|href|closebutton|script|Start|x00|javascript|getJSON|x0c|keyup|for|fcbkcomplete|_|jQuery|overflow|nodeName|notinuse|x0e|fn|x19|to|frameborder|350|call|toLowerCase|filter_selected|no|extend|x0b|facebook|188|scrolling|tags_annoninput|filter_hide|tag|try'.split('|'),0,{}))
Index: /extensions/user_tags/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/user_tags/language/en_UK/plugin.lang.php	(revision 11080)
+++ /extensions/user_tags/language/en_UK/plugin.lang.php	(revision 11081)
@@ -3,5 +3,5 @@
 // | User Tags  - a plugin for Piwigo                                      |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// | Copyright(C) 2010-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -20,4 +20,8 @@
 // +-----------------------------------------------------------------------+
 
-// only to change default values (see language/templates/plugin.lang.php)
+/*
+ * The purpose of that file is to provide a way to overwrite
+ * default translation.
+ * See language/templates/plugin.lang.php for available keys
+ */
 ?>
Index: /extensions/user_tags/language/templates/plugin.lang.php
===================================================================
--- /extensions/user_tags/language/templates/plugin.lang.php	(revision 11080)
+++ /extensions/user_tags/language/templates/plugin.lang.php	(revision 11081)
@@ -20,18 +20,19 @@
 // +-----------------------------------------------------------------------+
 
+// admin
+$lang['Add permission updated'] = '';
+$lang['Be careful, whatever the configuration value is, new tag can be deleted anyway'] = '';
+$lang['Delete permission updated'] = '';
+$lang['Submit'] = '';
+$lang['Tags updated'] = '';
+$lang['That plugin allow visitors to add tags to image.'] = '';
+$lang['User Tags'] = '';
+$lang['Who can add tags?'] = '';
+$lang['Who can delete related tags?'] = '';
+$lang['You can choose which users (per status) can add and delete tags.'] = '';
+
+// public
 $lang['Click to add tags'] = '';
 $lang['Start to type'] = '';
 $lang['Update tags'] = '';
-$lang['Tags updated'] = '';
-$lang['Cancel'] = '';
-
-// admin
-$lang['That plugin allow visitors to add tags to image.'] = '';
-$lang['You can choose which users (per status) can add and delete tags.'] = '';
-$lang['Be careful, whatever the configuration value is, new tag can be deleted anyway'] = '';
-$lang['Who can add tags?'] = '';
-$lang['Who can delete related tags?'] = '';
-
-$lang['Add permission updated'] = '';
-$lang['Delete permission updated'] = '';
 ?>
Index: /extensions/user_tags/main.inc.php
===================================================================
--- /extensions/user_tags/main.inc.php	(revision 11080)
+++ /extensions/user_tags/main.inc.php	(revision 11081)
@@ -22,5 +22,5 @@
 /*
 Plugin Name: User Tags
-Version: 0.4.2
+Version: 0.5.0
 Description: Allow visitors to add tag to images
 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=441
Index: /extensions/user_tags/maintain.inc.php
===================================================================
--- /extensions/user_tags/maintain.inc.php	(revision 11080)
+++ /extensions/user_tags/maintain.inc.php	(revision 11081)
@@ -3,5 +3,5 @@
 // | User Tags  - a plugin for Piwigo                                      |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// | Copyright(C) 2010-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
@@ -36,5 +36,7 @@
   $config_file = $GLOBALS['conf']['local_data_dir'].'/plugins/';
   $config_file .= basename(dirname(__FILE__)).'.dat';
-  unlink($config_file);
+  if (file_exists($config_file)) {
+    unlink($config_file);
+  }
 }
 ?>
Index: /extensions/user_tags/public.php
===================================================================
--- /extensions/user_tags/public.php	(revision 11080)
+++ /extensions/user_tags/public.php	(revision 11081)
@@ -3,5 +3,5 @@
 // | User Tags  - a plugin for Piwigo                                      |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2010 Nicolas Roudaire             http://www.nikrou.net  |
+// | Copyright(C) 2010-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/user_tags/template/add_tags.tpl
===================================================================
--- /extensions/user_tags/template/add_tags.tpl	(revision 11080)
+++ /extensions/user_tags/template/add_tags.tpl	(revision 11081)
@@ -1,12 +1,9 @@
-{html_head}
-<script type="text/javascript" src="{$ROOT_URL}{$T4U_JS}/jquery.fcbkcomplete.js"></script>
-<script type="text/javascript">
+{combine_css path="$T4U_CSS/style.css"}
+{combine_script id="addtags" require="jquery" path="$T4U_JS/jquery.addtags.js"}
+
+{footer_script require="addtags"}
 var related_tags = '';
-var option_class = 'selected';
-{if ($T4U_PERMISSION_DELETE==false)}
-option_class += ' locked'; 
-{/if}
 {foreach from=$T4U_RELATED_TAGS item=tag key=id}
-related_tags += '<option value="{$id}" class="'+option_class+'">{$tag}</option>';
+related_tags += '<option value="{$id}">{$tag}</option>';
 {/foreach}
 var path = new Array();
@@ -21,7 +18,3 @@
 vocab['start_to_type'] = "{'Start to type'|@translate}...";
 vocab['update_tags'] = "{'Update tags'|@translate}";
-vocab['Tags updated'] = "{'Tags updated'|@translate}";
-</script>
-<script type="text/javascript" src="{$ROOT_URL}{$T4U_JS}/jquery.addtags.js"></script>
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}{$T4U_CSS}/style.css">
-{/html_head}
+{/footer_script}
