Index: /extensions/typetags/admin.php
===================================================================
--- /extensions/typetags/admin.php	(revision 9829)
+++ /extensions/typetags/admin.php	(revision 9829)
@@ -0,0 +1,318 @@
+<?php
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+load_language('plugin.lang', typetags_PATH);
+
+function get_color_text($color)
+{
+  if (strlen($color) == 7)
+  {
+    $rgb[] = hexdec(substr($color, 1, 2))/255;
+    $rgb[] = hexdec(substr($color, 3, 2))/255;
+    $rgb[] = hexdec(substr($color, 5, 2))/255;
+  }
+  elseif (strlen($color) == 4)
+  {
+    $rgb[] = hexdec(substr($color, 1, 1))/15;
+    $rgb[] = hexdec(substr($color, 2, 1))/15;
+    $rgb[] = hexdec(substr($color, 3, 1))/15;
+  }
+  $l = (min($rgb) + max($rgb)) / 2;
+  return $l > 0.45 ? '#000' : '#fff';
+}
+
+// +-----------------------------------------------------------------------+
+// |                                edit typetags                          |
+// +-----------------------------------------------------------------------+
+
+if (isset($_POST['submit']) and !is_adviser())
+{
+  $typetag = mysql_escape_string($_POST['edited_typetag']);
+  $typetag_name = mysql_escape_string($_POST['typetag_name']);
+  $typetag_color = mysql_escape_string($_POST['typetag_color']);
+
+  $existing_names = array();
+  
+  $query = '
+SELECT id, name, color
+  FROM '.typetags_TABLE.'
+;';
+  $result = pwg_query($query);
+  while ($row = mysql_fetch_array($result))
+  {
+    array_push($existing_names, $row['name']);
+    if ($typetag == $row['id'])
+    {
+      $current_name = $row['name'];
+      $current_color = $row['color'];
+    }
+  }
+  
+  // we must not rename typetag with an already existing name
+  if ($typetag_name != $current_name and in_array($typetag_name, $existing_names))
+  {
+    array_push($page['errors'], l10n('typetags_already exists'));
+
+    $edited_typetag = array(
+      'id' => $typetag,
+      'name' => $typetag_name,
+      'color' => $typetag_color);
+  }
+  else
+  {
+    array_push($page['infos'], l10n('typetags_saved'));
+
+    mass_updates(typetags_TABLE,
+      array(
+        'primary' => array('id'),
+        'update' => array('name', 'color')),
+      array(
+        array(
+          'id' => $typetag,
+          'name' => $typetag_name,
+          'color' => $typetag_color)));
+  }
+}
+
+// +-----------------------------------------------------------------------+
+// |                               delete typetags                             |
+// +-----------------------------------------------------------------------+
+
+if (isset($_POST['deletetypetag']) and isset($_POST['typetags']) and !is_adviser())
+{
+  $query = '
+SELECT name
+  FROM '.typetags_TABLE.'
+  WHERE id IN ('.implode(',', $_POST['typetags']).')
+;';
+  $typetag_names = array_from_query($query, 'name');
+  
+  $query = ' UPDATE '. TAGS_TABLE .'
+      SET id_typetags =  NULL
+      WHERE id_typetags IN ('.implode(',', $_POST['typetags']).')
+         ;';
+ pwg_query($query);   
+
+  $query = '
+  DELETE
+  FROM '.typetags_TABLE.'
+  WHERE id IN ('.implode(',', $_POST['typetags']).')
+;';
+  pwg_query($query);
+  
+  array_push($page['infos'],
+    l10n_dec('typetag_suppr', 'typetags_suppr', count($typetag_names))
+    .' : '.implode(', ', $typetag_names)
+  );
+}
+
+// +-----------------------------------------------------------------------+
+// |                               add a typetag                           |
+// +-----------------------------------------------------------------------+
+
+if (isset($_POST['addtypetag']) and (empty($_POST['add_typetag']) or empty ($_POST['hexval'])))
+{
+  array_push($page['errors'], l10n('typetags_error'));
+  
+  $template->assign('typetag', array(
+    'NAME' => isset($_POST['add_typetag']) ? $_POST['add_typetag'] : '',
+    'COLOR' => isset($_POST['hexval']) ? $_POST['hexval'] : ''));
+}
+elseif (isset($_POST['addtypetag']) and !empty($_POST['add_typetag']) and !empty ($_POST['hexval']) and !is_adviser())
+{
+  $typetag_name = $_POST['add_typetag'];
+  $typetag_color = $_POST['hexval'];
+
+  // does the tag already exists?
+  $query = '
+SELECT id
+  FROM '.typetags_TABLE.'
+  WHERE name = \''.$typetag_name.'\'
+;';
+  $existing_tags = array_from_query($query, 'id');
+
+  if (count($existing_tags) == 0)
+  {
+    mass_inserts(
+      typetags_TABLE,
+      array('name', 'color'),
+      array(
+        array(
+          'name' => $typetag_name,
+          'color' => $typetag_color,
+          )
+        )
+      );
+    
+    array_push($page['infos'], l10n('typetags_saved'));
+  }
+  else
+  {
+    array_push($page['errors'],l10n('typetags_already exists'));
+
+    $template->assign('typetag', array(
+      'NAME' => $typetag_name,
+      'COLOR' => $typetag_color));
+  }
+}
+elseif (isset($_POST['add']) and !is_adviser())
+{ 
+  array_push($page['errors'], l10n('typetags_error'));
+}
+
+// +-----------------------------------------------------------------------+
+// |                           Associate Tag to Typetage                   |
+// +-----------------------------------------------------------------------+
+
+		
+if (isset($_POST['associate']) AND !empty($_POST['assoc_tags']) AND ($_POST['typetaglist'] != 0))
+{
+  $typetag_id = $_POST['typetaglist'];
+
+  $query = ' UPDATE '. TAGS_TABLE .'
+      SET id_typetags = '. $typetag_id .'
+       WHERE id IN ('.implode(',', $_POST['assoc_tags']).')
+         ;';
+ pwg_query($query);   
+    
+    array_push(
+      $page['infos'],
+      sprintf(
+        l10n('typetags_associated'),
+        stripslashes($typetag_id)
+        )
+      );
+}
+elseif (isset($_POST['associate']) and !is_adviser())
+{ 
+  array_push($page['errors'], l10n('error_associate'));
+}
+
+// +-----------------------------------------------------------------------+
+// |                           Dissociate Tag to Typetage                  |
+// +-----------------------------------------------------------------------+
+
+if (isset($_POST['dissociate']) AND !empty($_POST['dissoc_tags']) and !is_adviser())
+{
+  $associated_tag_id = implode(',', $_POST['dissoc_tags']);
+
+ $query = ' UPDATE '. TAGS_TABLE .'
+          SET id_typetags = NULL
+          WHERE id IN (' . $associated_tag_id . ')
+          ;';
+   pwg_query($query);
+
+ 
+    array_push($page['infos'],
+      sprintf(l10n('typetags_dissociated'),
+        stripslashes($associated_tag_id )
+        )
+      );
+}
+elseif (isset($_POST['dissociate']) and !is_adviser())
+{ 
+  array_push($page['errors'], l10n('error_dissociate'));
+}
+
+// +-----------------------------------------------------------------------+
+// |                             template init                             |
+// +-----------------------------------------------------------------------+
+
+$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/admin/typetags_admin.tpl'));
+
+//Recupere les tags associés
+$query = '
+  SELECT t.id , t.name, tt.color
+	  FROM ' . TAGS_TABLE . ' as t
+	  INNER JOIN ' .typetags_TABLE. ' as tt
+	  ON  t.id_typetags = tt.id
+	  WHERE t.id_typetags is NOT NULL
+	  ORDER by t.id';
+$result = pwg_query($query);
+
+$tags = array();
+
+while ($row = mysql_fetch_assoc($result))
+{
+  array_push($tags, $row);		
+}
+
+usort($tags, 'name_compare');
+$template->assign('typetags_dissociation', $tags);
+
+// Récupère tous les tags
+$query = '
+	SELECT t.id , t.name, tt.color
+	  FROM ' . TAGS_TABLE . ' as t 
+		LEFT JOIN ' .typetags_TABLE.' as tt
+		ON  t.id_typetags = tt.id';
+$result = pwg_query($query);
+
+$tags = array();
+
+while ($row = mysql_fetch_assoc($result))
+{
+  array_push($tags, $row);		
+}
+
+usort($tags, 'name_compare');
+$template->assign('typetags_association', $tags);
+
+// +-----------------------------------------------------------------------+
+// |                             form creation                             |
+// +-----------------------------------------------------------------------+
+
+$query = 'SELECT * FROM '.typetags_TABLE.';';
+$result = pwg_query($query);
+$typetags = array();
+while ($row = mysql_fetch_assoc($result))
+{
+  $row['color_text'] = get_color_text($row['color']);
+  array_push($typetags, $row);
+}
+
+usort($typetags, 'name_compare');
+
+$template->assign('typetags_selection', $typetags);
+
+if (isset($_POST['edittypetag']) and isset($_POST['typetags']))
+{
+  if (count($_POST['typetags']) > 1)
+  {
+    array_push($page['errors'], l10n('You should select only one Typetag to edit.'));
+  }
+  else
+  {
+    $edited_typetag['id'] = $_POST['typetags'][0];
+  }
+}
+if (isset($edited_typetag))
+{
+  $template->assign('edited_typetag', $edited_typetag['id']);
+
+  $query = '
+    SELECT id, name, color
+    FROM '.typetags_TABLE.'
+    WHERE id = '.$edited_typetag['id'].'
+    ;';
+  $result = pwg_query($query);
+  while ($row = mysql_fetch_array($result))
+  {
+    $template->assign('typetag',
+      array(
+        'ID' => $row['id'],
+        'OLD_NAME' => $row['name'],
+        'OLD_COLOR' => $row['color'],
+        'COLOR_TEXT' => get_color_text($row['color']),
+        'NAME' => isset($edited_typetag['name']) ? $edited_typetag['name'] : $row['name'],
+        'COLOR'=> isset($edited_typetag['color']) ? $edited_typetag['color'] : $row['color']));
+  }
+}
+
+// +-----------------------------------------------------------------------+
+// |                           sending html code                           |
+// +-----------------------------------------------------------------------+
+
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+
+?>
Index: tensions/typetags/admin/admin.php
===================================================================
--- /extensions/typetags/admin/admin.php	(revision 9828)
+++ 	(revision )
@@ -1,318 +1,0 @@
-<?php
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-load_language('plugin.lang', typetags_PATH);
-
-function get_color_text($color)
-{
-  if (strlen($color) == 7)
-  {
-    $rgb[] = hexdec(substr($color, 1, 2))/255;
-    $rgb[] = hexdec(substr($color, 3, 2))/255;
-    $rgb[] = hexdec(substr($color, 5, 2))/255;
-  }
-  elseif (strlen($color) == 4)
-  {
-    $rgb[] = hexdec(substr($color, 1, 1))/15;
-    $rgb[] = hexdec(substr($color, 2, 1))/15;
-    $rgb[] = hexdec(substr($color, 3, 1))/15;
-  }
-  $l = (min($rgb) + max($rgb)) / 2;
-  return $l > 0.45 ? '#000' : '#fff';
-}
-
-// +-----------------------------------------------------------------------+
-// |                                edit typetags                          |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit']) and !is_adviser())
-{
-  $typetag = mysql_escape_string($_POST['edited_typetag']);
-  $typetag_name = mysql_escape_string($_POST['typetag_name']);
-  $typetag_color = mysql_escape_string($_POST['typetag_color']);
-
-  $existing_names = array();
-  
-  $query = '
-SELECT id, name, color
-  FROM '.typetags_TABLE.'
-;';
-  $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
-  {
-    array_push($existing_names, $row['name']);
-    if ($typetag == $row['id'])
-    {
-      $current_name = $row['name'];
-      $current_color = $row['color'];
-    }
-  }
-  
-  // we must not rename typetag with an already existing name
-  if ($typetag_name != $current_name and in_array($typetag_name, $existing_names))
-  {
-    array_push($page['errors'], l10n('typetags_already exists'));
-
-    $edited_typetag = array(
-      'id' => $typetag,
-      'name' => $typetag_name,
-      'color' => $typetag_color);
-  }
-  else
-  {
-    array_push($page['infos'], l10n('typetags_saved'));
-
-    mass_updates(typetags_TABLE,
-      array(
-        'primary' => array('id'),
-        'update' => array('name', 'color')),
-      array(
-        array(
-          'id' => $typetag,
-          'name' => $typetag_name,
-          'color' => $typetag_color)));
-  }
-}
-
-// +-----------------------------------------------------------------------+
-// |                               delete typetags                             |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['deletetypetag']) and isset($_POST['typetags']) and !is_adviser())
-{
-  $query = '
-SELECT name
-  FROM '.typetags_TABLE.'
-  WHERE id IN ('.implode(',', $_POST['typetags']).')
-;';
-  $typetag_names = array_from_query($query, 'name');
-  
-  $query = ' UPDATE '. TAGS_TABLE .'
-      SET id_typetags =  NULL
-      WHERE id_typetags IN ('.implode(',', $_POST['typetags']).')
-         ;';
- pwg_query($query);   
-
-  $query = '
-  DELETE
-  FROM '.typetags_TABLE.'
-  WHERE id IN ('.implode(',', $_POST['typetags']).')
-;';
-  pwg_query($query);
-  
-  array_push($page['infos'],
-    l10n_dec('typetag_suppr', 'typetags_suppr', count($typetag_names))
-    .' : '.implode(', ', $typetag_names)
-  );
-}
-
-// +-----------------------------------------------------------------------+
-// |                               add a typetag                           |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['addtypetag']) and (empty($_POST['add_typetag']) or empty ($_POST['hexval'])))
-{
-  array_push($page['errors'], l10n('typetags_error'));
-  
-  $template->assign('typetag', array(
-    'NAME' => isset($_POST['add_typetag']) ? $_POST['add_typetag'] : '',
-    'COLOR' => isset($_POST['hexval']) ? $_POST['hexval'] : ''));
-}
-elseif (isset($_POST['addtypetag']) and !empty($_POST['add_typetag']) and !empty ($_POST['hexval']) and !is_adviser())
-{
-  $typetag_name = $_POST['add_typetag'];
-  $typetag_color = $_POST['hexval'];
-
-  // does the tag already exists?
-  $query = '
-SELECT id
-  FROM '.typetags_TABLE.'
-  WHERE name = \''.$typetag_name.'\'
-;';
-  $existing_tags = array_from_query($query, 'id');
-
-  if (count($existing_tags) == 0)
-  {
-    mass_inserts(
-      typetags_TABLE,
-      array('name', 'color'),
-      array(
-        array(
-          'name' => $typetag_name,
-          'color' => $typetag_color,
-          )
-        )
-      );
-    
-    array_push($page['infos'], l10n('typetags_saved'));
-  }
-  else
-  {
-    array_push($page['errors'],l10n('typetags_already exists'));
-
-    $template->assign('typetag', array(
-      'NAME' => $typetag_name,
-      'COLOR' => $typetag_color));
-  }
-}
-elseif (isset($_POST['add']) and !is_adviser())
-{ 
-  array_push($page['errors'], l10n('typetags_error'));
-}
-
-// +-----------------------------------------------------------------------+
-// |                           Associate Tag to Typetage                   |
-// +-----------------------------------------------------------------------+
-
-		
-if (isset($_POST['associate']) AND !empty($_POST['assoc_tags']) AND ($_POST['typetaglist'] != 0))
-{
-  $typetag_id = $_POST['typetaglist'];
-
-  $query = ' UPDATE '. TAGS_TABLE .'
-      SET id_typetags = '. $typetag_id .'
-       WHERE id IN ('.implode(',', $_POST['assoc_tags']).')
-         ;';
- pwg_query($query);   
-    
-    array_push(
-      $page['infos'],
-      sprintf(
-        l10n('typetags_associated'),
-        stripslashes($typetag_id)
-        )
-      );
-}
-elseif (isset($_POST['associate']) and !is_adviser())
-{ 
-  array_push($page['errors'], l10n('error_associate'));
-}
-
-// +-----------------------------------------------------------------------+
-// |                           Dissociate Tag to Typetage                  |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['dissociate']) AND !empty($_POST['dissoc_tags']) and !is_adviser())
-{
-  $associated_tag_id = implode(',', $_POST['dissoc_tags']);
-
- $query = ' UPDATE '. TAGS_TABLE .'
-          SET id_typetags = NULL
-          WHERE id IN (' . $associated_tag_id . ')
-          ;';
-   pwg_query($query);
-
- 
-    array_push($page['infos'],
-      sprintf(l10n('typetags_dissociated'),
-        stripslashes($associated_tag_id )
-        )
-      );
-}
-elseif (isset($_POST['dissociate']) and !is_adviser())
-{ 
-  array_push($page['errors'], l10n('error_dissociate'));
-}
-
-// +-----------------------------------------------------------------------+
-// |                             template init                             |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/typetags_admin.tpl'));
-
-//Recupere les tags associés
-$query = '
-  SELECT t.id , t.name, tt.color
-	  FROM ' . TAGS_TABLE . ' as t
-	  INNER JOIN ' .typetags_TABLE. ' as tt
-	  ON  t.id_typetags = tt.id
-	  WHERE t.id_typetags is NOT NULL
-	  ORDER by t.id';
-$result = pwg_query($query);
-
-$tags = array();
-
-while ($row = mysql_fetch_assoc($result))
-{
-  array_push($tags, $row);		
-}
-
-usort($tags, 'name_compare');
-$template->assign('typetags_dissociation', $tags);
-
-// Récupère tous les tags
-$query = '
-	SELECT t.id , t.name, tt.color
-	  FROM ' . TAGS_TABLE . ' as t 
-		LEFT JOIN ' .typetags_TABLE.' as tt
-		ON  t.id_typetags = tt.id';
-$result = pwg_query($query);
-
-$tags = array();
-
-while ($row = mysql_fetch_assoc($result))
-{
-  array_push($tags, $row);		
-}
-
-usort($tags, 'name_compare');
-$template->assign('typetags_association', $tags);
-
-// +-----------------------------------------------------------------------+
-// |                             form creation                             |
-// +-----------------------------------------------------------------------+
-
-$query = 'SELECT * FROM '.typetags_TABLE.';';
-$result = pwg_query($query);
-$typetags = array();
-while ($row = mysql_fetch_assoc($result))
-{
-  $row['color_text'] = get_color_text($row['color']);
-  array_push($typetags, $row);
-}
-
-usort($typetags, 'name_compare');
-
-$template->assign('typetags_selection', $typetags);
-
-if (isset($_POST['edittypetag']) and isset($_POST['typetags']))
-{
-  if (count($_POST['typetags']) > 1)
-  {
-    array_push($page['errors'], l10n('You should select only one Typetag to edit.'));
-  }
-  else
-  {
-    $edited_typetag['id'] = $_POST['typetags'][0];
-  }
-}
-if (isset($edited_typetag))
-{
-  $template->assign('edited_typetag', $edited_typetag['id']);
-
-  $query = '
-    SELECT id, name, color
-    FROM '.typetags_TABLE.'
-    WHERE id = '.$edited_typetag['id'].'
-    ;';
-  $result = pwg_query($query);
-  while ($row = mysql_fetch_array($result))
-  {
-    $template->assign('typetag',
-      array(
-        'ID' => $row['id'],
-        'OLD_NAME' => $row['name'],
-        'OLD_COLOR' => $row['color'],
-        'COLOR_TEXT' => get_color_text($row['color']),
-        'NAME' => isset($edited_typetag['name']) ? $edited_typetag['name'] : $row['name'],
-        'COLOR'=> isset($edited_typetag['color']) ? $edited_typetag['color'] : $row['color']));
-  }
-}
-
-// +-----------------------------------------------------------------------+
-// |                           sending html code                           |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
-
-?>
Index: tensions/typetags/admin/farbtastic/CHANGELOG.html
===================================================================
--- /extensions/typetags/admin/farbtastic/CHANGELOG.html	(revision 9828)
+++ 	(revision )
@@ -1,26 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head><title>Farbtastic: Changelog</title></head>
-<body>
-  <h1 class="title">Farbtastic: Changelog</h1>
-
-    <h2>1.2 - 2007/01/08</h2>
-    <ul>
-      <li>Fixed bug with linking multiple fields with the same value.</li>
-    </ul>
-    <h2>1.1 - 2006/10/27</h2>
-    <ul>
-      <li>Work around for the transparent PNGs in Internet Explorer.</li>
-      <li>Better mouse handling code to accomodate CSS-based layouts better.</li>
-    </ul>
-    <h2>1.0 - 2006/07/14</h2>
-    <ul>
-      <li>Initial release.</li>
-    </ul>
-
-    <p>More info on <a href="http://www.acko.net/dev/farbtastic">Acko.net</a>.</p>
-    <p>Created by <a href="http://www.acko.net/">Steven Wittens</a>.</p>
-
-</body>
-</html>
Index: tensions/typetags/admin/farbtastic/README.html
===================================================================
--- /extensions/typetags/admin/farbtastic/README.html	(revision 9828)
+++ 	(revision )
@@ -1,71 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head><title>Farbtastic: jQuery color picker plug-in</title></head>
-<body>
-        <h1 class="title">Farbtastic: jQuery color picker plug-in</h1>
-    <div class="content"><p>Farbtastic is a <a href="http://www.jquery.com/">jQuery</a> plug-in that can add one or more color picker widgets into a page. Each widget is then linked to an existing element (e.g. a text field) and will update the element's value when a color is selected.</p>
-
-<p>Farbtastic uses layered transparent PNGs to render a saturation/luminance gradient inside of a hue circle. No Flash or pixel-sized divs are used.</p>
-
-<p>Farbtastic was written by <a href="http://www.acko.net/dev/farbtastic">Steven Wittens</a> and is licensed under the GPL.</p>
-
-<h2>Basic Usage</h2>
-<ol>
-<li>Include farbtastic.js and farbtastic.css in your HTML:<br />
-<div class="codeblock"><code>&lt;script type=&quot;text/javascript&quot; src=&quot;farbtastic.js&quot;&gt;&lt;/script&gt;<br />&lt;link rel=&quot;stylesheet&quot; href=&quot;farbtastic.css&quot; type=&quot;text/css&quot; /&gt;</code></div>
-</li>
-<li>Add a placeholder div and a text field to your HTML, and give each an ID:<br />
-<div class="codeblock"><code>&lt;form&gt;&lt;input type=&quot;text&quot; id=&quot;color&quot; name=&quot;color&quot; value=&quot;#123456&quot; /&gt;&lt;/form&gt;<br />&lt;div id=&quot;colorpicker&quot;&gt;&lt;/div&gt;</code></div>
-</li>
-<li>Add a ready() handler to the document which initializes the color picker and link it to the text field with the following syntax:<br />
-<div class="codeblock"><code>&lt;script type=&quot;text/javascript&quot;&gt;<br />&nbsp; $(document).ready(function() {<br />&nbsp; &nbsp; $(&#039;#colorpicker&#039;).farbtastic(&#039;#color&#039;);<br />&nbsp; });<br />&lt;/script&gt;</code></div>
-</li>
-</ol>
-<p>See demo1.html and demo2.html for an example (jquery.js is not included!).</p>
-<h2>Styling</h2>
-<p>The color picker is a block-level element and is 195x195 pixels large. You can control the position by styling your placeholder (e.g. floating it).</p>
-<p>Note that the black/white gradients inside wheel.png and mask.png were generated programmatically and cannot be recreated easily in an image editing program.</p>
-<h2>Advanced Usage</h2>
-<h3>jQuery Method</h3>
-<dl>
-<dt>$(...).farbtastic()<br />
-$(...).farbtastic(callback)</dt>
-<dd>This creates color pickers in the selected objects. <code>callback</code> is optional and can be a:</p>
-<ul>
-<li><em>DOM Node</em>, <em>jQuery object</em> or <em>jQuery selector</em>: the color picker will be linked to the selected element(s) by syncing the value (for form elements) and color (all elements).</li>
-<li><em>Function</em>: this function will be called whenever the user chooses a different color.</dd>
-</dl>
-<h3>Object</h3>
-<dl>
-<dt>$.farbtastic(placeholder)<br />
-$.farbtastic(placeholder, callback)<br />
-</dt>
-<dd>Invoking <code>$.farbtastic(placeholder)</code> is the same as using <code>$(placeholder).farbtastic()</code> except that the Farbtastic object is returned instead of the jQuery object. This allows you to use the Farbtastic methods and properties below.</p>
-<p>Note that there is only one Farbtastic object per placeholder. If you call <code>$.farbtastic(placeholder)</code> twice <em>with the same placeholder</em>, you will get the same object back each time.</p>
-<p>The optional <code>callback</code> argument behaves exactly as for the jQuery method.<br />
-</dd>
-</dl>
-</dd>
-</dl>
-<h3>Methods</h3>
-<dl>
-<dt>.linkTo(callback)</dt>
-<dd>Allows you to set a new callback. Any existing callbacks are removed. See above for the meaning of <code>callback</code>.</dd>
-<dt>.setColor(string)</dt>
-<dd>Sets the picker color to the given color in hex representation.</dd>
-<dt>.setColor([h, s, l])</dt>
-<dd>Sets the picker color to the given color in normalized HSL (0..1 scale).</dd>
-</dl>
-<h3>Properties</h3>
-<dl>
-<dt>.linked</dt>
-<dd>The elements (jQuery object) or callback function this picker is linked to.</dd>
-<dt>.color</dt>
-<dd>Current color in hex representation.</dd>
-<dt>.hsl</dt>
-<dd>Current color in normalized HSL.</dd>
-</dl>
-</div>
-</body>
-</html>
Index: tensions/typetags/admin/farbtastic/demo1.html
===================================================================
--- /extensions/typetags/admin/farbtastic/demo1.html	(revision 9828)
+++ 	(revision )
@@ -1,28 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
- <title>Farbtastic</title>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="farbtastic.js"></script>
- <link rel="stylesheet" href="farbtastic.css" type="text/css" />
- <script type="text/javascript" charset="utf-8">
-  $(document).ready(function() {
-    $('#demo').hide();
-    $('#picker').farbtastic('#color');
-  });
- </script>
-</head>
-<body>
-<h1>jQuery Color Picker: Farbtastic</h1>
-
-<div id="demo" style="color: red; font-size: 1.4em">jQuery.js is not present. You must install jQuery in this folder for the demo to work.</div>
-
-<form action="" style="width: 400px;">
-  <div class="form-item"><label for="color">Color:</label><input type="text" id="color" name="color" value="#123456" /></div><div id="picker"></div>
-</form>
-
-<p>More info on <a href="http://www.acko.net/dev/farbtastic">Acko.net</a>.</p>
-<p>Created by <a href="http://www.acko.net/">Steven Wittens</a>.</p>
-</body>
-</html>
Index: tensions/typetags/admin/farbtastic/demo2.html
===================================================================
--- /extensions/typetags/admin/farbtastic/demo2.html	(revision 9828)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
- <title>Farbtastic</title>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="farbtastic.js"></script>
- <link rel="stylesheet" href="farbtastic.css" type="text/css" />
- <style type="text/css" media="screen">
-   .colorwell {
-     border: 2px solid #fff;
-     width: 6em;
-     text-align: center;
-     cursor: pointer;
-   }
-   body .colorwell-selected {
-     border: 2px solid #000;
-     font-weight: bold;
-   }
- </style>
- 
- <script type="text/javascript" charset="utf-8">
-  $(document).ready(function() {
-    $('#demo').hide();
-    var f = $.farbtastic('#picker');
-    var p = $('#picker').css('opacity', 0.25);
-    var selected;
-    $('.colorwell')
-      .each(function () { f.linkTo(this); $(this).css('opacity', 0.75); })
-      .focus(function() {
-        if (selected) {
-          $(selected).css('opacity', 0.75).removeClass('colorwell-selected');
-        }
-        f.linkTo(this);
-        p.css('opacity', 1);
-        $(selected = this).css('opacity', 1).addClass('colorwell-selected');
-      });
-  });
- </script>
-</head>
-<body>
-<h1>jQuery Color Picker: Farbtastic</h1>
-
-<div id="demo" style="color: red; font-size: 1.4em">jQuery.js is not present. You must install jQuery in this folder for the demo to work.</div>
-
-<form action="" style="width: 500px;">
-  <div id="picker" style="float: right;"></div>
-  <div class="form-item"><label for="color1">Color 1:</label><input type="text" id="color1" name="color1" class="colorwell" value="#123456" /></div>
-  <div class="form-item"><label for="color2">Color 2:</label><input type="text" id="color2" name="color2" class="colorwell" value="#123456" /></div>
-  <div class="form-item"><label for="color3">Color 3:</label><input type="text" id="color3" name="color3" class="colorwell" value="#123456" /></div>
-  
-</form>
-
-<p>More info on <a href="http://www.acko.net/dev/farbtastic">Acko.net</a>.</p>
-<p>Created by <a href="http://www.acko.net/">Steven Wittens</a>.</p>
-</body>
-</html>
Index: tensions/typetags/admin/palette.js
===================================================================
--- /extensions/typetags/admin/palette.js	(revision 9828)
+++ 	(revision )
@@ -1,21 +1,0 @@
-bloc = true;
-function hexa(couleur)
-{
-	if(bloc)
-		document.form.hexval.value = couleur;
-}
-function palette() { 
-document.write("<TABLE border='0' cellpadding='0' cellspacing='0' ><TR>"); 
-var h=new Array('00','33','66','99','CC','FF'); 
-var col=""; 
-for(var i=0;i<6;i++) { 
-for(var j=0;j<6;j++) { 
-for(var k=0;k<6;k++) { 
-col="#"+h[i]+h[j]+h[k]; 
-document.write("<TD width='10' height='10' bgcolor='"+col+"' onMouseOver=\"hexa('"+col+"')\" onClick=\"if(bloc) { bloc = false; } else { bloc = true; }\"></TD>"); 
-} 
-} 
-document.write("</tr>"); 
-} 
-document.write("</TABLE>"); 
-} 
Index: /extensions/typetags/admin/typetags_admin.tpl
===================================================================
--- /extensions/typetags/admin/typetags_admin.tpl	(revision 9828)
+++ /extensions/typetags/admin/typetags_admin.tpl	(revision 9829)
@@ -1,10 +1,12 @@
-{html_head}<link rel="stylesheet" type="text/css" href="{$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.css"}">{/html_head}
-{known_script id="farbtastic" src=$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.js"}
+{combine_script id="farbtastic" require="jquery" path=$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.js"}
+{combine_css path=$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.css"}
 
-<script type="text/javascript">
-  $(document).ready(function(){ldelim}
+{footer_script}
+{literal}
+  $(document).ready(function(){
     $('#colorpicker').farbtastic('#hexval');
   });
-</script>
+{/literal}
+{/footer_script}
 
 <div class="titrePage">
Index: /extensions/typetags/main.inc.php
===================================================================
--- /extensions/typetags/main.inc.php	(revision 9828)
+++ /extensions/typetags/main.inc.php	(revision 9829)
@@ -2,8 +2,8 @@
 /*
 Plugin Name: TypeT@gs
-Version: 2.0.d
+Version: 2.2.0
 Description: Allow to manage color of tags, as you want...
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=166
-Author: Sakkhho & P@t
+Author: Sakkhho & P@t & Mistic
 */
 
@@ -20,5 +20,6 @@
   array_push($menu, array(
     'NAME' => 'TypeT@gs',
-    'URL' => get_admin_plugin_menu_link(typetags_PATH . 'admin/typetags_admin.php')));
+    'URL' => get_root_url().'admin.php?page=plugin-' . typetags_DIR,
+  ));
   return $menu;
 }
