Ignore:
Timestamp:
03/28/10 17:57:37 (10 years ago)
Author:
grum
Message:

Update the plugin for compatibility with Piwigo 2.1 and fix some bugs
feature 1384, feature 1476, feature 1541

Location:
extensions/AMenuManager
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMenuManager/admin/amm_admin.tpl

    r4515 r5421  
    1 <div class="titrePage"> 
    2   <h2 style="position:absolute;right:0px;top:32px;height:auto;font-size:12px;font-weight:normal;">:: {$plugin.AMM_VERSION} ::</h2> 
    3   <h2>{'g002_title_page'|@translate} <span style="font-size:-1;font-weight:normal;">{$TABSHEET_TITLE}</span></h2> 
     1<h2 style="float:right;top:-24px;position:relative;height:auto;font-size:12px;font-weight:normal;">{$plugin.AMM_VERSION}</h2> 
    42 
     3<div style="position:relative;top:-24px;clear:right;"> 
     4  {if isset($page_nfo)} 
     5  <p>{$page_nfo}</p> 
     6  {/if} 
    57</div> 
    6  
    7 {if isset($page_nfo)} 
    8 <p>{$page_nfo}</p> 
    9 {/if} 
    108 
    119{$AMM_BODY_PAGE} 
  • extensions/AMenuManager/admin/amm_personalisedlist_edit.tpl

    r3681 r5421  
    1 {* $Id $ *} 
    2  
    31{include file='include/autosize.inc.tpl'} 
    42 
     
    8179        <td>{'g002_setting_personalised_nfo'|@translate}</td> 
    8280        <td> 
    83           <input type="text" name="famm_personalised_nfo" id="iamm_personalised_nfo" value="{$datas.nfo}" maxlength="25"/> 
     81          <input type="text" name="famm_personalised_nfo" id="iamm_personalised_nfo" value="{$datas.nfo}" maxlength="255"/> 
    8482        </td> 
    8583      </tr> 
     
    119117        <td>{'g002_setting_block_title'|@translate}</td> 
    120118        <td> 
    121           <input type="text" id="iamm_personalised_title" value="" maxlength="50" onkeyup="apply_changes('iamm_personalised_title');" onblur="apply_changes('iamm_personalised_title');"/> 
     119          <input type="text" id="iamm_personalised_title" value="" maxlength="255" onkeyup="apply_changes('iamm_personalised_title');" onblur="apply_changes('iamm_personalised_title');"/> 
    122120        </td> 
    123121      </tr> 
  • extensions/AMenuManager/admin/amm_randompicconfig.tpl

    r3690 r5421  
    1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"} 
    2 {known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.slider.packed.js"} 
     1{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
     2{known_script id="jquery.ui.slider" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.slider.packed.js"} 
    33 
    44{literal} 
     
    88    height:10px; 
    99    border:1px solid; 
    10     margin-left:10px; 
     10    margin-right:5px; 
     11    padding-right:14px; 
    1112  } 
    1213 .ui-slider-handle { 
     
    1617    top:-2px; 
    1718    border:1px solid; 
    18     background:#cccccc; 
     19    display:block; 
    1920  } 
    2021</style> 
  • extensions/AMenuManager/admin/amm_sections.tpl

    r4389 r5421  
    1 {known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js"} 
    2 {known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.sortable.packed.js"} 
     1{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"} 
     2{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js"} 
    33 
    44<div id="containerMenu"> 
  • extensions/AMenuManager/amm_aip.class.inc.php

    r4395 r5421  
    2828  protected $tabsheet; 
    2929  protected $ajax; 
    30   protected $sectionsId=array('menu' => 'title_menu', 'special' => 'special_categories'); 
     30  protected $sectionsId=array('menu' => 'Menu', 'special' => 'Specials'); 
    3131 
    3232  protected $urls_modes=array(0 => 'new_window', 1 => 'current_window'); 
     
    524524    } 
    525525 
     526    $this->sortSectionsItems(); 
     527 
    526528    $users=new users(""); 
    527529    $groups=new groups(""); 
  • extensions/AMenuManager/amm_install.class.inc.php

    r4391 r5421  
    44  Author     : Grum 
    55    email    : grum@grum.dnsalias.com 
    6     website  : http://photos.grum.dnsalias.com 
     6    website  : http://photos.grum.fr 
    77    PWG user : http://forum.phpwebgallery.net/profile.php?id=3706 
    88 
     
    1414 
    1515  --------------------------------------------------------------------------- */ 
    16   @include_once('amm_root.class.inc.php'); 
     16  include_once('amm_version.inc.php'); 
     17  include_once('amm_root.class.inc.php'); 
    1718  include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/tables.class.inc.php'); 
    1819 
     
    3637    public function install() 
    3738    { 
     39      $this->init_config(); 
     40      $this->load_config(); 
     41      $this->my_config['installed']=AMM_VERSION2; 
     42      $this->save_config(); 
    3843 
    3944      $tables_def=array( 
     
    5358  `id` int(11) NOT NULL default '0', 
    5459  `lang` varchar(5) NOT NULL default '', 
    55   `title` varchar(50) NOT NULL default '', 
     60  `title` varchar(255) NOT NULL default '', 
    5661  `content` text NOT NULL, 
    5762  `visible` char(1) NOT NULL default 'y', 
    58   `nfo` varchar(25) NOT NULL default '', 
     63  `nfo` varchar(255) NOT NULL default '', 
    5964  PRIMARY KEY  (`id`,`lang`) 
    6065)" 
     
    8388      $this->init_config(); 
    8489      $this->load_config(); 
     90 
     91      $this->udpateTablesDef(); 
     92 
     93      $this->my_config['installed']=AMM_VERSION2; //update the installed release number 
     94      $this->save_config(); 
     95    } 
     96 
     97    public function deactivate() 
     98    { 
     99    } 
     100 
     101 
     102    /** 
     103     * update tables & config between releases 
     104     * 
     105     */ 
     106    protected function udpateTablesDef() 
     107    { 
    85108      /* AMM release earlier than the 2.1.3 uses two parameters to manage the display 
    86109       * of the menu items ("amm_sections_modspecials" and "amm_sections_modmenu") 
     
    108131      } 
    109132 
    110       $this->save_config(); 
    111     } 
     133      if(!array_key_exists('installed', $this->my_config)) 
     134      { 
     135        /* 
     136         * if key does not exist, probably try to update a plugin older than the 
     137         * 2.2.0 release 
     138         */ 
     139        $this->my_config['installed']="02.01.06"; 
     140      } 
    112141 
    113     public function deactivate() 
    114     { 
     142      if($this->my_config['installed']<="02.01.06") 
     143      { 
     144        /* 
     145         * 2.2.0 updates 
     146         * 
     147         * - update fields length for table 'personalised' 
     148         * - update config for menu translation 
     149         */ 
     150        $sql="ALTER TABLE `".$this->tables['personalised']."` 
     151              MODIFY COLUMN `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 
     152              MODIFY COLUMN `nfo` VARCHAR(255)  CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;"; 
     153        pwg_query($sql); 
     154 
     155        foreach($this->my_config['amm_sections_items'] as $key => $val) 
     156        { 
     157          $this->my_config['amm_sections_items'][$key]['translation'] = $this->defaultMenus[$key]['translation']; 
     158        } 
     159      } 
    115160    } 
    116161 
  • extensions/AMenuManager/amm_pip.class.inc.php

    r4499 r5421  
    305305    global $user, $template, $page; 
    306306 
     307    if(!array_key_exists('body_id', $page)) 
     308    { 
     309      /* 
     310       * it seems the error message reported on mantis:1476 is displayed because 
     311       * the 'body_id' doesn't exist in the $page 
     312       * 
     313       * not abble to reproduce the error, but initializing the key to an empty 
     314       * value if it doesn't exist may be a sufficient solution 
     315       */ 
     316      $page['body_id']=""; 
     317    } 
     318 
    307319    if($this->displayRandomImageBlock && $page['body_id'] == 'theCategoryPage') 
    308320    { 
  • extensions/AMenuManager/amm_root.class.inc.php

    r4395 r5421  
    2626  protected $css;   //the css object 
    2727  protected $defaultMenus = array( 
    28     'favorites' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 0, 'translation' => 'favorite_cat'), 
    29     'most_visited' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 1, 'translation' => 'most_visited_cat'), 
    30     'best_rated' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 2, 'translation' => 'best_rated_cat'), 
    31     'random' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 3, 'translation' => 'random_cat'), 
    32     'recent_pics' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 4, 'translation' => 'recent_pics_cat'), 
    33     'recent_cats' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 5, 'translation' => 'recent_cats_cat'), 
    34     'calendar' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 6, 'translation' => 'calendar'), 
    35     'qsearch' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 0, 'translation' => 'qsearch'), 
     28    'favorites' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 0, 'translation' => 'My favorites'), 
     29    'most_visited' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 1, 'translation' => 'Most visited'), 
     30    'best_rated' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 2, 'translation' => 'Best rated'), 
     31    'random' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 3, 'translation' => 'Random pictures'), 
     32    'recent_pics' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 4, 'translation' => 'Recent pictures'), 
     33    'recent_cats' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 5, 'translation' => 'Recent categories'), 
     34    'calendar' => array('container' => 'special', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 6, 'translation' => 'Calendar'), 
     35    'qsearch' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 0, 'translation' => 'Quick search'), 
    3636    'tags' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 1, 'translation' => 'Tags'), 
    3737    'search' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 2, 'translation' => 'Search'), 
    38     'comments' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 3, 'translation' => 'comments'), 
     38    'comments' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 3, 'translation' => 'Comments'), 
    3939    'about' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 4, 'translation' => 'About'), 
    4040    'rss' => array('container' => 'menu', 'visibility' => 'guest,generic,normal,webmaster,admin/', 'order' => 5, 'translation' => 'Notification') 
  • extensions/AMenuManager/main.inc.php

    r4515 r5421  
    22/* 
    33Plugin Name: Advanced Menu Manager 
    4 Version: 2.1.6 
     4Version: 2.2.0 
    55Description: Gestion avancée du menu / Advanced management of menu 
    66Plugin URI: http://piwigo.org 
     
    7575|         |            |   Error message about an undefined var 'tabsheet' on 
    7676|         |            |   the admin panel 
     77| 2.2.0   | 2010/03/28 | * updated for Piwigo 2.1 compatibility 
     78|         |            | * mantis: feature 1384 
     79|         |            |   Problem of length of title field in the custom menu 
     80|         |            |   module 
     81|         |            | * mantis: bug 1476 
     82|         |            |   Error message on login screen 
     83|         |            | * mantis: bug 1541 
     84|         |            |   Items order is not respected in admin pages 
     85|         |            | 
     86|         |            | 
     87|         |            | 
     88|         |            | 
    7789|         |            | 
    7890|         |            | 
     
    105117define('AMM_PATH' , PHPWG_PLUGINS_PATH . AMM_DIR . '/'); 
    106118 
    107 define('AMM_VERSION' , '2.1.6'); //=> ne pas oublier la version dans l'entête !! 
     119include_once('amm_version.inc.php'); // => Don't forget to update this file !! 
    108120 
    109121global $prefixeTable, $page; 
Note: See TracChangeset for help on using the changeset viewer.