Changeset 11344


Ignore:
Timestamp:
Jun 13, 2011, 10:54:28 PM (13 years ago)
Author:
nikrou
Message:

Remove dependency to swfObject
Allow admin to use animation in main menu

Location:
extensions/pwgCumulus
Files:
5 added
1 deleted
14 edited
3 copied

Legend:

Unmodified
Added
Removed
  • extensions/pwgCumulus/CHANGELOG

    r11226 r11344  
     1pwgCumulus 0.6.0 - 2011-06-13
     2================================
     3* Remove dependency to swfObject
     4* Allow admin to use animation in main menu
     5
    16pwgCumulus 0.5.3 - 2011-06-04
    27================================
  • extensions/pwgCumulus/MANIFEST

    r11105 r11344  
    11pwgCumulus/js/colorpicker.js
    2 pwgCumulus/js/swfobject.js
     2pwgCumulus/js/colorpicker.instance.js
     3pwgCumulus/include/admin_menu.inc.php
    34pwgCumulus/include/pwgCumulusConfig.class.php
    45pwgCumulus/include/pwgCumulusContent.class.php
     6pwgCumulus/include/admin_tags.inc.php
     7pwgCumulus/include/admin_main.inc.php
    58pwgCumulus/maintain.inc.php
    69pwgCumulus/MANIFEST
     
    8285pwgCumulus/default_values.inc.php
    8386pwgCumulus/Makefile
     87pwgCumulus/template/admin_tags.tpl
    8488pwgCumulus/template/admin.tpl
     89pwgCumulus/template/admin_menu.tpl
    8590pwgCumulus/template/tags.tpl
     91pwgCumulus/template/menubar_tags.tpl
     92pwgCumulus/template/admin_main.tpl
  • extensions/pwgCumulus/admin.php

    r10954 r11344  
    2626load_language('plugin.lang', PWG_CUMULUS_PLUGIN_LANG);
    2727
     28include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
     29
    2830$me = get_plugin_data($plugin_id);
    29 $save_config = false;
    3031
    31 if (!empty($_POST['submit'])) {
    32   if (!empty($_POST['pwg_cumulus_width']) && intval($_POST['pwg_cumulus_width'])!=$me->pwg_cumulus_width) {
    33     $me->pwg_cumulus_width = intval($_POST['pwg_cumulus_width']);
    34     $page['infos'][] = l10n('Width updated');
    35     $save_config = true;
    36   }
    37   if (!empty($_POST['pwg_cumulus_height']) && intval($_POST['pwg_cumulus_height'])!=$me->pwg_cumulus_height) {
    38     $me->pwg_cumulus_height = intval($_POST['pwg_cumulus_height']);
    39     $page['infos'][] = l10n('Height updated');
    40     $save_config = true;
    41   }
    42   if (!empty($_POST['pwg_cumulus_coeff']) && intval($_POST['pwg_cumulus_coeff'])!=$me->pwg_cumulus_coeff) {
    43     $me->pwg_cumulus_coeff = intval($_POST['pwg_cumulus_coeff']);
    44     $page['infos'][] = l10n('Coefficient for tags size updated');
    45     $save_config = true;
    46   }
     32$Tabs = array('main' => l10n('Dashboard'),
     33              'menu' => l10n('Menu'),
     34              'tags' => l10n('Tags page')
     35              );
     36$default_tab = 'main';
     37$cc_base_url = get_admin_plugin_menu_link(__FILE__);
    4738
    48   if (!empty($_POST['pwg_cumulus_color1']) && trim($_POST['pwg_cumulus_color1'])!=$me->pwg_cumulus_color1) {
    49     $me->pwg_cumulus_color1 = str_replace('#', '', $_POST['pwg_cumulus_color1']);
    50     $page['infos'][] = l10n('Color 1 updated');
    51     $save_config = true;
    52   }
    53   if (!empty($_POST['pwg_cumulus_color2']) && trim($_POST['pwg_cumulus_color2'])!=$me->pwg_cumulus_color2) {
    54     $me->pwg_cumulus_color2 = str_replace('#', '', $_POST['pwg_cumulus_color2']);
    55     $page['infos'][] = l10n('Color 2 updated');
    56     $save_config = true;
    57   }
    58   if (!empty($_POST['pwg_cumulus_hicolor']) && trim($_POST['pwg_cumulus_hicolor'])!=$me->pwg_cumulus_hicolor) {
    59     $me->pwg_cumulus_hicolor = str_replace('#', '', $_POST['pwg_cumulus_hicolor']);
    60     $page['infos'][] = l10n('Mouseover color updated');
    61     $save_config = true;
    62   }
    63 
    64   if ($save_config) {
    65     $me->save_config();
    66   }
     39// tabsheet
     40if (!isset($_GET['tab']) or !isset($Tabs[$_GET['tab']])) {
     41  $page['tab'] = $default_tab;
     42} else {
     43  $page['tab'] = $_GET['tab'];
    6744}
    6845
    69 $GLOBALS['template']->set_filenames(array('plugin_admin_content' => PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin.tpl'));
    70 $GLOBALS['template']->assign('PWG_CUMULUS_PLUGIN_CSS', PWG_CUMULUS_PLUGIN_CSS);
    71 $GLOBALS['template']->assign('PWG_CUMULUS_PLUGIN_JS', PWG_CUMULUS_PLUGIN_JS);
    72 $GLOBALS['template']->assign('PWG_CUMULUS_WIDTH', $me->pwg_cumulus_width);
    73 $GLOBALS['template']->assign('PWG_CUMULUS_HEIGHT', $me->pwg_cumulus_height);
    74 $GLOBALS['template']->assign('PWG_CUMULUS_COEFF', $me->pwg_cumulus_coeff);
    75 $GLOBALS['template']->assign('PWG_CUMULUS_COLOR1', $me->pwg_cumulus_color1);
    76 $GLOBALS['template']->assign('PWG_CUMULUS_COLOR2', $me->pwg_cumulus_color2);
    77 $GLOBALS['template']->assign('PWG_CUMULUS_HICOLOR', $me->pwg_cumulus_hicolor);
    78 $GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     46$tabsheet = new tabsheet();
     47foreach ($Tabs as $key => $label) {
     48  $tabsheet->add($key, $label, $cc_base_url.'&tab='.$key);
     49}
     50$tabsheet->select($page['tab']);
     51$tabsheet->assign();
     52
     53include_once(PWG_CUMULUS_PLUGIN_ROOT . '/include/admin_' . $page['tab'] . '.inc.php');
     54
     55$template->set_filename('plugin_admin_content', PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin.tpl');
     56$template->assign('PWG_CUMULUS_PLUGIN_CSS', PWG_CUMULUS_PLUGIN_CSS);
     57$template->assign('PWG_CUMULUS_PLUGIN_JS', PWG_CUMULUS_PLUGIN_JS);
     58$template->assign('PWG_CUMULUS_TAB_ACTION', PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin_' . $page['tab'] . '.tpl');
     59$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
    7960?>
  • extensions/pwgCumulus/css/admin.css

    r5323 r11344  
    1 form fieldset { 
    2   text-align: left;
     1form fieldset {
     2  text-align:left;
    33}
    44
    5 pre { 
     5pre {
    66  margin-left: 20px;
    7   background-color: #444444;
    8   padding: 1em;
    9   color: #FFFFFF;
     7  background-color: #444;
     8  padding:1em;
     9  color:#FFF;
    1010}
    1111
    12 form p.field, p {
     12form p.field, form fieldset p, form p, p {
    1313  text-align: left;
    1414  margin-left: 20px;
     
    1616
    1717label {
    18   display : block;
     18  display:block;
    1919}
    2020
    21 p.field {
     21p.field { 
    2222  position: relative;
    2323}
     
    3535}
    3636
     37p.field-position input, p.field-position label {
     38  float: left;
     39}
    3740
    38 
    39 
     41p.field-position label {
     42  margin-right: 10px;
     43}
  • extensions/pwgCumulus/default_values.inc.php

    r6433 r11344  
    2424$default_values['pwg_cumulus_coeff'] = 10;
    2525
     26$default_values['pwg_cumulus_mode_transparent'] = false;
     27$default_values['bgcolor'] = "FFFFFF";
    2628$default_values['color1'] = "333333";
    2729$default_values['color2'] = "FF3363";
  • extensions/pwgCumulus/include/admin_main.inc.php

    r11226 r11344  
    2020// +-----------------------------------------------------------------------+
    2121
    22 /*
    23 Plugin Name: pwgCumulus
    24 Version: 0.5.3
    25 Description: add an amazing tag cloud
    26 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=263
    27 Author: nikrou
    28 Author URI: http://www.nikrou.net/
    29 */
     22$plugin_main = file_get_contents(dirname(__FILE__) . '/../main.inc.php');
     23$version = '';
    3024
    31 if (!defined('PHPWG_ROOT_PATH')) {
    32   die('Hacking attempt!');
     25if (preg_match('`Version: (.*)`', $plugin_main, $matches)) {
     26  $version = trim($matches[1]);
    3327}
    3428
    35 include_once(dirname(__FILE__).'/init.php');
    36 ?>
     29$template->assign('PWG_CUMULUS_PLUGIN_VERSION', $version);
  • extensions/pwgCumulus/include/admin_tags.inc.php

    r11226 r11344  
    2020// +-----------------------------------------------------------------------+
    2121
    22 if (!defined('PHPWG_ROOT_PATH')) {
    23   die('Hacking attempt!');
    24 }
    25 
    26 load_language('plugin.lang', PWG_CUMULUS_PLUGIN_LANG);
    27 
    28 $me = get_plugin_data($plugin_id);
    2922$save_config = false;
    3023
     
    4639  }
    4740
     41  if (!empty($_POST['pwg_cumulus_mode_transparent']) && !$me->pwg_cumulus_mode_transparent) {
     42    $me->pwg_cumulus_mode_transparent = true;
     43    $page['infos'][] = l10n('Transparent mode is used');
     44    $save_config = true;
     45  } elseif (empty($_POST['pwg_cumulus_mode_transparent']) && $me->pwg_cumulus_mode_transparent) {
     46    $me->pwg_cumulus_mode_transparent = false;
     47    $page['infos'][] = l10n('Transparent mode is not used');
     48    $save_config = true;
     49  }
     50  if (!empty($_POST['pwg_cumulus_bgcolor']) && trim($_POST['pwg_cumulus_bgcolor'])!=$me->pwg_cumulus_bgcolor) {
     51    $me->pwg_cumulus_bgcolor = str_replace('#', '', $_POST['pwg_cumulus_bgcolor']);
     52    $page['infos'][] = l10n('Background color updated');
     53    $save_config = true;
     54  }
    4855  if (!empty($_POST['pwg_cumulus_color1']) && trim($_POST['pwg_cumulus_color1'])!=$me->pwg_cumulus_color1) {
    4956    $me->pwg_cumulus_color1 = str_replace('#', '', $_POST['pwg_cumulus_color1']);
     
    6774}
    6875
    69 $GLOBALS['template']->set_filenames(array('plugin_admin_content' => PWG_CUMULUS_PLUGIN_TEMPLATE . '/admin.tpl'));
    70 $GLOBALS['template']->assign('PWG_CUMULUS_PLUGIN_CSS', PWG_CUMULUS_PLUGIN_CSS);
    71 $GLOBALS['template']->assign('PWG_CUMULUS_PLUGIN_JS', PWG_CUMULUS_PLUGIN_JS);
    72 $GLOBALS['template']->assign('PWG_CUMULUS_WIDTH', $me->pwg_cumulus_width);
    73 $GLOBALS['template']->assign('PWG_CUMULUS_HEIGHT', $me->pwg_cumulus_height);
    74 $GLOBALS['template']->assign('PWG_CUMULUS_COEFF', $me->pwg_cumulus_coeff);
    75 $GLOBALS['template']->assign('PWG_CUMULUS_COLOR1', $me->pwg_cumulus_color1);
    76 $GLOBALS['template']->assign('PWG_CUMULUS_COLOR2', $me->pwg_cumulus_color2);
    77 $GLOBALS['template']->assign('PWG_CUMULUS_HICOLOR', $me->pwg_cumulus_hicolor);
    78 $GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     76$template->assign('PWG_CUMULUS_WIDTH', $me->pwg_cumulus_width);
     77$template->assign('PWG_CUMULUS_HEIGHT', $me->pwg_cumulus_height);
     78$template->assign('PWG_CUMULUS_COEFF', $me->pwg_cumulus_coeff);
     79$template->assign('PWG_CUMULUS_MODE_TRANSPARENT', $me->pwg_cumulus_mode_transparent);
     80$template->assign('PWG_CUMULUS_BGCOLOR', $me->pwg_cumulus_bgcolor);
     81$template->assign('PWG_CUMULUS_COLOR1', $me->pwg_cumulus_color1);
     82$template->assign('PWG_CUMULUS_COLOR2', $me->pwg_cumulus_color2);
     83$template->assign('PWG_CUMULUS_HICOLOR', $me->pwg_cumulus_hicolor);
    7984?>
  • extensions/pwgCumulus/include/pwgCumulusConfig.class.php

    r6433 r11344  
    33// | pwgCumulus  - a plugin for Piwigo                                     |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
     5// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/pwgCumulus/include/pwgCumulusContent.class.php

    r9038 r11344  
    2727
    2828  public function loc_begin_page_header() {
     29    global $template;
     30
    2931    if (!empty($_GET['display_mode']) && $_GET['display_mode']=='cumulus') {
    30       $GLOBALS['template']->assign('display_mode', 'cumulus');
     32      $template->assign('display_mode', 'cumulus');
    3133    }
    3234
    33     $GLOBALS['template']->set_filenames(array('tags'=> PWG_CUMULUS_PLUGIN_TEMPLATE . '/tags.tpl'));
    34    
    35     if (version_compare(PHPWG_VERSION, '2.2', '>=') || (PHPWG_VERSION=='Colibri')) {
    36       $GLOBALS['template']->func_combine_script(array('id' => 'swfobject',
    37                                                       'path' => PWG_CUMULUS_PLUGIN_JS. '/swfobject.js'
    38                                                       ),
    39                                                 $GLOBALS['template']->smarty
    40                                                 );
    41     } else {
    42       $GLOBALS['template']->func_known_script(array('id' => 'swfobject',
    43                                                     'src' => PWG_CUMULUS_PLUGIN_JS. '/swfobject.js'
    44                                                     ),
    45                                               $GLOBALS['template']->smarty
    46                                               );
     35    $template->set_filenames(array('tags'=> PWG_CUMULUS_PLUGIN_TEMPLATE . '/tags.tpl'));
     36       
     37    $template->assign('PWG_CUMULUS_SWF', PWG_CUMULUS_PLUGIN_SWF);
     38    $template->assign('PWG_CUMULUS_IMGS', PWG_CUMULUS_PLUGIN_IMGS);
     39
     40    $template->assign('PWG_CUMULUS_WIDTH', $this->plugin_config->pwg_cumulus_width);
     41    $template->assign('PWG_CUMULUS_HEIGHT', $this->plugin_config->pwg_cumulus_height);
     42    $template->assign('PWG_CUMULUS_HREF', get_root_url().'tags.php?display_mode=cumulus');
     43
     44    $template->assign('PWG_CUMULUS_MODE_TRANSPARENT', $this->plugin_config->pwg_cumulus_mode_transparent);
     45    $template->assign('PWG_CUMULUS_BGCOLOR', $this->plugin_config->pwg_cumulus_bgcolor);
     46    $template->assign('PWG_CUMULUS_COLOR1', '0x'.$this->plugin_config->pwg_cumulus_color1);
     47    $template->assign('PWG_CUMULUS_COLOR2', '0x'.$this->plugin_config->pwg_cumulus_color2);
     48    $template->assign('PWG_CUMULUS_HICOLOR', '0x'.$this->plugin_config->pwg_cumulus_hicolor);
     49
     50    if (!empty($template->smarty->_tpl_vars['tags'])) {
     51      foreach ($template->smarty->_tpl_vars['tags'] as $key => &$tag) {
     52        $tag['display_name'] = urlencode($tag['name']);
     53        $tag['size'] = $this->plugin_config->pwg_cumulus_coeff * $tag['level'];
     54      }
    4755    }
    48    
    49     $GLOBALS['template']->assign('PWG_CUMULUS_SWF', PWG_CUMULUS_PLUGIN_SWF);
    50     $GLOBALS['template']->assign('PWG_CUMULUS_IMGS', PWG_CUMULUS_PLUGIN_IMGS);
     56  }
    5157
    52     $GLOBALS['template']->assign('PWG_CUMULUS_WIDTH', $this->plugin_config->pwg_cumulus_width);
    53     $GLOBALS['template']->assign('PWG_CUMULUS_HEIGHT', $this->plugin_config->pwg_cumulus_height);
    54     $GLOBALS['template']->assign('PWG_CUMULUS_HREF', get_root_url().'tags.php?display_mode=cumulus');
     58  public function blockmanager_register_blocks($menu_ref_arr) {
     59    if (!$this->plugin_config->pwg_cumulus_in_main_menu) {
     60      return;
     61    }
     62    $menu = &$menu_ref_arr[0];
     63    if ($menu->get_id() != 'menubar') {
     64      return;
     65    }
     66    $menu->register_block(new RegisteredBlock('mbCumulus', 'Cumulus', 'piwigo'));
     67  }
    5568
    56     $GLOBALS['template']->assign('PWG_CUMULUS_COLOR1', '0x'.$this->plugin_config->pwg_cumulus_color1);
    57     $GLOBALS['template']->assign('PWG_CUMULUS_COLOR2', '0x'.$this->plugin_config->pwg_cumulus_color2);
    58     $GLOBALS['template']->assign('PWG_CUMULUS_HICOLOR', '0x'.$this->plugin_config->pwg_cumulus_hicolor);
    5969
    60     if (!empty($GLOBALS['template']->smarty->_tpl_vars['tags'])) {
    61       foreach ($GLOBALS['template']->smarty->_tpl_vars['tags'] as $key => &$tag) {
    62         $tag['display_name'] = urlencode($tag['name']);
    63         $tag['size'] = $this->plugin_config->pwg_cumulus_coeff*$tag['level'];
     70  public function blockmanager_apply($menu_ref_arr) {
     71    global $template;
     72
     73    if (!$this->plugin_config->pwg_cumulus_in_main_menu) {
     74      return;
     75    }
     76
     77    load_language('plugin.lang', PWG_CUMULUS_PLUGIN_LANG);
     78
     79    $menu = &$menu_ref_arr[0];
     80    if ($menu->get_id() != 'menubar') {
     81      return;
     82    }
     83
     84    include_once(PHPWG_ROOT_PATH.'include/block.class.php');
     85
     86    if (($mbCumulus = $menu->get_block('mbTags'))!==null) {
     87      if (empty($mbCumulus->data)) {
     88        return;
    6489      }
     90      if ($this->plugin_config->position_order!=null
     91          && $this->plugin_config->position_block_id!=null) {
     92        $related_block = $menu->get_block($this->plugin_config->position_block_id);
     93        if ($this->plugin_config->position_order=='after') {
     94          $mbCumulus->set_position($related_block->get_position()+1);
     95        } else {
     96          $mbCumulus->set_position($related_block->get_position()-1);
     97        }
     98      }
     99
     100      $template->assign('PWG_CUMULUS_SWF', PWG_CUMULUS_PLUGIN_SWF);
     101      $template->assign('PWG_CUMULUS_IMGS', PWG_CUMULUS_PLUGIN_IMGS);
     102     
     103      $template->assign('PWG_CUMULUS_WIDTH', $this->plugin_config->pwg_cumulus_width);
     104      $template->assign('PWG_CUMULUS_HEIGHT', $this->plugin_config->pwg_cumulus_height);
     105      $template->assign('PWG_CUMULUS_MODE_TRANSPARENT', $this->plugin_config->pwg_cumulus_mode_transparent);
     106      $template->assign('PWG_CUMULUS_BGCOLOR', $this->plugin_config->pwg_cumulus_bgcolor);
     107      $template->assign('PWG_CUMULUS_COLOR1', '0x'.$this->plugin_config->pwg_cumulus_color1);
     108      $template->assign('PWG_CUMULUS_COLOR2', '0x'.$this->plugin_config->pwg_cumulus_color2);
     109      $template->assign('PWG_CUMULUS_HICOLOR', '0x'.$this->plugin_config->pwg_cumulus_hicolor);
     110      foreach ($mbCumulus->data as &$tag) {
     111        $tag['size'] = $this->plugin_config->pwg_cumulus_coeff * $tag['level'];
     112        if (!empty($tag['U_ADD'])) {
     113          $tag['URL'] = $tag['U_ADD'];
     114        }
     115      }
     116      $template->assign('PWG_CUMULUS_TAGS', $mbCumulus->data);
     117      $mbCumulus->template = PWG_CUMULUS_PLUGIN_TEMPLATE . '/menubar_tags.tpl';
    65118    }
    66119  }
  • extensions/pwgCumulus/init.php

    r6433 r11344  
    33// | pwgCumulus  - a plugin for Piwigo                                     |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
     5// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/pwgCumulus/language/fr_FR/plugin.lang.php

    r10954 r11344  
    2020// +-----------------------------------------------------------------------+
    2121
    22 $lang['Cumulus Tags Cloud Plugin'] = "Plugin Cumulus Tags Cloud";
    23 $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.";
    24 $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";
    25 $lang['Animation width and height'] = "Dimensions de l'animation";
    26 $lang['Width'] = "Largeur";
    27 $lang['Height'] = "Hauteur";
    28 $lang['Tags size'] = "Taille des tags";
    29 $lang['Coefficient'] = "Coefficient";
    30 $lang['Width updated'] = "La largeur a été mise à jour";
    31 $lang['Height updated'] = "La hauteur a été mise à jour";
    32 $lang['Coefficient for tags size updated'] = "Le coefficient multiplicateur des tags a été mis à jour";
    33 $lang['Show tag cloud in cumulus mode'] = "Utiliser le mode cumulus pour afficher le nuage de tags";
    34 $lang['Animation colors'] = "Couleurs de l'animation";
    35 $lang['Color 1'] = "Couleur 1";
    36 $lang['Color 2'] = "Couleur 2";
    37 $lang['Mouseover color'] = "Couleur au survol";
    38 $lang['Color 1 updated'] = "La couleur 1 a été mise à jour";
    39 $lang['Color 2 updated'] = "La couleur 2 a été mise à jour";
    40 $lang['Mouseover color updated'] = "La couleur hicolor a été mise à jour";
     22// admin
     23$lang['Add tags cloud in main menu'] = 'Ajouter le nuage Cumulus dans menu principal';
     24$lang['After'] = 'Après';
     25$lang['Animation colors'] = 'Couleurs de l\'animation';
     26$lang['Animation configuration : size, tags colors, tags size'] = 'Configuration de l\'animation : taille, couleurs des tags, taille des tags';
     27$lang['Animation width and height'] = 'Dimensions de l\'animation';
     28$lang['Background color'] = 'Couleur de fond';
     29$lang['Background color updated'] = 'La couleur de fond a été mise à jour';
     30$lang['Before'] = 'Avant';
     31$lang['block'] = 'le bloc';
     32$lang['Check the checkbox to add tags cloud in main menu'] = 'Cochez la case pour ajouter le nuage Cumulus dans le menu principal';
     33$lang['Check the checkbox to use transparent mode for background'] = 'Cochez la case pour utiliser le mode transparence';
     34$lang['Coefficient'] = 'Coefficient';
     35$lang['Coefficient for tags size updated'] = 'Le coefficient multiplicateur des tags a été mis à jour';
     36$lang['Color 1'] = 'Couleur 1';
     37$lang['Color 1 updated'] = 'La couleur 1 a été mise à jour';
     38$lang['Color 2'] = 'Couleur 2';
     39$lang['Color 2 updated'] = 'La couleur 2 a été mise à jour';
     40$lang['Cumulus Tags Cloud Plugin'] = 'Plugin Cumulus Tags Cloud';
     41$lang['Current release:'] = 'Version courante';
     42$lang['Height'] = 'Hauteur';
     43$lang['Height updated'] = 'La hauteur a été mise à jour';
     44$lang['Menu'] = 'Menu';
     45$lang['Mouseover color'] = 'Couleur au survol';
     46$lang['Mouseover color updated'] = 'La couleur hicolor a été mise à jour';
     47$lang['Position'] = 'Position';
     48$lang['Position in main menu has been updated'] = 'La position dans le mneu principal a été mise à jour';
     49$lang['Tags cloud added in main menu'] = 'Le nuage Cumulus a été ajouté dans le menu principal';
     50$lang['Tags cloud in main menu?'] = 'Ajoutez le nuage Cumulus dans le menu principal ?';
     51$lang['Tags cloud removed from main menu'] = 'Le nuage Cumulus a été enlevé du menu principal';
     52$lang['Tags page'] = 'Page des tags';
     53$lang['Tags size'] = 'Taille des tags';
     54$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.';
     55$lang['Transparent mode for background'] = 'Mode transparence pour le fond de l\'animation';
     56$lang['Transparent mode is not used'] = 'Le mode transparence n\'est pas utilisé';
     57$lang['Transparent mode is used'] = 'Le mode transparence est utilisé';
     58$lang['Width'] = 'Largeur';
     59$lang['Width updated'] = 'La largeur a été mise à jour';
     60$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';
     61$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';
     62
     63// public
     64$lang['cloud'] = 'nuage';
     65$lang['cumulus cloud'] = 'Nuage cumulus';
     66$lang['Show tag cloud'] = 'Utiliser le mode cumulus pour afficher le nuage de tags';
    4167?>
  • extensions/pwgCumulus/language/templates/plugin.lang.php

    r10954 r11344  
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
    8 // | it under the terms of the GNU General Public License as published by  |
    9 // | the Free Software Foundation                                          |
     8// | it under the terms of the GNU General Public License version 2 as     |
     9// | published by  the Free Software Foundation                            |
    1010// |                                                                       |
    1111// | This program is distributed in the hope that it will be useful, but   |
     
    1616// | You should have received a copy of the GNU General Public License     |
    1717// | along with this program; if not, write to the Free Software           |
    18 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
    19 // | USA.                                                                  |
     18// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
     19// | MA 02110-1301 USA                                                     |
    2020// +-----------------------------------------------------------------------+
    2121
    2222// admin
     23$lang['Add tags cloud in main menu'] = '';
     24$lang['After'] = '';
    2325$lang['Animation colors'] = '';
     26$lang['Animation configuration : size, tags colors, tags size'] = '';
    2427$lang['Animation width and height'] = '';
     28$lang['Background color'] = '';
     29$lang['Background color updated'] = '';
     30$lang['Before'] = '';
     31$lang['block'] = '';
     32$lang['Check the checkbox to add tags cloud in main menu'] = '';
     33$lang['Check the checkbox to use transparent mode for background'] = '';
    2534$lang['Coefficient'] = '';
    2635$lang['Coefficient for tags size updated'] = '';
     
    3039$lang['Color 2 updated'] = '';
    3140$lang['Cumulus Tags Cloud Plugin'] = '';
     41$lang['Current release:'] = '';
     42$lang['Dashboard'] = '';
    3243$lang['Height'] = '';
    3344$lang['Height updated'] = '';
     45$lang['Menu'] = '';
    3446$lang['Mouseover color'] = '';
    3547$lang['Mouseover color updated'] = '';
    36 $lang['Submit'] = '';
     48$lang['Position'] = '';
     49$lang['Position in main menu has been updated'] = '';
     50$lang['Tags cloud added in main menu'] = '';
     51$lang['Tags cloud in main menu?'] = '';
     52$lang['Tags cloud removed from main menu'] = '';
     53$lang['Tags page'] = '';
    3754$lang['Tags size'] = '';
    3855$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.'] = '';
    39 $lang['You can choose that mode for tags default display mode by adding (or changing) in the configuration file'] = '';
     56$lang['Transparent mode for background'] = '';
     57$lang['Transparent mode is not used'] = '';
     58$lang['Transparent mode is used'] = '';
    4059$lang['Width'] = '';
    4160$lang['Width updated'] = '';
     61$lang['You can choose that mode for tags default display mode by adding (or changing) in the configuration file'] = '';
     62$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'] = '';
    4263
    4364// public
    4465$lang['cloud'] = '';
    4566$lang['cumulus cloud'] = '';
    46 $lang['group by letters'] = '';
    47 $lang['Home'] = '';
    48 $lang['letters'] = '';
    4967$lang['show tag cloud'] = '';
    50 $lang['Tags'] = '';
    5168?>
  • extensions/pwgCumulus/main.inc.php

    r11226 r11344  
    2222/*
    2323Plugin Name: pwgCumulus
    24 Version: 0.5.3
     24Version: 0.6.0
    2525Description: add an amazing tag cloud
    2626Plugin URI: http://piwigo.org/ext/extension_view.php?eid=263
  • extensions/pwgCumulus/public.php

    r6433 r11344  
    2626add_event_handler('loc_begin_page_header',
    2727                  array($public_content, 'loc_begin_page_header')
    28   );
     28                  );
     29add_event_handler('blockmanager_register_blocks',
     30                  array($public_content, 'blockmanager_register_blocks')
     31                  );
     32add_event_handler('blockmanager_apply',
     33                  array($public_content, 'blockmanager_apply')
     34                  );
    2935?>
  • extensions/pwgCumulus/template/admin.tpl

    r10991 r11344  
    11{combine_css path="$PWG_CUMULUS_PLUGIN_CSS/admin.css"}
    2 {combine_css path="$PWG_CUMULUS_PLUGIN_CSS/colorpicker.css"}
    3 
    4 {combine_script id="colorpicker" require="jquery" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.js"}
    5 {footer_script require="colorpicker"}{literal}
    6 $(function() {
    7 $('input.pwg-picker')
    8   .each(function() {
    9       if ($(this).val() !== undefined) {
    10         if ($(this).val().indexOf('#',0)==-1) {
    11            $(this).css('background-color', '#'+$(this).val());
    12         } else {
    13            $(this).css('background-color', $(this).val());
    14         }
    15       }
    16     })
    17   .ColorPicker({
    18     onSubmit: function(hsb, hex, rgb, el) {
    19         $(el).val(hex);
    20         $(el).ColorPickerHide();
    21         $(el).css('background-color', '#'+hex);
    22       },
    23     onBeforeShow: function () {
    24         $(this).ColorPickerSetColor(this.value);
    25       }
    26 })
    27 .bind('keyup', function(){
    28         $(this).ColorPickerSetColor(this.value);
    29 });
    30 });
    31 {/literal}{/footer_script}
    322
    333<div class="titrePage">
     
    355</div>
    366
    37 <p>
    38 {'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}
    39 </p>
    40 
    41 <p>
    42 {'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>
    43 <pre>
    44 $conf['tags_default_display_mode'] = 'cumulus';
    45 </pre>
    46 
    47 <form method="post" action="" class="general">
    48   <fieldset>
    49     <legend>{'Animation width and height'|@translate}</legend>
    50     <p class="field">
    51       <label>{'Width'|@translate}
    52         <input type="text" name="pwg_cumulus_width" value="{$PWG_CUMULUS_WIDTH}">
    53       </label>
    54     </p>
    55     <p class="field">
    56       <label>{'Height'|@translate}
    57       <input type="text" name="pwg_cumulus_height" value="{$PWG_CUMULUS_HEIGHT}">
    58       </label>
    59     </p>
    60   </fieldset>
    61  
    62   <fieldset>
    63     <legend>{'Tags size'|@translate}</legend>
    64     <p class="field">
    65       <label>{'Coefficient'|@translate}
    66         <input type="text" name="pwg_cumulus_coeff" value="{$PWG_CUMULUS_COEFF}">
    67       </label>     
    68     </p>
    69   </fieldset>
    70  
    71   <fieldset>
    72     <legend>{'Animation colors'|@translate}</legend>
    73     <div id="picker" style="float: right;"></div>
    74     <p class="field">
    75       <label>{'Color 1'|@translate}
    76         <input class="pwg-picker" type="text" name="pwg_cumulus_color1" value="{$PWG_CUMULUS_COLOR1}">
    77       </label>     
    78     </p>
    79     <p class="field">
    80     <label>{'Color 2'|@translate}
    81       <input class="pwg-picker" type="text" name="pwg_cumulus_color2" value="{$PWG_CUMULUS_COLOR2}">
    82     </label>     
    83     </p>
    84     <p class="field">
    85       <label>{'Mouseover color'|@translate}
    86         <input class="pwg-picker" type="text" name="pwg_cumulus_hicolor" value="{$PWG_CUMULUS_HICOLOR}">
    87       </label>     
    88     </p>
    89   </fieldset>
    90   <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
    91 </form>
     7{include file="$PWG_CUMULUS_TAB_ACTION"}
  • extensions/pwgCumulus/template/admin_tags.tpl

    r11226 r11344  
    1 {combine_css path="$PWG_CUMULUS_PLUGIN_CSS/admin.css"}
    21{combine_css path="$PWG_CUMULUS_PLUGIN_CSS/colorpicker.css"}
    32
    43{combine_script id="colorpicker" require="jquery" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.js"}
    5 {footer_script require="colorpicker"}{literal}
    6 $(function() {
    7 $('input.pwg-picker')
    8   .each(function() {
    9       if ($(this).val() !== undefined) {
    10         if ($(this).val().indexOf('#',0)==-1) {
    11            $(this).css('background-color', '#'+$(this).val());
    12         } else {
    13            $(this).css('background-color', $(this).val());
    14         }
    15       }
    16     })
    17   .ColorPicker({
    18     onSubmit: function(hsb, hex, rgb, el) {
    19         $(el).val(hex);
    20         $(el).ColorPickerHide();
    21         $(el).css('background-color', '#'+hex);
    22       },
    23     onBeforeShow: function () {
    24         $(this).ColorPickerSetColor(this.value);
    25       }
    26 })
    27 .bind('keyup', function(){
    28         $(this).ColorPickerSetColor(this.value);
    29 });
    30 });
    31 {/literal}{/footer_script}
     4{combine_script id="colorpicker.instance" require="colorpicker" path="$PWG_CUMULUS_PLUGIN_JS/colorpicker.instance.js"}
    325
    33 <div class="titrePage">
    34   <h2>{'Cumulus Tags Cloud Plugin'|@translate}</h2>
    35 </div>
    36 
    37 <p>
    38 {'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}
    39 </p>
    40 
    41 <p>
    42 {'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>
    43 <pre>
    44 $conf['tags_default_display_mode'] = 'cumulus';
    45 </pre>
     6<p>{'Animation configuration : size, tags colors, tags size'|@translate}</p>
    467
    478<form method="post" action="" class="general">
     
    7233    <legend>{'Animation colors'|@translate}</legend>
    7334    <div id="picker" style="float: right;"></div>
     35   
     36    <p class="field">
     37      <label>{'Transparent mode for background'|@translate}
     38        <input type="checkbox" id="pwg_cumulus_mode_transparent" name="pwg_cumulus_mode_transparent" value="1"
     39               {if $PWG_CUMULUS_MODE_TRANSPARENT} checked="checked"{/if}>
     40      </label>
     41      <span class="info">({'Check the checkbox to use transparent mode for background'|@translate})</span>
     42    </p>
     43    <p class="field" id="pwg_cumulus_p_bgcolor">
     44      <label>{'Background color'|@translate}
     45        <input class="pwg-picker" type="text" name="pwg_cumulus_bgcolor" value="{$PWG_CUMULUS_BGCOLOR}">
     46      </label>     
     47    </p>
    7448    <p class="field">
    7549      <label>{'Color 1'|@translate}
     
    9064  <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
    9165</form>
     66
  • extensions/pwgCumulus/template/tags.tpl

    r10954 r11344  
    33  <div class="titrePage">
    44    <ul class="categoryActions">
    5       {if $display_mode == 'letters'}
    6       <li>*
     5      {if $display_mode != 'cloud'}
     6      <li>
    77        <a href="{$U_CLOUD}" title="{'show tag cloud'|@translate}" class="pwg-state-default pwg-button">
    88          <span class="pwg-icon pwg-icon-cloud">&nbsp;</span><span class="pwg-button-text">{'cloud'|@translate}</span>
     
    1919      {/if}
    2020
    21       {if $display_mode == 'cloud'}
     21      {if $display_mode != 'letters'}
    2222      <li>
    2323        <a href="{$U_LETTERS}" title="{'group by letters'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     
    4545
    4646  {if $display_mode == 'cumulus'}
    47   <div id="flashcontent">This will be shown to users with no Flash or Javascript.</div>
    48 
    49   <script type="text/javascript">
    50     var so = new SWFObject("{$PWG_CUMULUS_SWF}/tagcloud.swf", "tagcloud", "{$PWG_CUMULUS_WIDTH}", "{$PWG_CUMULUS_HEIGHT}", "7", "#FFFFFF");
    51     so.addParam("wmode", "transparent");
    52     so.addVariable("tcolor", "{$PWG_CUMULUS_COLOR1}");
    53     so.addVariable("tcolor2", "{$PWG_CUMULUS_COLOR2}");
    54     so.addVariable("hicolor", "{$PWG_CUMULUS_HICOLOR}");
    55     so.addVariable("mode", "tags");
    56     so.addVariable("distr", "true");
    57     so.addVariable("tspeed", "100");
    58     so.addVariable("tagcloud",
    59     "<tags>{foreach from=$tags item=tag}<a href='{$tag.URL}' style='{$tag.size}pt'>{$tag.display_name}</a>{/foreach}</tags>");
    60     so.write("flashcontent");
    61   </script>
     47  <object data="{$PWG_CUMULUS_SWF}/tagcloud.swf" width="{$PWG_CUMULUS_WIDTH}" height="{$PWG_CUMULUS_HEIGHT}" type="application/x-shockwave-flash">
     48    <param name="movie" value="{$PWG_CUMULUS_SWF}/tagcloud.swf">
     49    <param name="allowScriptAccess" value="sameDomain">
     50    <param name="quality" value="high">
     51    {if ($PWG_CUMULUS_MODE_TRANSPARENT)}
     52    <param name="wmode" value="transparent">
     53    {else}
     54    <param name="bgcolor" value="#{$PWG_CUMULUS_BGCOLOR}">
     55    {/if}
     56    <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>">
     57  </object>
    6258  {/if}
    6359
Note: See TracChangeset for help on using the changeset viewer.