[3681] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: Advanced Menu Manager |
---|
[21514] | 4 | Version: 3.2.5 |
---|
[3681] | 5 | Description: Gestion avancée du menu / Advanced management of menu |
---|
| 6 | Plugin URI: http://piwigo.org |
---|
| 7 | Author: Piwigo team |
---|
| 8 | Author URI: http://piwigo.org |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | /* |
---|
| 12 | -------------------------------------------------------------------------------- |
---|
| 13 | Author : Grum |
---|
| 14 | email : grum@grum.fr |
---|
[4382] | 15 | website : http://photos.grum.fr |
---|
[3681] | 16 | PWG user : http://forum.piwigo.org/profile.php?id=3706 |
---|
| 17 | |
---|
| 18 | << May the Little SpaceFrog be with you ! >> |
---|
| 19 | -------------------------------------------------------------------------------- |
---|
| 20 | |
---|
| 21 | :: HISTORY |
---|
| 22 | |
---|
| 23 | | release | date | |
---|
| 24 | | 2.0.0b | 2008/07/27 | * initial release with own blocks classes |
---|
[8962] | 25 | | | | |
---|
[3681] | 26 | | 2.0.0 | 2008/10/23 | * first release for piwigo's blocks classes |
---|
[8962] | 27 | | | | |
---|
[3683] | 28 | | 2.1.0 | 2009/07/26 | * add a functionality : random image can be changed |
---|
[3682] | 29 | | | | every x seconds (from 0.5 to 60) |
---|
[8962] | 30 | | | | |
---|
[3683] | 31 | | | | * bug resolved : random image block is displayed only |
---|
| 32 | | | | if user have accessibility to more than 0 images |
---|
[4389] | 33 | | | | random images are choosen in the accessible images |
---|
| 34 | | | | for a user (permission + level) |
---|
[3683] | 35 | | | | (cf. post:107877 on french forum) |
---|
| 36 | | | | (cf. topic:14374 on french forum) |
---|
[8962] | 37 | | | | |
---|
[4389] | 38 | | 2.1.1 | 2009/07/27 | * random picture is preloaded before the first ajax |
---|
| 39 | | | | call assuming the display of a thumbnail even if |
---|
| 40 | | | | javascript is disabled on the browser |
---|
[3690] | 41 | | | | (cf. post:116807 on french forum) |
---|
[8962] | 42 | | | | |
---|
[3690] | 43 | | | | * give the possibility to choose between an automatic |
---|
| 44 | | | | and a fixed height for the block menu |
---|
| 45 | | | | (cf. post:116804 on french forum) |
---|
[8962] | 46 | | | | |
---|
[3690] | 47 | | | | * compatibility with Sylvia theme |
---|
| 48 | | | | (cf. post:116800 on french forum) |
---|
[8962] | 49 | | | | |
---|
[4274] | 50 | | 2.1.2 | 2009/11/16 | * adding new translations |
---|
| 51 | | | | - es_ES |
---|
| 52 | | | | - hu_HU (thx to sámli) |
---|
[8962] | 53 | | | | |
---|
[4389] | 54 | | 2.1.3 | 2009/11/24 | * mantis: feature 1285 |
---|
[4382] | 55 | | | | move the js for "random image" in the the footer |
---|
[4363] | 56 | | | | (having the js inside the <dl> tag was not w3c |
---|
| 57 | | | | compliant) |
---|
[8962] | 58 | | | | |
---|
[4389] | 59 | | | | * mantis: feature 1132 |
---|
| 60 | | | | Allowing order management for items in Piwigo's core |
---|
| 61 | | | | blocks |
---|
[8962] | 62 | | | | |
---|
[4389] | 63 | | | | * mantis: feature 1133 |
---|
[4382] | 64 | | | | Allowing to group content from Piwigo's core blocks |
---|
[8962] | 65 | | | | |
---|
[4389] | 66 | | | | * mantis: feature 1278 |
---|
| 67 | | | | Allowing to manage access to menu items with a right |
---|
| 68 | | | | management system |
---|
[8962] | 69 | | | | |
---|
[4390] | 70 | | | | * mantis: feature 1100 |
---|
| 71 | | | | Random picture : compatibility with theme 'montblanc' |
---|
[8962] | 72 | | | | |
---|
[4395] | 73 | | 2.1.4 | 2009/11/29 | * mantis: feature 1299 |
---|
| 74 | | | | Allows to manage access for the 'Admin' users |
---|
[8962] | 75 | | | | |
---|
[4395] | 76 | | | | * mantis: feature 1298 |
---|
| 77 | | | | Users 'Webmaster' aren't managed |
---|
[8962] | 78 | | | | |
---|
[4395] | 79 | | | | * mantis: feature 1297 |
---|
| 80 | | | | AMM don't works properly if a block 'menu' or |
---|
| 81 | | | | 'specials' is hidden |
---|
[8962] | 82 | | | | |
---|
[4499] | 83 | | 2.1.5 | 2009/12/15 | * mantis: feature 1331 |
---|
| 84 | | | | JS code used to manage the random picture is always |
---|
| 85 | | | | loaded even if there is no menubar |
---|
[8962] | 86 | | | | |
---|
[4499] | 87 | | | | * adding new translations |
---|
| 88 | | | | - zh_CN (thx mzs777) |
---|
[8962] | 89 | | | | |
---|
[4499] | 90 | | | | * update translations |
---|
| 91 | | | | - hu_HU (thx to sámli) |
---|
[8962] | 92 | | | | |
---|
[4515] | 93 | | 2.1.6 | 2009/12/19 | * mantis: feature 1336 |
---|
| 94 | | | | Error message about an undefined var 'tabsheet' on |
---|
| 95 | | | | the admin panel |
---|
[8962] | 96 | | | | |
---|
[5421] | 97 | | 2.2.0 | 2010/03/28 | * updated for Piwigo 2.1 compatibility |
---|
[8962] | 98 | | | | |
---|
[5421] | 99 | | | | * mantis: feature 1384 |
---|
| 100 | | | | Problem of length of title field in the custom menu |
---|
| 101 | | | | module |
---|
[8962] | 102 | | | | |
---|
[5421] | 103 | | | | * mantis: bug 1476 |
---|
| 104 | | | | Error message on login screen |
---|
[8962] | 105 | | | | |
---|
[5421] | 106 | | | | * mantis: bug 1541 |
---|
| 107 | | | | Items order is not respected in admin pages |
---|
[3682] | 108 | | | | |
---|
[8962] | 109 | | 3.0.0 | 2011/01/09 | * mantis: feature 1296 |
---|
| 110 | | | | . add permissions for managing personal menu |
---|
[4382] | 111 | | | | |
---|
[8962] | 112 | | | | * mantis: feature 1477 |
---|
| 113 | | | | . Possibility to pre-select the "random images" |
---|
[4499] | 114 | | | | |
---|
[8962] | 115 | | | | * mantis: bug 1680 |
---|
| 116 | | | | . Warning if a new lang is added in Piwigo |
---|
[4499] | 117 | | | | |
---|
[8962] | 118 | | | | * mantis: feature 1709 |
---|
| 119 | | | | . Change title links by sub tabs |
---|
[4499] | 120 | | | | |
---|
[8962] | 121 | | | | * mantis: feature 1723 |
---|
| 122 | | | | . Display links using user access right |
---|
[4499] | 123 | | | | |
---|
[8962] | 124 | | | | * mantis: bug 1776 |
---|
| 125 | | | | . Unable to set access for the administrator |
---|
[4499] | 126 | | | | |
---|
[8962] | 127 | | | | * mantis: bug 1910 |
---|
| 128 | | | | . Incompatibility with Internet Explorer |
---|
| 129 | | | | (partially fixed : works, but lloks a little bit |
---|
| 130 | | | | ugly) |
---|
[5421] | 131 | | | | |
---|
[8962] | 132 | | | | * mantis: feature 2052 |
---|
| 133 | | | | . Convert album to menu |
---|
[5421] | 134 | | | | |
---|
[8962] | 135 | | | | * mantis: feature 2128 |
---|
| 136 | | | | . Random picture : preload a set of picture |
---|
[5421] | 137 | | | | |
---|
[8962] | 138 | | | | * mantis: feature 2129 |
---|
| 139 | | | | . User & group access management is not consistent |
---|
[5421] | 140 | | | | |
---|
[8962] | 141 | | | | * plugin core rewrited |
---|
| 142 | | | | |
---|
[9010] | 143 | | 3.0.1 | 2011/01/31 | * mantis: feature 2157 |
---|
| 144 | | | | . Personalised blocks : title & content are inverted |
---|
[8962] | 145 | | | | |
---|
[9010] | 146 | | | | * mantis: feature 2158 |
---|
| 147 | | | | . Album to menu : error message about number of |
---|
| 148 | | | | pictures |
---|
[8962] | 149 | | | | |
---|
[9019] | 150 | | | | * mantis: feature 2159 |
---|
| 151 | | | | . Update process : users acess is not managed on links |
---|
[8962] | 152 | | | | |
---|
[9019] | 153 | | | | * mantis: feature 2162 |
---|
| 154 | | | | . Personalised blocks : when adding a new block, |
---|
| 155 | | | | previous title & content are not reseted |
---|
[8962] | 156 | | | | |
---|
[9019] | 157 | | | | * mantis: feature 2163 |
---|
| 158 | | | | . Update process : error message on gallery side |
---|
[8962] | 159 | | | | |
---|
[9029] | 160 | | | | * mantis: bug 2165 |
---|
| 161 | | | | . Database schema not completely updated |
---|
[8962] | 162 | | | | |
---|
[9113] | 163 | | 3.0.2 | 2011/02/01 | * mantis: bug 2166 |
---|
[9031] | 164 | | | | . Error message on gallery side about |
---|
| 165 | | | | create_table_add_character_set() |
---|
[9010] | 166 | | | | |
---|
[9113] | 167 | | 3.0.3 | 2011/02/07 | * mantis: bug 2166 |
---|
| 168 | | | | . Error message on gallery side about |
---|
| 169 | | | | create_table_add_character_set() |
---|
[9029] | 170 | | | | |
---|
[9113] | 171 | | | | * mantis: bug 2182 |
---|
| 172 | | | | . links and personnal blocks : double quote are not |
---|
| 173 | | | | correctly managed |
---|
[9029] | 174 | | | | |
---|
[10602] | 175 | | | | ===> note: the release 3.0.3 was never officially |
---|
| 176 | | | | published |
---|
| 177 | | | | |
---|
[10247] | 178 | | 3.1.0 | 2011/04/10 | * mantis: bug 2144 |
---|
| 179 | | | | . Compatibility with Piwigo 2.2 |
---|
[9029] | 180 | | | | |
---|
[10602] | 181 | | | | * mantis: bug 2166 (fixed in 3.0.3) |
---|
| 182 | | | | . Error message on gallery side about |
---|
| 183 | | | | create_table_add_character_set() |
---|
[9113] | 184 | | | | |
---|
[10602] | 185 | | | | * mantis: bug 2182 (fixed in 3.0.3) |
---|
| 186 | | | | . links and personnal blocks : double quote are not |
---|
| 187 | | | | correctly managed |
---|
[9113] | 188 | | | | |
---|
[10605] | 189 | | 3.1.1 | 2011/04/24 | * mantis: bug 2275 |
---|
| 190 | | | | . Install don't create tables |
---|
[10602] | 191 | | | | |
---|
[10883] | 192 | | 3.1.2 | 2011/05/15 | * add sv_SE language |
---|
[10602] | 193 | | | | |
---|
[11036] | 194 | | 3.1.3 | 2011/05/24 | * mantis bug:2311 |
---|
[11582] | 195 | | | | . broken javascript if random pic set is empty |
---|
[10602] | 196 | | | | |
---|
[11036] | 197 | | | | * mantis bug:2312 |
---|
[11582] | 198 | | | | . randomPictureJS is loaded even if menu is hidden |
---|
[10602] | 199 | | | | |
---|
[11071] | 200 | | | | * mantis bug:2281 |
---|
[11582] | 201 | | | | . Custom language value is use in queries unescaped. |
---|
[10602] | 202 | | | | |
---|
[11582] | 203 | | 3.1.4 | 2011/06/29 | * mantis bug:2371 |
---|
| 204 | | | | . User access management don't work if user is linked |
---|
| 205 | | | | to a group |
---|
[10602] | 206 | | | | |
---|
[12665] | 207 | | | | * mantis bug:2522 |
---|
| 208 | | | | . Incompatibility with other plugin managing the menu |
---|
| 209 | | | | content |
---|
[11582] | 210 | | | | |
---|
[15366] | 211 | | 3.2.0 | 2012/05/27 | * mantis: bug 2642 |
---|
| 212 | | | | . Compatibility with Piwigo 2.4 |
---|
[11582] | 213 | | | | |
---|
[16737] | 214 | | | | * mantis bug:2371 |
---|
| 215 | | | | . User access management don't work if user is linked |
---|
| 216 | | | | to a group => seems to be definitively fixed... |
---|
[11582] | 217 | | | | |
---|
[16737] | 218 | | 3.2.1 | 2012/07/15 | * mantis: bug 2695 |
---|
| 219 | | | | . In admin page, it's not possible to manage "random pict" |
---|
[15366] | 220 | | | | |
---|
[16744] | 221 | | 3.2.2 | 2012/07/15 | * mantis: bug 2696 |
---|
| 222 | | | | . When applying config on "random pict", admin page is blocked on waiting icon |
---|
[15366] | 223 | | | | |
---|
[16753] | 224 | | 3.2.3 | 2012/07/15 | * mantis: bug 2697 |
---|
| 225 | | | | . hu_HU language file is not correct |
---|
[15366] | 226 | | | | |
---|
[19359] | 227 | | 3.2.4 | 2012/12/09 | * mantis: bug 2799 |
---|
| 228 | | | | . Undefined index 'installed' |
---|
[16737] | 229 | | | | |
---|
[21514] | 230 | | 3.2.5 | 2013/03/12 | * Checked compatibility with Piwigo 2.5 |
---|
| 231 | | | | * Custom menus are compatible with Extended Description plugin syntax |
---|
| 232 | | | | * new language pt_BR |
---|
| 233 | | | | * mantis bug:2799 compatibility with PHP 5.4 |
---|
| 234 | | | | * random picture not computed for search engine robots |
---|
[3681] | 235 | |
---|
| 236 | |
---|
| 237 | :: TO DO |
---|
| 238 | |
---|
| 239 | -------------------------------------------------------------------------------- |
---|
| 240 | |
---|
| 241 | :: NFO |
---|
| 242 | AMM_AIM : classe to manage plugin integration into plugin menu |
---|
| 243 | AMM_AIP : classe to manage plugin admin pages |
---|
| 244 | AMM_PIP : classe to manage plugin public integration |
---|
| 245 | |
---|
| 246 | -------------------------------------------------------------------------------- |
---|
| 247 | */ |
---|
| 248 | |
---|
| 249 | // pour faciliter le debug - make debug easier :o) |
---|
| 250 | //ini_set('error_reporting', E_ALL); |
---|
| 251 | //ini_set('display_errors', true); |
---|
| 252 | |
---|
| 253 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 254 | |
---|
| 255 | define('AMM_DIR' , basename(dirname(__FILE__))); |
---|
| 256 | define('AMM_PATH' , PHPWG_PLUGINS_PATH . AMM_DIR . '/'); |
---|
| 257 | |
---|
[8970] | 258 | include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); |
---|
[5421] | 259 | include_once('amm_version.inc.php'); // => Don't forget to update this file !! |
---|
[8970] | 260 | include_once('amm_root.class.inc.php'); |
---|
[3681] | 261 | |
---|
[8970] | 262 | |
---|
[3681] | 263 | global $prefixeTable, $page; |
---|
| 264 | |
---|
[16006] | 265 | if(!defined('AJAX_CALL')) |
---|
[3681] | 266 | { |
---|
[16006] | 267 | if(defined('IN_ADMIN')) |
---|
[8970] | 268 | { |
---|
[16006] | 269 | //AMM admin part loaded and active only if in admin page |
---|
| 270 | include_once("amm_aim.class.inc.php"); |
---|
| 271 | $obj = new AMM_AIM($prefixeTable, __FILE__); |
---|
| 272 | $obj->initEvents(); |
---|
[8970] | 273 | set_plugin_data($plugin['id'], $obj); |
---|
| 274 | } |
---|
[16006] | 275 | else |
---|
| 276 | { |
---|
| 277 | if(CommonPlugin::checkGPCRelease(AMM_GPC_NEEDED) and !mobile_theme()) |
---|
| 278 | { |
---|
| 279 | AMM_root::checkPluginRelease(); |
---|
| 280 | |
---|
| 281 | //AMM public part loaded and active only if in public page |
---|
| 282 | include_once("amm_pip.class.inc.php"); |
---|
| 283 | $obj = new AMM_PIP($prefixeTable, __FILE__); |
---|
| 284 | set_plugin_data($plugin['id'], $obj); |
---|
| 285 | } |
---|
| 286 | } |
---|
[3681] | 287 | } |
---|
| 288 | |
---|
| 289 | |
---|
[16006] | 290 | |
---|
[3681] | 291 | ?> |
---|