Index: /extensions/pwgCumulus/CHANGELOG
===================================================================
--- /extensions/pwgCumulus/CHANGELOG	(revision 27278)
+++ /extensions/pwgCumulus/CHANGELOG	(revision 27279)
@@ -1,2 +1,7 @@
+pwgCumulus 0.8.1 - 2014-02-09
+================================
+* Fix issue with tag with an ampersand (need encoding)
+* Allow to choose width and height in menu (either null)
+
 pwgCumulus 0.8.0 - 2013-12-23
 ================================
Index: /extensions/pwgCumulus/default_values.inc.php
===================================================================
--- /extensions/pwgCumulus/default_values.inc.php	(revision 27278)
+++ /extensions/pwgCumulus/default_values.inc.php	(revision 27279)
@@ -24,4 +24,7 @@
 $default_values['pwg_cumulus_coeff'] = 10;
 
+$default_values['pwg_cumulus_width_in_menu'] = '100%';
+$default_values['pwg_cumulus_height_in_menu'] = '100%';
+
 $default_values['pwg_cumulus_mode_transparent'] = false;
 $default_values['bgcolor'] = "FFFFFF";
Index: /extensions/pwgCumulus/include/admin_tags.inc.php
===================================================================
--- /extensions/pwgCumulus/include/admin_tags.inc.php	(revision 27278)
+++ /extensions/pwgCumulus/include/admin_tags.inc.php	(revision 27279)
@@ -27,11 +27,11 @@
 
 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']);
+  if (!empty($_POST['pwg_cumulus_width']) && $_POST['pwg_cumulus_width']!=$me->pwg_cumulus_width) {
+    $me->pwg_cumulus_width = $_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']);
+  if (isset($_POST['pwg_cumulus_height']) && $_POST['pwg_cumulus_height']!=$me->pwg_cumulus_height) {
+    $me->pwg_cumulus_height = $_POST['pwg_cumulus_height'];
     $page['infos'][] = l10n('Height updated');
     $save_config = true;
@@ -40,4 +40,16 @@
     $me->pwg_cumulus_coeff = intval($_POST['pwg_cumulus_coeff']);
     $page['infos'][] = l10n('Coefficient for tags size updated');
+    $save_config = true;
+  }
+
+  // size in menu 
+  if (!empty($_POST['pwg_cumulus_width_in_menu']) && $_POST['pwg_cumulus_width_in_menu']!=$me->pwg_cumulus_width_in_menu) {
+    $me->pwg_cumulus_width_in_menu = $_POST['pwg_cumulus_width_in_menu'];
+    $page['infos'][] = l10n('Width in menu updated');
+    $save_config = true;
+  }
+  if (isset($_POST['pwg_cumulus_height_in_menu']) && $_POST['pwg_cumulus_height_in_menu']!=$me->pwg_cumulus_height_in_menu) {
+    $me->pwg_cumulus_height_in_menu = $_POST['pwg_cumulus_height_in_menu'];
+    $page['infos'][] = l10n('Height in menu updated');
     $save_config = true;
   }
@@ -80,4 +92,6 @@
 $template->assign('PWG_CUMULUS_WIDTH', $me->pwg_cumulus_width); 
 $template->assign('PWG_CUMULUS_HEIGHT', $me->pwg_cumulus_height); 
+$template->assign('PWG_CUMULUS_WIDTH_IN_MENU', $me->pwg_cumulus_width_in_menu); 
+$template->assign('PWG_CUMULUS_HEIGHT_IN_MENU', $me->pwg_cumulus_height_in_menu); 
 $template->assign('PWG_CUMULUS_COEFF', $me->pwg_cumulus_coeff); 
 $template->assign('PWG_CUMULUS_MODE_TRANSPARENT', $me->pwg_cumulus_mode_transparent);
Index: /extensions/pwgCumulus/include/pwgCumulusContent.class.php
===================================================================
--- /extensions/pwgCumulus/include/pwgCumulusContent.class.php	(revision 27278)
+++ /extensions/pwgCumulus/include/pwgCumulusContent.class.php	(revision 27279)
@@ -101,11 +101,13 @@
             $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_WIDTH', htmlspecialchars($this->plugin_config->pwg_cumulus_width,ENT_COMPAT,'UTF-8'));
+            $template->assign('PWG_CUMULUS_HEIGHT', htmlspecialchars($this->plugin_config->pwg_cumulus_height,ENT_COMPAT,'UTF-8'));
+            $template->assign('PWG_CUMULUS_WIDTH_IN_MENU', htmlspecialchars($this->plugin_config->pwg_cumulus_width_in_menu,ENT_COMPAT,'UTF-8'));
+            $template->assign('PWG_CUMULUS_HEIGHT_IN_MENU', htmlspecialchars($this->plugin_config->pwg_cumulus_height_in_menu,ENT_COMPAT,'UTF-8'));
             $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);
+            $template->assign('PWG_CUMULUS_BGCOLOR', htmlspecialchars($this->plugin_config->pwg_cumulus_bgcolor,ENT_COMPAT,'UTF-8'));
+            $template->assign('PWG_CUMULUS_COLOR1', '0x'.htmlspecialchars($this->plugin_config->pwg_cumulus_color1,ENT_COMPAT,'UTF-8'));
+            $template->assign('PWG_CUMULUS_COLOR2', '0x'.htmlspecialchars($this->plugin_config->pwg_cumulus_color2,ENT_COMPAT,'UTF-8'));
+            $template->assign('PWG_CUMULUS_HICOLOR', '0x'.htmlspecialchars($this->plugin_config->pwg_cumulus_hicolor,ENT_COMPAT,'UTF-8'));
             foreach ($mbCumulus->data as &$tag) {
                 $tag['size'] = $this->plugin_config->pwg_cumulus_coeff * $tag['level'];
@@ -113,4 +115,5 @@
                     $tag['URL'] = $tag['U_ADD'];
                 }
+                $tag['display_name'] = urlencode($tag['name']);
             }
             $template->assign('PWG_CUMULUS_TAGS', $mbCumulus->data);
Index: /extensions/pwgCumulus/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/pwgCumulus/language/fr_FR/plugin.lang.php	(revision 27278)
+++ /extensions/pwgCumulus/language/fr_FR/plugin.lang.php	(revision 27279)
@@ -26,4 +26,5 @@
 $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['Animation width and height in menu'] = 'Dimensions de l\'animation dans le menu';
 $lang['Background color'] = 'Couleur de fond';
 $lang['Background color updated'] = 'La couleur de fond a été mise à jour';
@@ -58,4 +59,5 @@
 $lang['Width'] = 'Largeur';
 $lang['Width updated'] = 'La largeur a été mise à jour';
+$lang['Width or height can be null to allow animation using all the space'] = 'Vous pouvez omettre (valeur nulle ou vide) la largeur ou la hauteur pour que l\'animation occupe toute la place disponible.';
 $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';
Index: /extensions/pwgCumulus/language/templates/plugin.lang.php
===================================================================
--- /extensions/pwgCumulus/language/templates/plugin.lang.php	(revision 27278)
+++ /extensions/pwgCumulus/language/templates/plugin.lang.php	(revision 27279)
@@ -26,4 +26,5 @@
 $lang['Animation configuration : size, tags colors, tags size'] = '';
 $lang['Animation width and height'] = '';
+$lang['Animation width and height in menu'] = '';
 $lang['Background color'] = '';
 $lang['Background color updated'] = '';
@@ -43,4 +44,5 @@
 $lang['Height'] = '';
 $lang['Height updated'] = '';
+$lang['Height in menu updated'] = '';
 $lang['Menu'] = '';
 $lang['Mouseover color'] = '';
@@ -59,4 +61,6 @@
 $lang['Width'] = '';
 $lang['Width updated'] = '';
+$lang['Width in menu updated'] = '';
+$lang['Width or height can be null to allow animation using all the space'] = '';
 $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'] = '';
Index: /extensions/pwgCumulus/main.inc.php
===================================================================
--- /extensions/pwgCumulus/main.inc.php	(revision 27278)
+++ /extensions/pwgCumulus/main.inc.php	(revision 27279)
@@ -22,5 +22,5 @@
 /*
 Plugin Name: pwgCumulus
-Version: 0.8.0
+Version: 0.8.1
 Description: add an amazing tag cloud
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=263
Index: /extensions/pwgCumulus/template/admin_tags.tpl
===================================================================
--- /extensions/pwgCumulus/template/admin_tags.tpl	(revision 27278)
+++ /extensions/pwgCumulus/template/admin_tags.tpl	(revision 27279)
@@ -19,4 +19,20 @@
       </label>
     </p>
+    <p class="info">({'Width or height can be null to allow animation using all the space'|@translate})</p>
+  </fieldset>
+
+  <fieldset>
+    <legend>{'Animation width and height in menu'|@translate}</legend>
+    <p class="field">
+      <label>{'Width'|@translate}
+	<input type="text" name="pwg_cumulus_width_in_menu" value="{$PWG_CUMULUS_WIDTH_IN_MENU}">
+      </label>
+    </p>
+    <p class="field">
+      <label>{'Height'|@translate}
+      <input type="text" name="pwg_cumulus_height_in_menu" value="{$PWG_CUMULUS_HEIGHT_IN_MENU}">
+      </label>
+    </p>
+    <p class="info">({'Width or height can be null to allow animation using all the space'|@translate})</p>
   </fieldset>
   
Index: /extensions/pwgCumulus/template/menubar_tags.tpl
===================================================================
--- /extensions/pwgCumulus/template/menubar_tags.tpl	(revision 27278)
+++ /extensions/pwgCumulus/template/menubar_tags.tpl	(revision 27279)
@@ -2,5 +2,8 @@
 <dd>
   <div id="menuTagCloud">
-    <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" width="100%" type="application/x-shockwave-flash">
+    <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" 
+	    {if !empty($PWG_CUMULUS_WIDTH_IN_MENU)}width="{$PWG_CUMULUS_WIDTH_IN_MENU}" {/if}
+	    {if !empty($PWG_CUMULUS_HEIGHT_IN_MENU)}height="{$PWG_CUMULUS_HEIGHT_IN_MENU}" {/if}
+	    type="application/x-shockwave-flash">
       <param name="movie" value="{$PWG_CUMULUS_SWF}/tagcloud.swf">
       <param name="allowScriptAccess" value="sameDomain">
@@ -10,6 +13,6 @@
       {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>">
+      {/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.display_name}</a>{/foreach}</tags>">
     </object>
   </div>
Index: /extensions/pwgCumulus/template/tags.tpl
===================================================================
--- /extensions/pwgCumulus/template/tags.tpl	(revision 27278)
+++ /extensions/pwgCumulus/template/tags.tpl	(revision 27279)
@@ -44,5 +44,8 @@
 
   {if $display_mode == 'cumulus'}
-  <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" width="{$PWG_CUMULUS_WIDTH}" height="{$PWG_CUMULUS_HEIGHT}" type="application/x-shockwave-flash">
+  <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" 
+	  {if !empty($PWG_CUMULUS_WIDTH)}width="{$PWG_CUMULUS_WIDTH}" {/if}
+	  {if !empty($PWG_CUMULUS_HEIGHT)}height="{$PWG_CUMULUS_HEIGHT}" {/if}
+	  type="application/x-shockwave-flash">
     <param name="movie" value="{$PWG_CUMULUS_SWF}/tagcloud.swf">
     <param name="allowScriptAccess" value="sameDomain">
