Index: /extensions/pwgCumulus/CHANGELOG
===================================================================
--- /extensions/pwgCumulus/CHANGELOG	(revision 11343)
+++ /extensions/pwgCumulus/CHANGELOG	(revision 11344)
@@ -1,2 +1,7 @@
+pwgCumulus 0.6.0 - 2011-06-13
+================================
+* Remove dependency to swfObject
+* Allow admin to use animation in main menu
+
 pwgCumulus 0.5.3 - 2011-06-04
 ================================
Index: /extensions/pwgCumulus/MANIFEST
===================================================================
--- /extensions/pwgCumulus/MANIFEST	(revision 11343)
+++ /extensions/pwgCumulus/MANIFEST	(revision 11344)
@@ -1,6 +1,9 @@
 pwgCumulus/js/colorpicker.js
-pwgCumulus/js/swfobject.js
+pwgCumulus/js/colorpicker.instance.js
+pwgCumulus/include/admin_menu.inc.php
 pwgCumulus/include/pwgCumulusConfig.class.php
 pwgCumulus/include/pwgCumulusContent.class.php
+pwgCumulus/include/admin_tags.inc.php
+pwgCumulus/include/admin_main.inc.php
 pwgCumulus/maintain.inc.php
 pwgCumulus/MANIFEST
@@ -82,4 +85,8 @@
 pwgCumulus/default_values.inc.php
 pwgCumulus/Makefile
+pwgCumulus/template/admin_tags.tpl
 pwgCumulus/template/admin.tpl
+pwgCumulus/template/admin_menu.tpl
 pwgCumulus/template/tags.tpl
+pwgCumulus/template/menubar_tags.tpl
+pwgCumulus/template/admin_main.tpl
Index: /extensions/pwgCumulus/admin.php
===================================================================
--- /extensions/pwgCumulus/admin.php	(revision 11343)
+++ /extensions/pwgCumulus/admin.php	(revision 11344)
@@ -26,54 +26,35 @@
 load_language('plugin.lang', PWG_CUMULUS_PLUGIN_LANG);
 
+include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
+
 $me = get_plugin_data($plugin_id);
-$save_config = false;
 
-if (!empty($_POST['submit'])) {
-  if (!empty($_POST['pwg_cumulus_width']) && intval($_POST['pwg_cumulus_width'])!=$me->pwg_cumulus_width) {
-    $me->pwg_cumulus_width = intval($_POST['pwg_cumulus_width']);
-    $page['infos'][] = l10n('Width updated');
-    $save_config = true;
-  }
-  if (!empty($_POST['pwg_cumulus_height']) && intval($_POST['pwg_cumulus_height'])!=$me->pwg_cumulus_height) {
-    $me->pwg_cumulus_height = intval($_POST['pwg_cumulus_height']);
-    $page['infos'][] = l10n('Height updated');
-    $save_config = true;
-  }
-  if (!empty($_POST['pwg_cumulus_coeff']) && intval($_POST['pwg_cumulus_coeff'])!=$me->pwg_cumulus_coeff) {
-    $me->pwg_cumulus_coeff = intval($_POST['pwg_cumulus_coeff']);
-    $page['infos'][] = l10n('Coefficient for tags size updated');
-    $save_config = true;
-  }
+$Tabs = array('main' => l10n('Dashboard'),
+	      'menu' => l10n('Menu'),
+	      'tags' => l10n('Tags page')
+	      );
+$default_tab = 'main';
+$cc_base_url = get_admin_plugin_menu_link(__FILE__);
 
-  if (!empty($_POST['pwg_cumulus_color1']) && trim($_POST['pwg_cumulus_color1'])!=$me->pwg_cumulus_color1) {
-    $me->pwg_cumulus_color1 = str_replace('#', '', $_POST['pwg_cumulus_color1']);
-    $page['infos'][] = l10n('Color 1 updated');
-    $save_config = true;
-  }
-  if (!empty($_POST['pwg_cumulus_color2']) && trim($_POST['pwg_cumulus_color2'])!=$me->pwg_cumulus_color2) {
-    $me->pwg_cumulus_color2 = str_replace('#', '', $_POST['pwg_cumulus_color2']);
-    $page['infos'][] = l10n('Color 2 updated');
-    $save_config = true;
-  }
-  if (!empty($_POST['pwg_cumulus_hicolor']) && trim($_POST['pwg_cumulus_hicolor'])!=$me->pwg_cumulus_hicolor) {
-    $me->pwg_cumulus_hicolor = str_replace('#', '', $_POST['pwg_cumulus_hicolor']);
-    $page['infos'][] = l10n('Mouseover color updated');
-    $save_config = true;
-  }
-
-  if ($save_config) {
-    $me->save_config();
-  }
+// tabsheet
+if (!isset($_GET['tab']) or !isset($Tabs[$_GET['tab']])) {
+  $page['tab'] = $default_tab;
+} else {
+  $page['tab'] = $_GET['tab'];
 }
 
-$GLOBALS['template']->set_filenames(array('plugin_admin_content' => PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin.tpl'));
-$GLOBALS['template']->assign('PWG_CUMULUS_PLUGIN_CSS', PWG_CUMULUS_PLUGIN_CSS);
-$GLOBALS['template']->assign('PWG_CUMULUS_PLUGIN_JS', PWG_CUMULUS_PLUGIN_JS);
-$GLOBALS['template']->assign('PWG_CUMULUS_WIDTH', $me->pwg_cumulus_width); 
-$GLOBALS['template']->assign('PWG_CUMULUS_HEIGHT', $me->pwg_cumulus_height); 
-$GLOBALS['template']->assign('PWG_CUMULUS_COEFF', $me->pwg_cumulus_coeff); 
-$GLOBALS['template']->assign('PWG_CUMULUS_COLOR1', $me->pwg_cumulus_color1);
-$GLOBALS['template']->assign('PWG_CUMULUS_COLOR2', $me->pwg_cumulus_color2);
-$GLOBALS['template']->assign('PWG_CUMULUS_HICOLOR', $me->pwg_cumulus_hicolor);
-$GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+$tabsheet = new tabsheet();
+foreach ($Tabs as $key => $label) {
+  $tabsheet->add($key, $label, $cc_base_url.'&amp;tab='.$key);
+}
+$tabsheet->select($page['tab']);
+$tabsheet->assign();
+
+include_once(PWG_CUMULUS_PLUGIN_ROOT . '/include/admin_' . $page['tab'] . '.inc.php');
+
+$template->set_filename('plugin_admin_content', PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin.tpl');
+$template->assign('PWG_CUMULUS_PLUGIN_CSS', PWG_CUMULUS_PLUGIN_CSS);
+$template->assign('PWG_CUMULUS_PLUGIN_JS', PWG_CUMULUS_PLUGIN_JS);
+$template->assign('PWG_CUMULUS_TAB_ACTION', PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin_' . $page['tab'] . '.tpl');
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
 ?>
Index: /extensions/pwgCumulus/css/admin.css
===================================================================
--- /extensions/pwgCumulus/css/admin.css	(revision 11343)
+++ /extensions/pwgCumulus/css/admin.css	(revision 11344)
@@ -1,14 +1,14 @@
-form fieldset { 
-  text-align: left;
+form fieldset {
+  text-align:left;
 }
 
-pre { 
+pre {
   margin-left: 20px;
-  background-color: #444444;
-  padding: 1em;
-  color: #FFFFFF;
+  background-color: #444;
+  padding:1em;
+  color:#FFF;
 }
 
-form p.field, p { 
+form p.field, form fieldset p, form p, p {
   text-align: left;
   margin-left: 20px;
@@ -16,8 +16,8 @@
 
 label {
-  display : block;
+  display:block;
 }
 
-p.field {
+p.field { 
   position: relative;
 }
@@ -35,5 +35,9 @@
 }
 
+p.field-position input, p.field-position label { 
+  float: left;
+}
 
-
-
+p.field-position label { 
+  margin-right: 10px;
+}
Index: /extensions/pwgCumulus/default_values.inc.php
===================================================================
--- /extensions/pwgCumulus/default_values.inc.php	(revision 11343)
+++ /extensions/pwgCumulus/default_values.inc.php	(revision 11344)
@@ -24,4 +24,6 @@
 $default_values['pwg_cumulus_coeff'] = 10;
 
+$default_values['pwg_cumulus_mode_transparent'] = false;
+$default_values['bgcolor'] = "FFFFFF";
 $default_values['color1'] = "333333";
 $default_values['color2'] = "FF3363";
Index: /extensions/pwgCumulus/include/admin_main.inc.php
===================================================================
--- /extensions/pwgCumulus/include/admin_main.inc.php	(revision 11344)
+++ /extensions/pwgCumulus/include/admin_main.inc.php	(revision 11344)
@@ -0,0 +1,29 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | pwgCumulus  - a plugin for Piwigo                                     |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License version 2 as     |
+// | published by  the Free Software Foundation                            |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
+// | MA 02110-1301 USA                                                     |
+// +-----------------------------------------------------------------------+
+
+$plugin_main = file_get_contents(dirname(__FILE__) . '/../main.inc.php');
+$version = '';
+
+if (preg_match('`Version: (.*)`', $plugin_main, $matches)) {
+  $version = trim($matches[1]);
+}
+
+$template->assign('PWG_CUMULUS_PLUGIN_VERSION', $version);
Index: /extensions/pwgCumulus/include/admin_menu.inc.php
===================================================================
--- /extensions/pwgCumulus/include/admin_menu.inc.php	(revision 11344)
+++ /extensions/pwgCumulus/include/admin_menu.inc.php	(revision 11344)
@@ -0,0 +1,69 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | pwgCumulus  - a plugin for Piwigo                                     |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License version 2 as     |
+// | published by  the Free Software Foundation                            |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
+// | MA 02110-1301 USA                                                     |
+// +-----------------------------------------------------------------------+
+
+$Positions = array('before' => l10n('Before'), 
+		   'after' => l10n('After')
+		   );
+
+$position_order = $me->position_order;
+$position_block_id = $me->position_block_id;
+
+include_once(PHPWG_ROOT_PATH.'include/block.class.php');
+
+$menu = new BlockManager('menubar');
+$menu->load_registered_blocks();
+$Blocks = array();
+
+foreach ($menu->get_registered_blocks() as $block) {
+  $Blocks[$block->get_id()] = l10n($block->get_name());
+}
+
+if (!empty($_POST['pwg_cumulus_in_main_menu']) && !$me->pwg_cumulus_in_main_menu) {
+  $me->pwg_cumulus_in_main_menu = true;
+  $page['infos'][] = l10n('Tags cloud added in main menu');
+  $save_config = true;
+} elseif (empty($_POST['pwg_cumulus_in_main_menu']) && $me->pwg_cumulus_in_main_menu) {
+  $me->pwg_cumulus_in_main_menu = false;
+  $page['infos'][] = l10n('Tags cloud removed from main menu');
+  $save_config = true;
+}
+
+if (!empty($_POST['position_order']) && isset($Positions[$_POST['position_order']])) {
+  $position_order = $_POST['position_order'];
+}
+
+if (!empty($_POST['position_block_id']) && isset($Blocks[$_POST['position_block_id']])) {
+  $position_block_id = $_POST['position_block_id'];
+}
+
+if ($position_order!=null && $position_block_id!=null) {
+  $me->position_order = $position_order;
+  $me->position_block_id = $position_block_id;  
+  $page['infos'][] = l10n('Position in main menu has been updated');  
+  $me->save_config();
+}
+
+$template->assign('MENUBAR_BLOCKS', $Blocks);
+$template->assign('POSITION_ORDER', $position_order);
+$template->assign('POSITIONS', $Positions);
+$template->assign('POSITION_BLOCK_ID', $position_block_id);
+$template->assign('PWG_CUMULUS_IN_MAIN_MENU', $me->pwg_cumulus_in_main_menu);
+?>
Index: /extensions/pwgCumulus/include/admin_tags.inc.php
===================================================================
--- /extensions/pwgCumulus/include/admin_tags.inc.php	(revision 11344)
+++ /extensions/pwgCumulus/include/admin_tags.inc.php	(revision 11344)
@@ -0,0 +1,84 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | pwgCumulus  - a plugin for Piwigo                                     |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License version 2 as     |
+// | published by  the Free Software Foundation                            |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
+// | MA 02110-1301 USA                                                     |
+// +-----------------------------------------------------------------------+
+
+$save_config = false;
+
+if (!empty($_POST['submit'])) {
+  if (!empty($_POST['pwg_cumulus_width']) && intval($_POST['pwg_cumulus_width'])!=$me->pwg_cumulus_width) {
+    $me->pwg_cumulus_width = intval($_POST['pwg_cumulus_width']);
+    $page['infos'][] = l10n('Width updated');
+    $save_config = true;
+  }
+  if (!empty($_POST['pwg_cumulus_height']) && intval($_POST['pwg_cumulus_height'])!=$me->pwg_cumulus_height) {
+    $me->pwg_cumulus_height = intval($_POST['pwg_cumulus_height']);
+    $page['infos'][] = l10n('Height updated');
+    $save_config = true;
+  }
+  if (!empty($_POST['pwg_cumulus_coeff']) && intval($_POST['pwg_cumulus_coeff'])!=$me->pwg_cumulus_coeff) {
+    $me->pwg_cumulus_coeff = intval($_POST['pwg_cumulus_coeff']);
+    $page['infos'][] = l10n('Coefficient for tags size updated');
+    $save_config = true;
+  }
+
+  if (!empty($_POST['pwg_cumulus_mode_transparent']) && !$me->pwg_cumulus_mode_transparent) {
+    $me->pwg_cumulus_mode_transparent = true;
+    $page['infos'][] = l10n('Transparent mode is used');
+    $save_config = true;
+  } elseif (empty($_POST['pwg_cumulus_mode_transparent']) && $me->pwg_cumulus_mode_transparent) {
+    $me->pwg_cumulus_mode_transparent = false;
+    $page['infos'][] = l10n('Transparent mode is not used');
+    $save_config = true;
+  }
+  if (!empty($_POST['pwg_cumulus_bgcolor']) && trim($_POST['pwg_cumulus_bgcolor'])!=$me->pwg_cumulus_bgcolor) {
+    $me->pwg_cumulus_bgcolor = str_replace('#', '', $_POST['pwg_cumulus_bgcolor']);
+    $page['infos'][] = l10n('Background color updated');
+    $save_config = true;
+  }
+  if (!empty($_POST['pwg_cumulus_color1']) && trim($_POST['pwg_cumulus_color1'])!=$me->pwg_cumulus_color1) {
+    $me->pwg_cumulus_color1 = str_replace('#', '', $_POST['pwg_cumulus_color1']);
+    $page['infos'][] = l10n('Color 1 updated');
+    $save_config = true;
+  }
+  if (!empty($_POST['pwg_cumulus_color2']) && trim($_POST['pwg_cumulus_color2'])!=$me->pwg_cumulus_color2) {
+    $me->pwg_cumulus_color2 = str_replace('#', '', $_POST['pwg_cumulus_color2']);
+    $page['infos'][] = l10n('Color 2 updated');
+    $save_config = true;
+  }
+  if (!empty($_POST['pwg_cumulus_hicolor']) && trim($_POST['pwg_cumulus_hicolor'])!=$me->pwg_cumulus_hicolor) {
+    $me->pwg_cumulus_hicolor = str_replace('#', '', $_POST['pwg_cumulus_hicolor']);
+    $page['infos'][] = l10n('Mouseover color updated');
+    $save_config = true;
+  }
+
+  if ($save_config) {
+    $me->save_config();
+  }
+}
+
+$template->assign('PWG_CUMULUS_WIDTH', $me->pwg_cumulus_width); 
+$template->assign('PWG_CUMULUS_HEIGHT', $me->pwg_cumulus_height); 
+$template->assign('PWG_CUMULUS_COEFF', $me->pwg_cumulus_coeff); 
+$template->assign('PWG_CUMULUS_MODE_TRANSPARENT', $me->pwg_cumulus_mode_transparent);
+$template->assign('PWG_CUMULUS_BGCOLOR', $me->pwg_cumulus_bgcolor);
+$template->assign('PWG_CUMULUS_COLOR1', $me->pwg_cumulus_color1);
+$template->assign('PWG_CUMULUS_COLOR2', $me->pwg_cumulus_color2);
+$template->assign('PWG_CUMULUS_HICOLOR', $me->pwg_cumulus_hicolor);
+?>
Index: /extensions/pwgCumulus/include/pwgCumulusConfig.class.php
===================================================================
--- /extensions/pwgCumulus/include/pwgCumulusConfig.class.php	(revision 11343)
+++ /extensions/pwgCumulus/include/pwgCumulusConfig.class.php	(revision 11344)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/include/pwgCumulusContent.class.php
===================================================================
--- /extensions/pwgCumulus/include/pwgCumulusContent.class.php	(revision 11343)
+++ /extensions/pwgCumulus/include/pwgCumulusContent.class.php	(revision 11344)
@@ -27,40 +27,93 @@
 
   public function loc_begin_page_header() {
+    global $template;
+
     if (!empty($_GET['display_mode']) && $_GET['display_mode']=='cumulus') {
-      $GLOBALS['template']->assign('display_mode', 'cumulus');
+      $template->assign('display_mode', 'cumulus');
     }
 
-    $GLOBALS['template']->set_filenames(array('tags'=> PWG_CUMULUS_PLUGIN_TEMPLATE . '/tags.tpl'));
-    
-    if (version_compare(PHPWG_VERSION, '2.2', '>=') || (PHPWG_VERSION=='Colibri')) {
-      $GLOBALS['template']->func_combine_script(array('id' => 'swfobject',
-						      'path' => PWG_CUMULUS_PLUGIN_JS. '/swfobject.js'
-						      ),
-						$GLOBALS['template']->smarty
-						);
-    } else {
-      $GLOBALS['template']->func_known_script(array('id' => 'swfobject',
-						    'src' => PWG_CUMULUS_PLUGIN_JS. '/swfobject.js'
-						    ),
-					      $GLOBALS['template']->smarty
-					      );
+    $template->set_filenames(array('tags'=> PWG_CUMULUS_PLUGIN_TEMPLATE . '/tags.tpl'));
+        
+    $template->assign('PWG_CUMULUS_SWF', PWG_CUMULUS_PLUGIN_SWF);
+    $template->assign('PWG_CUMULUS_IMGS', PWG_CUMULUS_PLUGIN_IMGS);
+
+    $template->assign('PWG_CUMULUS_WIDTH', $this->plugin_config->pwg_cumulus_width);
+    $template->assign('PWG_CUMULUS_HEIGHT', $this->plugin_config->pwg_cumulus_height);
+    $template->assign('PWG_CUMULUS_HREF', get_root_url().'tags.php?display_mode=cumulus');
+
+    $template->assign('PWG_CUMULUS_MODE_TRANSPARENT', $this->plugin_config->pwg_cumulus_mode_transparent);
+    $template->assign('PWG_CUMULUS_BGCOLOR', $this->plugin_config->pwg_cumulus_bgcolor);
+    $template->assign('PWG_CUMULUS_COLOR1', '0x'.$this->plugin_config->pwg_cumulus_color1);
+    $template->assign('PWG_CUMULUS_COLOR2', '0x'.$this->plugin_config->pwg_cumulus_color2);
+    $template->assign('PWG_CUMULUS_HICOLOR', '0x'.$this->plugin_config->pwg_cumulus_hicolor);
+
+    if (!empty($template->smarty->_tpl_vars['tags'])) {
+      foreach ($template->smarty->_tpl_vars['tags'] as $key => &$tag) {
+	$tag['display_name'] = urlencode($tag['name']);
+	$tag['size'] = $this->plugin_config->pwg_cumulus_coeff * $tag['level'];
+      }
     }
-    
-    $GLOBALS['template']->assign('PWG_CUMULUS_SWF', PWG_CUMULUS_PLUGIN_SWF);
-    $GLOBALS['template']->assign('PWG_CUMULUS_IMGS', PWG_CUMULUS_PLUGIN_IMGS);
+  }
 
-    $GLOBALS['template']->assign('PWG_CUMULUS_WIDTH', $this->plugin_config->pwg_cumulus_width);
-    $GLOBALS['template']->assign('PWG_CUMULUS_HEIGHT', $this->plugin_config->pwg_cumulus_height);
-    $GLOBALS['template']->assign('PWG_CUMULUS_HREF', get_root_url().'tags.php?display_mode=cumulus');
+  public function blockmanager_register_blocks($menu_ref_arr) {
+    if (!$this->plugin_config->pwg_cumulus_in_main_menu) {
+      return;
+    }
+    $menu = &$menu_ref_arr[0];
+    if ($menu->get_id() != 'menubar') {
+      return;
+    }
+    $menu->register_block(new RegisteredBlock('mbCumulus', 'Cumulus', 'piwigo'));
+  }
 
-    $GLOBALS['template']->assign('PWG_CUMULUS_COLOR1', '0x'.$this->plugin_config->pwg_cumulus_color1);
-    $GLOBALS['template']->assign('PWG_CUMULUS_COLOR2', '0x'.$this->plugin_config->pwg_cumulus_color2);
-    $GLOBALS['template']->assign('PWG_CUMULUS_HICOLOR', '0x'.$this->plugin_config->pwg_cumulus_hicolor);
 
-    if (!empty($GLOBALS['template']->smarty->_tpl_vars['tags'])) {
-      foreach ($GLOBALS['template']->smarty->_tpl_vars['tags'] as $key => &$tag) {
-	$tag['display_name'] = urlencode($tag['name']);
-	$tag['size'] = $this->plugin_config->pwg_cumulus_coeff*$tag['level'];
+  public function blockmanager_apply($menu_ref_arr) {
+    global $template;
+
+    if (!$this->plugin_config->pwg_cumulus_in_main_menu) {
+      return;
+    }
+
+    load_language('plugin.lang', PWG_CUMULUS_PLUGIN_LANG);
+
+    $menu = &$menu_ref_arr[0];
+    if ($menu->get_id() != 'menubar') {
+      return;
+    }
+
+    include_once(PHPWG_ROOT_PATH.'include/block.class.php');
+
+    if (($mbCumulus = $menu->get_block('mbTags'))!==null) {
+      if (empty($mbCumulus->data)) {
+	return;
       }
+      if ($this->plugin_config->position_order!=null 
+	  && $this->plugin_config->position_block_id!=null) {
+	$related_block = $menu->get_block($this->plugin_config->position_block_id);
+	if ($this->plugin_config->position_order=='after') {
+	  $mbCumulus->set_position($related_block->get_position()+1);
+	} else {
+	  $mbCumulus->set_position($related_block->get_position()-1);
+	}
+      }
+
+      $template->assign('PWG_CUMULUS_SWF', PWG_CUMULUS_PLUGIN_SWF);
+      $template->assign('PWG_CUMULUS_IMGS', PWG_CUMULUS_PLUGIN_IMGS);
+      
+      $template->assign('PWG_CUMULUS_WIDTH', $this->plugin_config->pwg_cumulus_width);
+      $template->assign('PWG_CUMULUS_HEIGHT', $this->plugin_config->pwg_cumulus_height);
+      $template->assign('PWG_CUMULUS_MODE_TRANSPARENT', $this->plugin_config->pwg_cumulus_mode_transparent);
+      $template->assign('PWG_CUMULUS_BGCOLOR', $this->plugin_config->pwg_cumulus_bgcolor);
+      $template->assign('PWG_CUMULUS_COLOR1', '0x'.$this->plugin_config->pwg_cumulus_color1);
+      $template->assign('PWG_CUMULUS_COLOR2', '0x'.$this->plugin_config->pwg_cumulus_color2);
+      $template->assign('PWG_CUMULUS_HICOLOR', '0x'.$this->plugin_config->pwg_cumulus_hicolor);
+      foreach ($mbCumulus->data as &$tag) {
+	$tag['size'] = $this->plugin_config->pwg_cumulus_coeff * $tag['level'];
+	if (!empty($tag['U_ADD'])) {
+	  $tag['URL'] = $tag['U_ADD'];
+	}
+      }
+      $template->assign('PWG_CUMULUS_TAGS', $mbCumulus->data);
+      $mbCumulus->template = PWG_CUMULUS_PLUGIN_TEMPLATE . '/menubar_tags.tpl';
     }
   }
Index: /extensions/pwgCumulus/init.php
===================================================================
--- /extensions/pwgCumulus/init.php	(revision 11343)
+++ /extensions/pwgCumulus/init.php	(revision 11344)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/js/colorpicker.instance.js
===================================================================
--- /extensions/pwgCumulus/js/colorpicker.instance.js	(revision 11344)
+++ /extensions/pwgCumulus/js/colorpicker.instance.js	(revision 11344)
@@ -0,0 +1,43 @@
+$(function() {
+    $('input.pwg-picker')
+      .each(function() {
+	  if ($(this).val() !== undefined) {
+	    if ($(this).val().indexOf('#',0)==-1) {
+	      $(this).css('background-color', '#'+$(this).val());
+	    } else {
+	      $(this).css('background-color', $(this).val());
+	    }
+      }
+	})
+      .ColorPicker({
+	onSubmit: function(hsb, hex, rgb, el) {
+	    $(el).val(hex);
+	    $(el).ColorPickerHide();
+	    $(el).css('background-color', '#'+hex);
+	  },
+	    onBeforeShow: function () {
+	    $(this).ColorPickerSetColor(this.value);
+	  }
+	})
+      .bind('keyup', function(){
+	  $(this).ColorPickerSetColor(this.value);
+	});
+
+    if ($('#pwg_cumulus_mode_transparent').is(':checked')) {
+      $('#pwg_cumulus_p_bgcolor')      
+	.css('opacity', '0.3')
+	.children().children('input').attr('disabled', 'disabled');
+    }
+    $('#pwg_cumulus_mode_transparent')
+      .click(function() {
+	  if ($(this).is(':checked')) {
+	    $('#pwg_cumulus_p_bgcolor')
+	      .animate({opacity:'-=0.7'}, 500)
+	      .children().children('input').attr('disabled', 'disabled');
+	  } else {
+	    $('#pwg_cumulus_p_bgcolor')
+	      .animate({opacity:'+=0.7'}, 500)
+	      .children().children('input').removeAttr('disabled');
+	  }
+	});
+  });
Index: tensions/pwgCumulus/js/swfobject.js
===================================================================
--- /extensions/pwgCumulus/js/swfobject.js	(revision 11343)
+++ 	(revision )
@@ -1,133 +1,0 @@
-/**
- * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
- *
- * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
- *   legal reasons.
- */
-if(typeof deconcept=="undefined"){var deconcept=new Object();}
-if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
-if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
-deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
-if(!document.createElement||!document.getElementById){return;}
-this.DETECT_KEY=_b?_b:"detectflash";
-this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
-this.params=new Object();
-this.variables=new Object();
-this.attributes=new Array();
-if(_1){this.setAttribute("swf",_1);}
-if(id){this.setAttribute("id",id);}
-if(w){this.setAttribute("width",w);}
-if(h){this.setAttribute("height",h);}
-if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
-this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
-if(c){this.addParam("bgcolor",c);}
-var q=_8?_8:"high";
-this.addParam("quality",q);
-this.setAttribute("useExpressInstall",_7);
-this.setAttribute("doExpressInstall",false);
-var _d=(_9)?_9:window.location;
-this.setAttribute("xiRedirectUrl",_d);
-this.setAttribute("redirectUrl","");
-if(_a){this.setAttribute("redirectUrl",_a);}};
-deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
-this.attributes[_e]=_f;
-},getAttribute:function(_10){
-return this.attributes[_10];
-},addParam:function(_11,_12){
-this.params[_11]=_12;
-},getParams:function(){
-return this.params;
-},addVariable:function(_13,_14){
-this.variables[_13]=_14;
-},getVariable:function(_15){
-return this.variables[_15];
-},getVariables:function(){
-return this.variables;
-},getVariablePairs:function(){
-var _16=new Array();
-var key;
-var _18=this.getVariables();
-for(key in _18){
-_16.push(key+"="+_18[key]);}
-return _16;
-},getSWFHTML:function(){
-var _19="";
-if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
-if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
-_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
-_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
-var _1a=this.getParams();
-for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
-var _1c=this.getVariablePairs().join("&");
-if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}
-_19+="/>";
-}else{
-if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
-_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
-_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
-var _1d=this.getParams();
-for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
-var _1f=this.getVariablePairs().join("&");
-if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}
-_19+="</object>";}
-return _19;
-},write:function(_20){
-if(this.getAttribute("useExpressInstall")){
-var _21=new deconcept.PlayerVersion([6,0,65]);
-if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
-this.setAttribute("doExpressInstall",true);
-this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
-document.title=document.title.slice(0,47)+" - Flash Player Installation";
-this.addVariable("MMdoctitle",document.title);}}
-if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
-var n=(typeof _20=="string")?document.getElementById(_20):_20;
-n.innerHTML=this.getSWFHTML();
-return true;
-}else{
-if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
-return false;}};
-deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
-var _25=new deconcept.PlayerVersion([0,0,0]);
-if(navigator.plugins&&navigator.mimeTypes.length){
-var x=navigator.plugins["Shockwave Flash"];
-if(x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
-}else{try{
-var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
-for(var i=3;axo!=null;i++){
-axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
-_25=new deconcept.PlayerVersion([i,0,0]);}}
-catch(e){}
-if(_23&&_25.major>_23.major){return _25;}
-if(!_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
-try{_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
-catch(e){}}}
-return _25;};
-deconcept.PlayerVersion=function(_29){
-this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
-this.minor=parseInt(_29[1])||0;
-this.rev=parseInt(_29[2])||0;};
-deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
-if(this.major<fv.major){return false;}
-if(this.major>fv.major){return true;}
-if(this.minor<fv.minor){return false;}
-if(this.minor>fv.minor){return true;}
-if(this.rev<fv.rev){return false;}return true;};
-deconcept.util={getRequestParameter:function(_2b){
-var q=document.location.search||document.location.hash;
-if(q){
-var _2d=q.indexOf(_2b+"=");
-var _2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
-if(q.length>1&&_2d>-1){
-return q.substring(q.indexOf("=",_2d)+1,_2e);
-}}return "";}};
-if(Array.prototype.push==null){
-Array.prototype.push=function(_2f){
-this[this.length]=_2f;
-return this.length;};}
-var getQueryParamValue=deconcept.util.getRequestParameter;
-var FlashObject=deconcept.SWFObject; // for backwards compatibility
-var SWFObject=deconcept.SWFObject;
-
Index: /extensions/pwgCumulus/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/pwgCumulus/language/fr_FR/plugin.lang.php	(revision 11343)
+++ /extensions/pwgCumulus/language/fr_FR/plugin.lang.php	(revision 11344)
@@ -20,22 +20,48 @@
 // +-----------------------------------------------------------------------+
 
-$lang['Cumulus Tags Cloud Plugin'] = "Plugin Cumulus Tags Cloud";
-$lang['That plugin display tags using a flash movie that rotates them in 3D. It works like a regular tags cloud but in a more amazing and exciting way.'] = "Ce plugin permet d'afficher un nuage de tags sous forme d'une animation flash en 3D.";
-$lang['You can choose that mode for tags default display mode by adding (or changing) in the configuration file'] = "Vous pouvez choisir ce mode d'affichage du nuage de tags en ajoutant le mode par défaut dans le fichier de configuration";
-$lang['Animation width and height'] = "Dimensions de l'animation";
-$lang['Width'] = "Largeur";
-$lang['Height'] = "Hauteur";
-$lang['Tags size'] = "Taille des tags";
-$lang['Coefficient'] = "Coefficient";
-$lang['Width updated'] = "La largeur a été mise à jour";
-$lang['Height updated'] = "La hauteur a été mise à jour";
-$lang['Coefficient for tags size updated'] = "Le coefficient multiplicateur des tags a été mis à jour";
-$lang['Show tag cloud in cumulus mode'] = "Utiliser le mode cumulus pour afficher le nuage de tags";
-$lang['Animation colors'] = "Couleurs de l'animation";
-$lang['Color 1'] = "Couleur 1";
-$lang['Color 2'] = "Couleur 2";
-$lang['Mouseover color'] = "Couleur au survol";
-$lang['Color 1 updated'] = "La couleur 1 a été mise à jour";
-$lang['Color 2 updated'] = "La couleur 2 a été mise à jour";
-$lang['Mouseover color updated'] = "La couleur hicolor a été mise à jour";
+// admin
+$lang['Add tags cloud in main menu'] = 'Ajouter le nuage Cumulus dans menu principal';
+$lang['After'] = 'Après';
+$lang['Animation colors'] = 'Couleurs de l\'animation';
+$lang['Animation configuration : size, tags colors, tags size'] = 'Configuration de l\'animation : taille, couleurs des tags, taille des tags';
+$lang['Animation width and height'] = 'Dimensions de l\'animation';
+$lang['Background color'] = 'Couleur de fond';
+$lang['Background color updated'] = 'La couleur de fond a été mise à jour';
+$lang['Before'] = 'Avant';
+$lang['block'] = 'le bloc';
+$lang['Check the checkbox to add tags cloud in main menu'] = 'Cochez la case pour ajouter le nuage Cumulus dans le menu principal';
+$lang['Check the checkbox to use transparent mode for background'] = 'Cochez la case pour utiliser le mode transparence';
+$lang['Coefficient'] = 'Coefficient';
+$lang['Coefficient for tags size updated'] = 'Le coefficient multiplicateur des tags a été mis à jour';
+$lang['Color 1'] = 'Couleur 1';
+$lang['Color 1 updated'] = 'La couleur 1 a été mise à jour';
+$lang['Color 2'] = 'Couleur 2';
+$lang['Color 2 updated'] = 'La couleur 2 a été mise à jour';
+$lang['Cumulus Tags Cloud Plugin'] = 'Plugin Cumulus Tags Cloud';
+$lang['Current release:'] = 'Version courante';
+$lang['Height'] = 'Hauteur';
+$lang['Height updated'] = 'La hauteur a été mise à jour';
+$lang['Menu'] = 'Menu';
+$lang['Mouseover color'] = 'Couleur au survol';
+$lang['Mouseover color updated'] = 'La couleur hicolor a été mise à jour';
+$lang['Position'] = 'Position';
+$lang['Position in main menu has been updated'] = 'La position dans le mneu principal a été mise à jour';
+$lang['Tags cloud added in main menu'] = 'Le nuage Cumulus a été ajouté dans le menu principal';
+$lang['Tags cloud in main menu?'] = 'Ajoutez le nuage Cumulus dans le menu principal ?';
+$lang['Tags cloud removed from main menu'] = 'Le nuage Cumulus a été enlevé du menu principal';
+$lang['Tags page'] = 'Page des tags';
+$lang['Tags size'] = 'Taille des tags';
+$lang['That plugin display tags using a flash movie that rotates them in 3D. It works like a regular tags cloud but in a more amazing and exciting way.'] = 'Ce plugin permet d\'afficher un nuage de tags sous forme d\'une animation flash en 3D.';
+$lang['Transparent mode for background'] = 'Mode transparence pour le fond de l\'animation';
+$lang['Transparent mode is not used'] = 'Le mode transparence n\'est pas utilisé';
+$lang['Transparent mode is used'] = 'Le mode transparence est utilisé';
+$lang['Width'] = 'Largeur';
+$lang['Width updated'] = 'La largeur a été mise à jour';
+$lang['You can choose that mode for tags default display mode by adding (or changing) in the configuration file'] = 'Vous pouvez choisir ce mode d\'affichage du nuage de tags en ajoutant le mode par défaut dans le fichier de configuration';
+$lang['You can choose to add cumulus tag cloud in menu. You can define tags cloud position in the main menu by choosing its position related to another block'] = 'Vous pouvez ajouter le nuage Cumulus dans le menu principal. Vous pouvez définir la position du nuage par rapport à un autre bloc de menu';
+
+// public
+$lang['cloud'] = 'nuage';
+$lang['cumulus cloud'] = 'Nuage cumulus';
+$lang['Show tag cloud'] = 'Utiliser le mode cumulus pour afficher le nuage de tags';
 ?>
Index: /extensions/pwgCumulus/language/templates/plugin.lang.php
===================================================================
--- /extensions/pwgCumulus/language/templates/plugin.lang.php	(revision 11343)
+++ /extensions/pwgCumulus/language/templates/plugin.lang.php	(revision 11344)
@@ -6,6 +6,6 @@
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
+// | it under the terms of the GNU General Public License version 2 as     |
+// | published by  the Free Software Foundation                            |
 // |                                                                       |
 // | This program is distributed in the hope that it will be useful, but   |
@@ -16,11 +16,20 @@
 // | You should have received a copy of the GNU General Public License     |
 // | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
+// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
+// | MA 02110-1301 USA                                                     |
 // +-----------------------------------------------------------------------+
 
 // admin
+$lang['Add tags cloud in main menu'] = '';
+$lang['After'] = '';
 $lang['Animation colors'] = '';
+$lang['Animation configuration : size, tags colors, tags size'] = '';
 $lang['Animation width and height'] = '';
+$lang['Background color'] = '';
+$lang['Background color updated'] = '';
+$lang['Before'] = '';
+$lang['block'] = '';
+$lang['Check the checkbox to add tags cloud in main menu'] = '';
+$lang['Check the checkbox to use transparent mode for background'] = '';
 $lang['Coefficient'] = '';
 $lang['Coefficient for tags size updated'] = '';
@@ -30,22 +39,30 @@
 $lang['Color 2 updated'] = '';
 $lang['Cumulus Tags Cloud Plugin'] = '';
+$lang['Current release:'] = '';
+$lang['Dashboard'] = '';
 $lang['Height'] = '';
 $lang['Height updated'] = '';
+$lang['Menu'] = '';
 $lang['Mouseover color'] = '';
 $lang['Mouseover color updated'] = '';
-$lang['Submit'] = '';
+$lang['Position'] = '';
+$lang['Position in main menu has been updated'] = '';
+$lang['Tags cloud added in main menu'] = '';
+$lang['Tags cloud in main menu?'] = '';
+$lang['Tags cloud removed from main menu'] = '';
+$lang['Tags page'] = '';
 $lang['Tags size'] = '';
 $lang['That plugin display tags using a flash movie that rotates them in 3D. It works like a regular tags cloud but in a more amazing and exciting way.'] = '';
-$lang['You can choose that mode for tags default display mode by adding (or changing) in the configuration file'] = '';
+$lang['Transparent mode for background'] = '';
+$lang['Transparent mode is not used'] = '';
+$lang['Transparent mode is used'] = '';
 $lang['Width'] = '';
 $lang['Width updated'] = '';
+$lang['You can choose that mode for tags default display mode by adding (or changing) in the configuration file'] = '';
+$lang['You can choose to add cumulus tag cloud in menu. You can define tags cloud position in the main menu by choosing its position related to another block'] = '';
 
 // public
 $lang['cloud'] = '';
 $lang['cumulus cloud'] = '';
-$lang['group by letters'] = '';
-$lang['Home'] = '';
-$lang['letters'] = '';
 $lang['show tag cloud'] = '';
-$lang['Tags'] = '';
 ?>
Index: /extensions/pwgCumulus/main.inc.php
===================================================================
--- /extensions/pwgCumulus/main.inc.php	(revision 11343)
+++ /extensions/pwgCumulus/main.inc.php	(revision 11344)
@@ -22,5 +22,5 @@
 /*
 Plugin Name: pwgCumulus
-Version: 0.5.3
+Version: 0.6.0
 Description: add an amazing tag cloud
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=263
Index: /extensions/pwgCumulus/public.php
===================================================================
--- /extensions/pwgCumulus/public.php	(revision 11343)
+++ /extensions/pwgCumulus/public.php	(revision 11344)
@@ -26,4 +26,10 @@
 add_event_handler('loc_begin_page_header',
                   array($public_content, 'loc_begin_page_header')
-  ); 
+		  ); 
+add_event_handler('blockmanager_register_blocks',
+		  array($public_content, 'blockmanager_register_blocks')
+		  );
+add_event_handler('blockmanager_apply',
+		  array($public_content, 'blockmanager_apply')
+		  );
 ?>
Index: /extensions/pwgCumulus/template/admin.tpl
===================================================================
--- /extensions/pwgCumulus/template/admin.tpl	(revision 11343)
+++ /extensions/pwgCumulus/template/admin.tpl	(revision 11344)
@@ -1,33 +1,3 @@
 {combine_css path="$PWG_CUMULUS_PLUGIN_CSS/admin.css"}
-{combine_css path="$PWG_CUMULUS_PLUGIN_CSS/colorpicker.css"}
-
-{combine_script id="colorpicker" require="jquery" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.js"}
-{footer_script require="colorpicker"}{literal}
-$(function() {
-$('input.pwg-picker')
-  .each(function() {
-      if ($(this).val() !== undefined) {
-        if ($(this).val().indexOf('#',0)==-1) {
-           $(this).css('background-color', '#'+$(this).val());
-        } else {
-           $(this).css('background-color', $(this).val());
-        }
-      }
-    })
-  .ColorPicker({
-    onSubmit: function(hsb, hex, rgb, el) {
-        $(el).val(hex);
-        $(el).ColorPickerHide();
-        $(el).css('background-color', '#'+hex);
-      },
-    onBeforeShow: function () {
-        $(this).ColorPickerSetColor(this.value);
-      }
-})
-.bind('keyup', function(){
-	$(this).ColorPickerSetColor(this.value);
-});
-});
-{/literal}{/footer_script}
 
 <div class="titrePage">
@@ -35,57 +5,3 @@
 </div>
 
-<p>
-{'That plugin display tags using a flash movie that rotates them in 3D. It works like a regular tags cloud but in a more amazing and exciting way.'|@translate}
-</p>
-
-<p>
-{'You can choose that mode for tags default display mode by adding (or changing) in the configuration file'|@translate}  <strong>include/config_local.inc.php</strong> :<p>
-<pre>
-$conf['tags_default_display_mode'] = 'cumulus';
-</pre>
-
-<form method="post" action="" class="general">
-  <fieldset>
-    <legend>{'Animation width and height'|@translate}</legend>
-    <p class="field">
-      <label>{'Width'|@translate}
-	<input type="text" name="pwg_cumulus_width" value="{$PWG_CUMULUS_WIDTH}">
-      </label>
-    </p>
-    <p class="field">
-      <label>{'Height'|@translate}
-      <input type="text" name="pwg_cumulus_height" value="{$PWG_CUMULUS_HEIGHT}">
-      </label>
-    </p>
-  </fieldset>
-  
-  <fieldset>
-    <legend>{'Tags size'|@translate}</legend>
-    <p class="field">
-      <label>{'Coefficient'|@translate}
-	<input type="text" name="pwg_cumulus_coeff" value="{$PWG_CUMULUS_COEFF}">
-      </label>      
-    </p>
-  </fieldset>
-  
-  <fieldset>
-    <legend>{'Animation colors'|@translate}</legend>
-    <div id="picker" style="float: right;"></div>
-    <p class="field">
-      <label>{'Color 1'|@translate}
-	<input class="pwg-picker" type="text" name="pwg_cumulus_color1" value="{$PWG_CUMULUS_COLOR1}">
-      </label>      
-    </p>
-    <p class="field">
-    <label>{'Color 2'|@translate}
-      <input class="pwg-picker" type="text" name="pwg_cumulus_color2" value="{$PWG_CUMULUS_COLOR2}">
-    </label>      
-    </p>
-    <p class="field">
-      <label>{'Mouseover color'|@translate}
-	<input class="pwg-picker" type="text" name="pwg_cumulus_hicolor" value="{$PWG_CUMULUS_HICOLOR}">
-      </label>      
-    </p>
-  </fieldset>
-  <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
-</form>
+{include file="$PWG_CUMULUS_TAB_ACTION"} 
Index: /extensions/pwgCumulus/template/admin_main.tpl
===================================================================
--- /extensions/pwgCumulus/template/admin_main.tpl	(revision 11344)
+++ /extensions/pwgCumulus/template/admin_main.tpl	(revision 11344)
@@ -0,0 +1,11 @@
+<p>
+{'That plugin display tags using a flash movie that rotates them in 3D. It works like a regular tags cloud but in a more amazing and exciting way.'|@translate}
+</p>
+
+<p>
+{'You can choose that mode for tags default display mode by adding (or changing) in the configuration file'|@translate}  <strong>local/config/config.inc.php</strong> :<p>
+<pre>
+$conf['tags_default_display_mode'] = 'cumulus';
+</pre>
+
+<p>{'Current release:'|@translate}&nbsp;{$PWG_CUMULUS_PLUGIN_VERSION}</p>
Index: /extensions/pwgCumulus/template/admin_menu.tpl
===================================================================
--- /extensions/pwgCumulus/template/admin_menu.tpl	(revision 11344)
+++ /extensions/pwgCumulus/template/admin_menu.tpl	(revision 11344)
@@ -0,0 +1,26 @@
+<p>{'You can choose to add cumulus tag cloud in menu. You can define tags cloud position in the main menu by choosing its position related to another block'|@translate}</p>
+<form action="" method="post" class="general">
+  <fieldset>
+    <legend>{'Tags cloud in main menu?'|@translate}</legend>
+    <p class="field">
+      <label>{'Add tags cloud in main menu'|@translate}
+	<input type="checkbox" name="pwg_cumulus_in_main_menu" value="1"
+	       {if $PWG_CUMULUS_IN_MAIN_MENU} checked="checked"{/if}>
+      </label>
+      <span class="info">({'Check the checkbox to add tags cloud in main menu'|@translate})</span>
+    </p>
+  </fieldset>
+  <fieldset>
+    <legend>{'Position'|@translate}</legend>
+    <p class="field-position">
+      {html_radios name="position_order" options=$POSITIONS selected=$POSITION_ORDER}
+      <span>&nbsp;{'block'|@translate}&nbsp;</span>
+      <select name="position_block_id">
+	<option value=""></option>
+	{html_options options=$MENUBAR_BLOCKS selected=$POSITION_BLOCK_ID}
+      </select>
+    </p>
+  </fieldset>
+  <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
+</form>
+
Index: /extensions/pwgCumulus/template/admin_tags.tpl
===================================================================
--- /extensions/pwgCumulus/template/admin_tags.tpl	(revision 11344)
+++ /extensions/pwgCumulus/template/admin_tags.tpl	(revision 11344)
@@ -0,0 +1,66 @@
+{combine_css path="$PWG_CUMULUS_PLUGIN_CSS/colorpicker.css"}
+
+{combine_script id="colorpicker" require="jquery" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.js"}
+{combine_script id="colorpicker.instance" require="colorpicker" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.instance.js"}
+
+<p>{'Animation configuration : size, tags colors, tags size'|@translate}</p>
+
+<form method="post" action="" class="general">
+  <fieldset>
+    <legend>{'Animation width and height'|@translate}</legend>
+    <p class="field">
+      <label>{'Width'|@translate}
+	<input type="text" name="pwg_cumulus_width" value="{$PWG_CUMULUS_WIDTH}">
+      </label>
+    </p>
+    <p class="field">
+      <label>{'Height'|@translate}
+      <input type="text" name="pwg_cumulus_height" value="{$PWG_CUMULUS_HEIGHT}">
+      </label>
+    </p>
+  </fieldset>
+  
+  <fieldset>
+    <legend>{'Tags size'|@translate}</legend>
+    <p class="field">
+      <label>{'Coefficient'|@translate}
+	<input type="text" name="pwg_cumulus_coeff" value="{$PWG_CUMULUS_COEFF}">
+      </label>      
+    </p>
+  </fieldset>
+  
+  <fieldset>
+    <legend>{'Animation colors'|@translate}</legend>
+    <div id="picker" style="float: right;"></div>
+    
+    <p class="field">
+      <label>{'Transparent mode for background'|@translate}
+	<input type="checkbox" id="pwg_cumulus_mode_transparent" name="pwg_cumulus_mode_transparent" value="1"
+	       {if $PWG_CUMULUS_MODE_TRANSPARENT} checked="checked"{/if}>
+      </label>
+      <span class="info">({'Check the checkbox to use transparent mode for background'|@translate})</span>
+    </p>
+    <p class="field" id="pwg_cumulus_p_bgcolor">
+      <label>{'Background color'|@translate}
+	<input class="pwg-picker" type="text" name="pwg_cumulus_bgcolor" value="{$PWG_CUMULUS_BGCOLOR}">
+      </label>      
+    </p>
+    <p class="field">
+      <label>{'Color 1'|@translate}
+	<input class="pwg-picker" type="text" name="pwg_cumulus_color1" value="{$PWG_CUMULUS_COLOR1}">
+      </label>      
+    </p>
+    <p class="field">
+    <label>{'Color 2'|@translate}
+      <input class="pwg-picker" type="text" name="pwg_cumulus_color2" value="{$PWG_CUMULUS_COLOR2}">
+    </label>      
+    </p>
+    <p class="field">
+      <label>{'Mouseover color'|@translate}
+	<input class="pwg-picker" type="text" name="pwg_cumulus_hicolor" value="{$PWG_CUMULUS_HICOLOR}">
+      </label>      
+    </p>
+  </fieldset>
+  <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
+</form>
+
Index: /extensions/pwgCumulus/template/menubar_tags.tpl
===================================================================
--- /extensions/pwgCumulus/template/menubar_tags.tpl	(revision 11344)
+++ /extensions/pwgCumulus/template/menubar_tags.tpl	(revision 11344)
@@ -0,0 +1,17 @@
+<dt>{'Related tags'|@translate}</dt>
+<dd>
+  <div id="menuTagCloud">
+    <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" width="100%" type="application/x-shockwave-flash">
+      <param name="movie" value="{$PWG_CUMULUS_SWF}/tagcloud.swf">
+      <param name="allowScriptAccess" value="sameDomain">
+      <param name="quality" value="high">
+      {if ($PWG_CUMULUS_MODE_TRANSPARENT)}
+      <param name="wmode" value="transparent">
+      {else}
+      <param name="bgcolor" value="#{$PWG_CUMULUS_BGCOLOR}">
+    {/if}
+      <param name="flashvars" value="mode=tags&tcolor={$PWG_CUMULUS_COLOR1}&tcolor2={$PWG_CUMULUS_COLOR2}&hicolor={$PWG_CUMULUS_HICOLOR}&tspeed=100&distr=true&tagcloud=<tags>{foreach from=$PWG_CUMULUS_TAGS item=tag}<a href='{$tag.URL}' style='{$tag.size}pt'>{$tag.name}</a>{/foreach}</tags>">
+    </object>
+  </div>
+</dd>
+
Index: /extensions/pwgCumulus/template/tags.tpl
===================================================================
--- /extensions/pwgCumulus/template/tags.tpl	(revision 11343)
+++ /extensions/pwgCumulus/template/tags.tpl	(revision 11344)
@@ -3,6 +3,6 @@
   <div class="titrePage">
     <ul class="categoryActions">
-      {if $display_mode == 'letters'}
-      <li>*
+      {if $display_mode != 'cloud'}
+      <li>
 	<a href="{$U_CLOUD}" title="{'show tag cloud'|@translate}" class="pwg-state-default pwg-button">
 	  <span class="pwg-icon pwg-icon-cloud">&nbsp;</span><span class="pwg-button-text">{'cloud'|@translate}</span>
@@ -19,5 +19,5 @@
       {/if}
 
-      {if $display_mode == 'cloud'}
+      {if $display_mode != 'letters'}
       <li>
 	<a href="{$U_LETTERS}" title="{'group by letters'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
@@ -45,19 +45,15 @@
 
   {if $display_mode == 'cumulus'}
-  <div id="flashcontent">This will be shown to users with no Flash or Javascript.</div>
-
-  <script type="text/javascript">
-    var so = new SWFObject("{$PWG_CUMULUS_SWF}/tagcloud.swf", "tagcloud", "{$PWG_CUMULUS_WIDTH}", "{$PWG_CUMULUS_HEIGHT}", "7", "#FFFFFF");
-    so.addParam("wmode", "transparent");
-    so.addVariable("tcolor", "{$PWG_CUMULUS_COLOR1}");
-    so.addVariable("tcolor2", "{$PWG_CUMULUS_COLOR2}");
-    so.addVariable("hicolor", "{$PWG_CUMULUS_HICOLOR}");
-    so.addVariable("mode", "tags");
-    so.addVariable("distr", "true");
-    so.addVariable("tspeed", "100");
-    so.addVariable("tagcloud", 
-    "<tags>{foreach from=$tags item=tag}<a href='{$tag.URL}' style='{$tag.size}pt'>{$tag.display_name}</a>{/foreach}</tags>");
-    so.write("flashcontent");
-  </script>
+  <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" width="{$PWG_CUMULUS_WIDTH}" height="{$PWG_CUMULUS_HEIGHT}" type="application/x-shockwave-flash">
+    <param name="movie" value="{$PWG_CUMULUS_SWF}/tagcloud.swf">
+    <param name="allowScriptAccess" value="sameDomain">
+    <param name="quality" value="high">
+    {if ($PWG_CUMULUS_MODE_TRANSPARENT)}
+    <param name="wmode" value="transparent">
+    {else}
+    <param name="bgcolor" value="#{$PWG_CUMULUS_BGCOLOR}">
+    {/if}
+    <param name="flashvars" value="mode=tags&tcolor={$PWG_CUMULUS_COLOR1}&tcolor2={$PWG_CUMULUS_COLOR2}&hicolor={$PWG_CUMULUS_HICOLOR}&tspeed=100&distr=true&tagcloud=<tags>{foreach from=$tags item=tag}<a href='{$tag.URL}' style='{$tag.size}pt'>{$tag.display_name}</a>{/foreach}</tags>">
+  </object>
   {/if}
 
