| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | Plugin Name: Advanced Menu Manager |
|---|
| 4 | Version: 3.0.1 |
|---|
| 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 |
|---|
| 15 | website : http://photos.grum.fr |
|---|
| 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 |
|---|
| 25 | | | | |
|---|
| 26 | | 2.0.0 | 2008/10/23 | * first release for piwigo's blocks classes |
|---|
| 27 | | | | |
|---|
| 28 | | 2.1.0 | 2009/07/26 | * add a functionality : random image can be changed |
|---|
| 29 | | | | every x seconds (from 0.5 to 60) |
|---|
| 30 | | | | |
|---|
| 31 | | | | * bug resolved : random image block is displayed only |
|---|
| 32 | | | | if user have accessibility to more than 0 images |
|---|
| 33 | | | | random images are choosen in the accessible images |
|---|
| 34 | | | | for a user (permission + level) |
|---|
| 35 | | | | (cf. post:107877 on french forum) |
|---|
| 36 | | | | (cf. topic:14374 on french forum) |
|---|
| 37 | | | | |
|---|
| 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 |
|---|
| 41 | | | | (cf. post:116807 on french forum) |
|---|
| 42 | | | | |
|---|
| 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) |
|---|
| 46 | | | | |
|---|
| 47 | | | | * compatibility with Sylvia theme |
|---|
| 48 | | | | (cf. post:116800 on french forum) |
|---|
| 49 | | | | |
|---|
| 50 | | 2.1.2 | 2009/11/16 | * adding new translations |
|---|
| 51 | | | | - es_ES |
|---|
| 52 | | | | - hu_HU (thx to sámli) |
|---|
| 53 | | | | |
|---|
| 54 | | 2.1.3 | 2009/11/24 | * mantis: feature 1285 |
|---|
| 55 | | | | move the js for "random image" in the the footer |
|---|
| 56 | | | | (having the js inside the <dl> tag was not w3c |
|---|
| 57 | | | | compliant) |
|---|
| 58 | | | | |
|---|
| 59 | | | | * mantis: feature 1132 |
|---|
| 60 | | | | Allowing order management for items in Piwigo's core |
|---|
| 61 | | | | blocks |
|---|
| 62 | | | | |
|---|
| 63 | | | | * mantis: feature 1133 |
|---|
| 64 | | | | Allowing to group content from Piwigo's core blocks |
|---|
| 65 | | | | |
|---|
| 66 | | | | * mantis: feature 1278 |
|---|
| 67 | | | | Allowing to manage access to menu items with a right |
|---|
| 68 | | | | management system |
|---|
| 69 | | | | |
|---|
| 70 | | | | * mantis: feature 1100 |
|---|
| 71 | | | | Random picture : compatibility with theme 'montblanc' |
|---|
| 72 | | | | |
|---|
| 73 | | 2.1.4 | 2009/11/29 | * mantis: feature 1299 |
|---|
| 74 | | | | Allows to manage access for the 'Admin' users |
|---|
| 75 | | | | |
|---|
| 76 | | | | * mantis: feature 1298 |
|---|
| 77 | | | | Users 'Webmaster' aren't managed |
|---|
| 78 | | | | |
|---|
| 79 | | | | * mantis: feature 1297 |
|---|
| 80 | | | | AMM don't works properly if a block 'menu' or |
|---|
| 81 | | | | 'specials' is hidden |
|---|
| 82 | | | | |
|---|
| 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 |
|---|
| 86 | | | | |
|---|
| 87 | | | | * adding new translations |
|---|
| 88 | | | | - zh_CN (thx mzs777) |
|---|
| 89 | | | | |
|---|
| 90 | | | | * update translations |
|---|
| 91 | | | | - hu_HU (thx to sámli) |
|---|
| 92 | | | | |
|---|
| 93 | | 2.1.6 | 2009/12/19 | * mantis: feature 1336 |
|---|
| 94 | | | | Error message about an undefined var 'tabsheet' on |
|---|
| 95 | | | | the admin panel |
|---|
| 96 | | | | |
|---|
| 97 | | 2.2.0 | 2010/03/28 | * updated for Piwigo 2.1 compatibility |
|---|
| 98 | | | | |
|---|
| 99 | | | | * mantis: feature 1384 |
|---|
| 100 | | | | Problem of length of title field in the custom menu |
|---|
| 101 | | | | module |
|---|
| 102 | | | | |
|---|
| 103 | | | | * mantis: bug 1476 |
|---|
| 104 | | | | Error message on login screen |
|---|
| 105 | | | | |
|---|
| 106 | | | | * mantis: bug 1541 |
|---|
| 107 | | | | Items order is not respected in admin pages |
|---|
| 108 | | | | |
|---|
| 109 | | 3.0.0 | 2011/01/09 | * mantis: feature 1296 |
|---|
| 110 | | | | . add permissions for managing personal menu |
|---|
| 111 | | | | |
|---|
| 112 | | | | * mantis: feature 1477 |
|---|
| 113 | | | | . Possibility to pre-select the "random images" |
|---|
| 114 | | | | |
|---|
| 115 | | | | * mantis: bug 1680 |
|---|
| 116 | | | | . Warning if a new lang is added in Piwigo |
|---|
| 117 | | | | |
|---|
| 118 | | | | * mantis: feature 1709 |
|---|
| 119 | | | | . Change title links by sub tabs |
|---|
| 120 | | | | |
|---|
| 121 | | | | * mantis: feature 1723 |
|---|
| 122 | | | | . Display links using user access right |
|---|
| 123 | | | | |
|---|
| 124 | | | | * mantis: bug 1776 |
|---|
| 125 | | | | . Unable to set access for the administrator |
|---|
| 126 | | | | |
|---|
| 127 | | | | * mantis: bug 1910 |
|---|
| 128 | | | | . Incompatibility with Internet Explorer |
|---|
| 129 | | | | (partially fixed : works, but lloks a little bit |
|---|
| 130 | | | | ugly) |
|---|
| 131 | | | | |
|---|
| 132 | | | | * mantis: feature 2052 |
|---|
| 133 | | | | . Convert album to menu |
|---|
| 134 | | | | |
|---|
| 135 | | | | * mantis: feature 2128 |
|---|
| 136 | | | | . Random picture : preload a set of picture |
|---|
| 137 | | | | |
|---|
| 138 | | | | * mantis: feature 2129 |
|---|
| 139 | | | | . User & group access management is not consistent |
|---|
| 140 | | | | |
|---|
| 141 | | | | * plugin core rewrited |
|---|
| 142 | | | | |
|---|
| 143 | | 3.0.1 | 2011/01/31 | * mantis: feature 2157 |
|---|
| 144 | | | | . Personalised blocks : title & content are inverted |
|---|
| 145 | | | | |
|---|
| 146 | | | | * mantis: feature 2158 |
|---|
| 147 | | | | . Album to menu : error message about number of |
|---|
| 148 | | | | pictures |
|---|
| 149 | | | | |
|---|
| 150 | | | | * mantis: feature 2159 |
|---|
| 151 | | | | . Update process : users acess is not managed on links |
|---|
| 152 | | | | |
|---|
| 153 | | | | * mantis: feature 2162 |
|---|
| 154 | | | | . Personalised blocks : when adding a new block, |
|---|
| 155 | | | | previous title & content are not reseted |
|---|
| 156 | | | | |
|---|
| 157 | | | | * mantis: feature 2163 |
|---|
| 158 | | | | . Update process : error message on gallery side |
|---|
| 159 | | | | |
|---|
| 160 | | | | |
|---|
| 161 | | | | |
|---|
| 162 | |
|---|
| 163 | |
|---|
| 164 | :: TO DO |
|---|
| 165 | |
|---|
| 166 | -------------------------------------------------------------------------------- |
|---|
| 167 | |
|---|
| 168 | :: NFO |
|---|
| 169 | AMM_AIM : classe to manage plugin integration into plugin menu |
|---|
| 170 | AMM_AIP : classe to manage plugin admin pages |
|---|
| 171 | AMM_PIP : classe to manage plugin public integration |
|---|
| 172 | |
|---|
| 173 | -------------------------------------------------------------------------------- |
|---|
| 174 | */ |
|---|
| 175 | |
|---|
| 176 | // pour faciliter le debug - make debug easier :o) |
|---|
| 177 | //ini_set('error_reporting', E_ALL); |
|---|
| 178 | //ini_set('display_errors', true); |
|---|
| 179 | |
|---|
| 180 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
|---|
| 181 | |
|---|
| 182 | define('AMM_DIR' , basename(dirname(__FILE__))); |
|---|
| 183 | define('AMM_PATH' , PHPWG_PLUGINS_PATH . AMM_DIR . '/'); |
|---|
| 184 | |
|---|
| 185 | include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); |
|---|
| 186 | include_once('amm_version.inc.php'); // => Don't forget to update this file !! |
|---|
| 187 | include_once('amm_root.class.inc.php'); |
|---|
| 188 | |
|---|
| 189 | |
|---|
| 190 | global $prefixeTable, $page; |
|---|
| 191 | |
|---|
| 192 | |
|---|
| 193 | if(defined('IN_ADMIN')) |
|---|
| 194 | { |
|---|
| 195 | //AMM admin part loaded and active only if in admin page |
|---|
| 196 | include_once("amm_aim.class.inc.php"); |
|---|
| 197 | $obj = new AMM_AIM($prefixeTable, __FILE__); |
|---|
| 198 | $obj->initEvents(); |
|---|
| 199 | set_plugin_data($plugin['id'], $obj); |
|---|
| 200 | } |
|---|
| 201 | else |
|---|
| 202 | { |
|---|
| 203 | if(CommonPlugin::checkGPCRelease(AMM_GPC_NEEDED)) |
|---|
| 204 | { |
|---|
| 205 | AMM_root::checkPluginRelease(); |
|---|
| 206 | |
|---|
| 207 | //AMM public part loaded and active only if in public page |
|---|
| 208 | include_once("amm_pip.class.inc.php"); |
|---|
| 209 | $obj = new AMM_PIP($prefixeTable, __FILE__); |
|---|
| 210 | set_plugin_data($plugin['id'], $obj); |
|---|
| 211 | } |
|---|
| 212 | } |
|---|
| 213 | |
|---|
| 214 | |
|---|
| 215 | ?> |
|---|