| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | Plugin Name: Advanced MetaData |
|---|
| 4 | Version: 0.6.0 |
|---|
| 5 | Description: An advanced metadata manager |
|---|
| 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=364 |
|---|
| 7 | Author: grum@piwigo.org |
|---|
| 8 | Author URI: http://photos.grum.fr/ |
|---|
| 9 | */ |
|---|
| 10 | |
|---|
| 11 | /* |
|---|
| 12 | -------------------------------------------------------------------------------- |
|---|
| 13 | Author : Grum |
|---|
| 14 | email : grum@piwigo.org |
|---|
| 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 | | 0.0 | 2010/01/21 | * start coding |
|---|
| 25 | | | | |
|---|
| 26 | | | | |
|---|
| 27 | | 0.1b | 2010/03/21 | * beta release |
|---|
| 28 | | | | |
|---|
| 29 | | | | |
|---|
| 30 | | 0.2b | 2010/03/23 | * beta release |
|---|
| 31 | | | | |
|---|
| 32 | | | | |
|---|
| 33 | | 0.3b | 2010/04/11 | * beta release |
|---|
| 34 | | | | |
|---|
| 35 | | | | |
|---|
| 36 | | 0.4.0 | 2010/04/24 | * release for Piwigo 2.1 |
|---|
| 37 | | | | |
|---|
| 38 | | | | * uses some GPC 3.1.0 functions |
|---|
| 39 | | | | |
|---|
| 40 | | | | * optimize ajax request to fill the metadata database |
|---|
| 41 | | | | |
|---|
| 42 | | | | * replace all the 'mysql_*' functions with 'pwg_db_*' |
|---|
| 43 | | | | functions |
|---|
| 44 | | | | |
|---|
| 45 | | | | * update some html/css |
|---|
| 46 | | | | |
|---|
| 47 | | | | |
|---|
| 48 | | 0.5.0 | 2010/07/24 | * release 0.5.0 was not published, implemented features |
|---|
| 49 | | | | are reported in the release 0.5.1 |
|---|
| 50 | | | | |
|---|
| 51 | | | | |
|---|
| 52 | | 0.5.1 | 2010/09/12 | * update to the JpegMetadata class 1.1.1 to fix the |
|---|
| 53 | | | | mantis bugs&features 1686, 1718, 1719, 1826, 1859 and |
|---|
| 54 | | | | 1870 |
|---|
| 55 | | | | |
|---|
| 56 | | | | * mantis : bug 1686 |
|---|
| 57 | | | | . Picture analysis finish with an Error 500 or with a |
|---|
| 58 | | | | problem of memory limit |
|---|
| 59 | | | | |
|---|
| 60 | | | | * mantis : feature 1719 |
|---|
| 61 | | | | . Coding a DateTime class |
|---|
| 62 | | | | |
|---|
| 63 | | | | * mantis : feature 1718 |
|---|
| 64 | | | | . Make test images lighter |
|---|
| 65 | | | | The weight of tests images provided with the |
|---|
| 66 | | | | JpegMetadata class was too heavy ; the file size |
|---|
| 67 | | | | has been reduced from 9Mb to 230Kb |
|---|
| 68 | | | | |
|---|
| 69 | | | | * mantis : feature 1688 |
|---|
| 70 | | | | . Improve performance when the database is filled |
|---|
| 71 | | | | each time a page is displayed (now using an ajax |
|---|
| 72 | | | | call) |
|---|
| 73 | | | | |
|---|
| 74 | | | | * mantis : feature 1692 |
|---|
| 75 | | | | . Add possibility for user to build their own "magic" |
|---|
| 76 | | | | tags |
|---|
| 77 | | | | |
|---|
| 78 | | | | * mantis : feature 1777 |
|---|
| 79 | | | | . Weight of the metadata database can becomes very |
|---|
| 80 | | | | heavy |
|---|
| 81 | | | | |
|---|
| 82 | | | | * mantis : feature 1691 |
|---|
| 83 | | | | . Add possibility to search picture by metadata |
|---|
| 84 | | | | properties |
|---|
| 85 | | | | |
|---|
| 86 | | | | * mantis bug:1826 |
|---|
| 87 | | | | . digiKam XMP tags are not recognized |
|---|
| 88 | | | | |
|---|
| 89 | | | | * mantis : feature 1846 |
|---|
| 90 | | | | . Read the metadata in the HD picture |
|---|
| 91 | | | | |
|---|
| 92 | | | | * mantis : feature 1857 |
|---|
| 93 | | | | . Implement a basic and an advanced interface mode |
|---|
| 94 | | | | |
|---|
| 95 | | | | * mantis : feature 1858 |
|---|
| 96 | | | | . Ability to import tags from picture to piwigo tags |
|---|
| 97 | | | | |
|---|
| 98 | | | | * mantis bug:1859 |
|---|
| 99 | | | | . JpegMetadata class can't manage multiple IPTC keywords |
|---|
| 100 | | | | keywords |
|---|
| 101 | | | | |
|---|
| 102 | | | | * mantis bug:1861 |
|---|
| 103 | | | | . Accentued chars from ISO-8859-1 charset are not |
|---|
| 104 | | | | recognized |
|---|
| 105 | | | | |
|---|
| 106 | | | | * mantis bug:1870 |
|---|
| 107 | | | | . Xmp ISOSpeedRatings was not interpreted by |
|---|
| 108 | | | | 'Magic' metadata |
|---|
| 109 | | | | |
|---|
| 110 | | | | * ajax management entirely rewritted |
|---|
| 111 | | | | |
|---|
| 112 | | | | * user interface reviewed |
|---|
| 113 | | | | |
|---|
| 114 | | | | * add some triggers events when picture metadata are |
|---|
| 115 | | | | loaded in the picture.php page |
|---|
| 116 | | | | . amd_jpegMD_loaded |
|---|
| 117 | | | | . amd_jpegMD_userDefinedValues_built |
|---|
| 118 | | | | |
|---|
| 119 | | | | * mantis : feature 1858 |
|---|
| 120 | | | | . Ability to import tags from picture to piwigo tags |
|---|
| 121 | | | | |
|---|
| 122 | | 0.5.2 | 2010/09/28 | * fix bug, need to load GPC CommonPlugin.class.inc.php |
|---|
| 123 | | | | on the main.inc.php file |
|---|
| 124 | | | | * the "templates/amd_dialog_metadata_choose.tpl" file |
|---|
| 125 | | | | was not commit on the repository ; so need to build a |
|---|
| 126 | | | | new package |
|---|
| 127 | | | | |
|---|
| 128 | | 0.5.3 | 2010/09/30 | * mantis bug:1894 |
|---|
| 129 | | | | . Error when filling the metadata repository |
|---|
| 130 | | | | |
|---|
| 131 | | | | * mantis bug:1898 |
|---|
| 132 | | | | . Warning "division by zero" on Canon images |
|---|
| 133 | | | | |
|---|
| 134 | | | | * mantis bug:1911 |
|---|
| 135 | | | | . Unable to read Jpeg file if there is extradata |
|---|
| 136 | | | | after the EOI marker |
|---|
| 137 | | | | |
|---|
| 138 | | | | * mantis bug:1863 |
|---|
| 139 | | | | . Except "keywords" meta, all IPTC meta declared |
|---|
| 140 | | | | as "repeatable" are not managed |
|---|
| 141 | | | | |
|---|
| 142 | | | | * mantis bug:1955 |
|---|
| 143 | | | | . Incorrect mapping for IPTC File format |
|---|
| 144 | | | | |
|---|
| 145 | | | | * mantis bug:1956 |
|---|
| 146 | | | | . IPTC "Subject Reference" is not implemented |
|---|
| 147 | | | | |
|---|
| 148 | | | | * mantis bug:1925 |
|---|
| 149 | | | | . default selected tags works only for the french |
|---|
| 150 | | | | user |
|---|
| 151 | | | | |
|---|
| 152 | | | | * mantis bug:1912 |
|---|
| 153 | | | | . Reading digiKam hierarchical keywords as 'flat' |
|---|
| 154 | | | | keywords |
|---|
| 155 | | | | |
|---|
| 156 | | | | * mantis bug:1968 |
|---|
| 157 | | | | . Keyword to tag conversion generate duplicated tags |
|---|
| 158 | | | | |
|---|
| 159 | | | | * mantis bug:1923 |
|---|
| 160 | | | | . with google chrome, the métadata list is not |
|---|
| 161 | | | | displayed |
|---|
| 162 | | | | |
|---|
| 163 | | | | * mantis bug:1294 |
|---|
| 164 | | | | . filling database method |
|---|
| 165 | | | | |
|---|
| 166 | | | | * mantis bug:1975 |
|---|
| 167 | | | | . Implement COM segment as a tag |
|---|
| 168 | | | | |
|---|
| 169 | | | | * mantis bug:1976 |
|---|
| 170 | | | | . Implement keywords as magic tag |
|---|
| 171 | | | | |
|---|
| 172 | | | | * mantis bug:1978 |
|---|
| 173 | | | | . Some meta names are not translated in french |
|---|
| 174 | | | | |
|---|
| 175 | | 0.5.4 | 2010/11/01 | * mantis bug:1990 |
|---|
| 176 | | | | . Since release 0.5.3, unable to do search |
|---|
| 177 | | | | |
|---|
| 178 | | 0.5.5 | 2010-11-02 | * mantis bug:1992 |
|---|
| 179 | | | | . On Canon file, debug informations are displayed |
|---|
| 180 | | | | |
|---|
| 181 | | 0.5.6 | 2010-11-07 | * mantis bug:2015 |
|---|
| 182 | | | | . Can't add a new personnal tag |
|---|
| 183 | | | | |
|---|
| 184 | | | | * mantis bug:2017 |
|---|
| 185 | | | | . MySQL 5.1 incompatibility |
|---|
| 186 | | | | |
|---|
| 187 | | 0.5.7 | 2010-11-08 | * mantis bug:2019 |
|---|
| 188 | | | | . Personnal metadata are not correct |
|---|
| 189 | | | | |
|---|
| 190 | | | | * mantis bug:2020 |
|---|
| 191 | | | | . Impossible to install plugin if it_IT language is |
|---|
| 192 | | | | activated |
|---|
| 193 | | | | |
|---|
| 194 | | 0.5.8 | 2011-01-29 | * add language ru_RU |
|---|
| 195 | | | | |
|---|
| 196 | | 0.5.9 | 2011-01-29 | * mantis bug:2141 |
|---|
| 197 | | | | . MakerNotes on some Nikon file are not recognized |
|---|
| 198 | | | | and script is terminated with a memory allocation |
|---|
| 199 | | | | error |
|---|
| 200 | | | | |
|---|
| 201 | | | | * mantis bug:2191 |
|---|
| 202 | | | | . Array to strong conversion message on MagicTag "Author" |
|---|
| 203 | | | | |
|---|
| 204 | | 0.6.0 | 2011-04-11 | * mantis bug:2143 |
|---|
| 205 | | | | . compatibility with piwigo 2.2 |
|---|
| 206 | | | | |
|---|
| 207 | | | | * mantis bug:2222 |
|---|
| 208 | | | | . Division by zero with Exif ShutterSpeedValue |
|---|
| 209 | | | | |
|---|
| 210 | | 0.6.1 | 2011-09-25 | * mantis bug:2028 |
|---|
| 211 | | | | . Use of deprecated function |
|---|
| 212 | | | | |
|---|
| 213 | | | | * mantis bug:2272 |
|---|
| 214 | | | | . Incompatibility with IE |
|---|
| 215 | | | | |
|---|
| 216 | | | | |
|---|
| 217 | | | | |
|---|
| 218 | | | | |
|---|
| 219 | | | | |
|---|
| 220 | | | | |
|---|
| 221 | | | | |
|---|
| 222 | | | | |
|---|
| 223 | | | | |
|---|
| 224 | | | | |
|---|
| 225 | |
|---|
| 226 | |
|---|
| 227 | :: TO DO |
|---|
| 228 | |
|---|
| 229 | -------------------------------------------------------------------------------- |
|---|
| 230 | * |
|---|
| 231 | * :: NFO |
|---|
| 232 | * AMD_AIM : classe to manage plugin integration into plugin menu |
|---|
| 233 | * AMD_AIP : classe to manage plugin admin pages |
|---|
| 234 | * AMD_PIP : classe to manage plugin public integration |
|---|
| 235 | * |
|---|
| 236 | * |
|---|
| 237 | * :: Triggers & data provided |
|---|
| 238 | * - amd_jpegMD_loaded |
|---|
| 239 | * . triggered on the picture.php page, when metadata were loaded from the |
|---|
| 240 | * picture file |
|---|
| 241 | * . the JpegMetadata object is provided as data to the callback function |
|---|
| 242 | * |
|---|
| 243 | * - amd_jpegMD_userDefinedValues_built |
|---|
| 244 | * . triggered on the picture.php page, when metadata were loaded from the |
|---|
| 245 | * picture file and user defined tags were built |
|---|
| 246 | * . an array is provided as data to the callback function |
|---|
| 247 | * $data['picture'] : an array of (tagId => value) with only the selected |
|---|
| 248 | * metadata |
|---|
| 249 | * $data['user'] : an array of (tagId => value) with only the user |
|---|
| 250 | * defined metadata built |
|---|
| 251 | * |
|---|
| 252 | * |
|---|
| 253 | -------------------------------------------------------------------------------- |
|---|
| 254 | */ |
|---|
| 255 | |
|---|
| 256 | // pour faciliter le debug - make debug easier :o) |
|---|
| 257 | // ini_set('error_reporting', E_ALL); |
|---|
| 258 | // ini_set('display_errors', true); |
|---|
| 259 | |
|---|
| 260 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
|---|
| 261 | |
|---|
| 262 | define('AMD_DIR' , basename(dirname(__FILE__))); |
|---|
| 263 | define('AMD_PATH' , PHPWG_PLUGINS_PATH . AMD_DIR . '/'); |
|---|
| 264 | |
|---|
| 265 | include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); |
|---|
| 266 | include_once('amd_version.inc.php'); // => Don't forget to update this file !! |
|---|
| 267 | |
|---|
| 268 | global $prefixeTable, $page; |
|---|
| 269 | |
|---|
| 270 | |
|---|
| 271 | if(defined('IN_ADMIN')) |
|---|
| 272 | { |
|---|
| 273 | //AMD admin part loaded and active only if in admin page |
|---|
| 274 | include_once("amd_aim.class.inc.php"); |
|---|
| 275 | $obj = new AMD_AIM($prefixeTable, __FILE__); |
|---|
| 276 | $obj->initEvents(); |
|---|
| 277 | set_plugin_data($plugin['id'], $obj); |
|---|
| 278 | } |
|---|
| 279 | else |
|---|
| 280 | { |
|---|
| 281 | //AMD public part loaded and active only if in public page and if GPC is up to date |
|---|
| 282 | if(CommonPlugin::checkGPCRelease(3,3,2)) |
|---|
| 283 | { |
|---|
| 284 | include_once("amd_pip.class.inc.php"); |
|---|
| 285 | $obj = new AMD_PIP($prefixeTable, __FILE__); |
|---|
| 286 | set_plugin_data($plugin['id'], $obj); |
|---|
| 287 | } |
|---|
| 288 | } |
|---|
| 289 | |
|---|
| 290 | |
|---|
| 291 | ?> |
|---|