[4905] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: Advanced MetaData |
---|
[7036] | 4 | Version: 0.5.2 |
---|
[4905] | 5 | Description: An advanced metadata manager |
---|
[5935] | 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=364 |
---|
| 7 | Author: grum@piwigo.org |
---|
| 8 | Author URI: http://photos.grum.fr/ |
---|
[4905] | 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 | |
---|
[5227] | 24 | | 0.0 | 2010/01/21 | * start coding |
---|
[5959] | 25 | | | | |
---|
[6950] | 26 | | | | |
---|
[5227] | 27 | | 0.1b | 2010/03/21 | * beta release |
---|
[5959] | 28 | | | | |
---|
[6950] | 29 | | | | |
---|
[5791] | 30 | | 0.2b | 2010/03/23 | * beta release |
---|
[5959] | 31 | | | | |
---|
[6950] | 32 | | | | |
---|
[5791] | 33 | | 0.3b | 2010/04/11 | * beta release |
---|
[4905] | 34 | | | | |
---|
[6950] | 35 | | | | |
---|
[6722] | 36 | | 0.4.0 | 2010/04/24 | * release for Piwigo 2.1 |
---|
[6950] | 37 | | | | |
---|
[5959] | 38 | | | | * uses some GPC 3.1.0 functions |
---|
[6950] | 39 | | | | |
---|
[5959] | 40 | | | | * optimize ajax request to fill the metadata database |
---|
[6950] | 41 | | | | |
---|
[5959] | 42 | | | | * replace all the 'mysql_*' functions with 'pwg_db_*' |
---|
| 43 | | | | functions |
---|
[6950] | 44 | | | | |
---|
[5959] | 45 | | | | * update some html/css |
---|
[4905] | 46 | | | | |
---|
[6891] | 47 | | | | |
---|
[6950] | 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 | | | | |
---|
[6987] | 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 |
---|
[6950] | 55 | | | | |
---|
[6722] | 56 | | | | * mantis : bug 1686 |
---|
| 57 | | | | . Picture analysis finish with an Error 500 or with a |
---|
| 58 | | | | problem of memory limit |
---|
[6950] | 59 | | | | |
---|
[6722] | 60 | | | | * mantis : feature 1719 |
---|
| 61 | | | | . Coding a DateTime class |
---|
[6950] | 62 | | | | |
---|
[6722] | 63 | | | | * mantis : feature 1718 |
---|
| 64 | | | | . Make test images lighter |
---|
| 65 | | | | The weight of tests images provided with the |
---|
[6977] | 66 | | | | JpegMetadata class was too heavy ; the file size |
---|
| 67 | | | | has been reduced from 9Mb to 230Kb |
---|
[6950] | 68 | | | | |
---|
[6722] | 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) |
---|
[6950] | 73 | | | | |
---|
[6722] | 74 | | | | * mantis : feature 1692 |
---|
| 75 | | | | . Add possibility for user to build their own "magic" |
---|
| 76 | | | | tags |
---|
[6950] | 77 | | | | |
---|
[6729] | 78 | | | | * mantis : feature 1777 |
---|
| 79 | | | | . Weight of the metadata database can becomes very |
---|
| 80 | | | | heavy |
---|
[6950] | 81 | | | | |
---|
[6891] | 82 | | | | * mantis : feature 1691 |
---|
| 83 | | | | . Add possibility to search picture by metadata |
---|
| 84 | | | | properties |
---|
[6950] | 85 | | | | |
---|
| 86 | | | | * mantis bug:1826 |
---|
| 87 | | | | . digiKam XMP tags are not recognized |
---|
| 88 | | | | |
---|
[6891] | 89 | | | | * mantis : feature 1846 |
---|
| 90 | | | | . Read the metadata in the HD picture |
---|
[6950] | 91 | | | | |
---|
[6919] | 92 | | | | * mantis : feature 1857 |
---|
| 93 | | | | . Implement a basic and an advanced interface mode |
---|
[6950] | 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 | | | | |
---|
[6987] | 106 | | | | * mantis bug:1870 |
---|
| 107 | | | | . Xmp ISOSpeedRatings was not interpreted by |
---|
| 108 | | | | 'Magic' metadata |
---|
| 109 | | | | |
---|
[6891] | 110 | | | | * ajax management entirely rewritted |
---|
[6950] | 111 | | | | |
---|
[6722] | 112 | | | | * user interface reviewed |
---|
[6950] | 113 | | | | |
---|
[6891] | 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 |
---|
[4905] | 118 | | | | |
---|
[6950] | 119 | | | | * mantis : feature 1858 |
---|
| 120 | | | | . Ability to import tags from picture to piwigo tags |
---|
[6722] | 121 | | | | |
---|
[7036] | 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 |
---|
[6722] | 127 | | | | |
---|
| 128 | | | | |
---|
| 129 | | | | |
---|
| 130 | | | | |
---|
| 131 | | | | |
---|
[6891] | 132 | | | | |
---|
| 133 | | | | |
---|
[4905] | 134 | |
---|
| 135 | |
---|
| 136 | :: TO DO |
---|
| 137 | |
---|
| 138 | -------------------------------------------------------------------------------- |
---|
[6891] | 139 | * |
---|
| 140 | * :: NFO |
---|
| 141 | * AMD_AIM : classe to manage plugin integration into plugin menu |
---|
| 142 | * AMD_AIP : classe to manage plugin admin pages |
---|
| 143 | * AMD_PIP : classe to manage plugin public integration |
---|
| 144 | * |
---|
| 145 | * |
---|
| 146 | * :: Triggers & data provided |
---|
| 147 | * - amd_jpegMD_loaded |
---|
| 148 | * . triggered on the picture.php page, when metadata were loaded from the |
---|
| 149 | * picture file |
---|
| 150 | * . the JpegMetadata object is provided as data to the callback function |
---|
| 151 | * |
---|
| 152 | * - amd_jpegMD_userDefinedValues_built |
---|
| 153 | * . triggered on the picture.php page, when metadata were loaded from the |
---|
| 154 | * picture file and user defined tags were built |
---|
| 155 | * . an array is provided as data to the callback function |
---|
| 156 | * $data['picture'] : an array of (tagId => value) with only the selected |
---|
| 157 | * metadata |
---|
| 158 | * $data['user'] : an array of (tagId => value) with only the user |
---|
| 159 | * defined metadata built |
---|
| 160 | * |
---|
| 161 | * |
---|
[4905] | 162 | -------------------------------------------------------------------------------- |
---|
| 163 | */ |
---|
| 164 | |
---|
| 165 | // pour faciliter le debug - make debug easier :o) |
---|
[5935] | 166 | // ini_set('error_reporting', E_ALL); |
---|
| 167 | // ini_set('display_errors', true); |
---|
[4905] | 168 | |
---|
| 169 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 170 | |
---|
| 171 | define('AMD_DIR' , basename(dirname(__FILE__))); |
---|
| 172 | define('AMD_PATH' , PHPWG_PLUGINS_PATH . AMD_DIR . '/'); |
---|
| 173 | |
---|
[7036] | 174 | include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); |
---|
[5935] | 175 | include_once('amd_version.inc.php'); // => Don't forget to update this file !! |
---|
[4905] | 176 | |
---|
| 177 | global $prefixeTable, $page; |
---|
| 178 | |
---|
| 179 | |
---|
| 180 | if(defined('IN_ADMIN')) |
---|
| 181 | { |
---|
| 182 | //AMD admin part loaded and active only if in admin page |
---|
| 183 | include_once("amd_aim.class.inc.php"); |
---|
| 184 | $obj = new AMD_AIM($prefixeTable, __FILE__); |
---|
[5935] | 185 | $obj->initEvents(); |
---|
[4905] | 186 | set_plugin_data($plugin['id'], $obj); |
---|
| 187 | } |
---|
| 188 | else |
---|
| 189 | { |
---|
[6977] | 190 | //AMD public part loaded and active only if in public page and if GPC is up to date |
---|
| 191 | if(CommonPlugin::checkGPCRelease(3,2,0)) |
---|
| 192 | { |
---|
| 193 | include_once("amd_pip.class.inc.php"); |
---|
| 194 | $obj = new AMD_PIP($prefixeTable, __FILE__); |
---|
| 195 | set_plugin_data($plugin['id'], $obj); |
---|
| 196 | } |
---|
[4905] | 197 | } |
---|
| 198 | |
---|
| 199 | |
---|
| 200 | ?> |
---|