source: extensions/AMetaData/main.inc.php @ 6950

Last change on this file since 6950 was 6950, checked in by grum, 14 years ago

Implement metadata keywords to piwigo tags convert functionnalies
Add some help text
bug:1858

  • Property svn:executable set to *
File size: 6.9 KB
Line 
1<?php
2/*
3Plugin Name: Advanced MetaData
4Version: 0.5.1
5Description: An advanced metadata manager
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=364
7Author: grum@piwigo.org
8Author 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.0.1 to fix the
53|         |            |   mantis bugs&features 1686, 1718 and 1719
54|         |            |
55|         |            | * mantis : bug 1686
56|         |            |   . Picture analysis finish with an Error 500 or with a
57|         |            |     problem of memory limit
58|         |            |
59|         |            | * mantis : feature 1719
60|         |            |   . Coding a DateTime class
61|         |            |
62|         |            | * mantis : feature 1718
63|         |            |   . Make test images lighter
64|         |            |     The weight of tests images provided with the
65|         |            |     JpegMetadata class was to heavy ; the file size has
66|         |            |     been reduced from 9Mb to 230Kb
67|         |            |
68|         |            | * mantis : feature 1688
69|         |            |   . Improve performance when the database is filled
70|         |            |     each time a page is displayed (now using an ajax
71|         |            |     call)
72|         |            |
73|         |            | * mantis : feature 1692
74|         |            |   . Add possibility for user to build their own "magic"
75|         |            |     tags
76|         |            |
77|         |            | * mantis : feature 1777
78|         |            |   . Weight of the metadata database can becomes very
79|         |            |     heavy
80|         |            |
81|         |            | * mantis : feature 1691
82|         |            |   . Add possibility to search picture by metadata
83|         |            |     properties
84|         |            |
85|         |            | * mantis bug:1826
86|         |            |   . digiKam XMP tags are not recognized
87|         |            |
88|         |            | * mantis : feature 1846
89|         |            |   . Read the metadata in the HD picture
90|         |            |
91|         |            | * mantis : feature 1857
92|         |            |   . Implement a basic and an advanced interface mode
93|         |            |
94|         |            | * mantis : feature 1858
95|         |            |   . Ability to import tags from picture to piwigo tags
96|         |            |
97|         |            | * mantis bug:1859
98|         |            |   . JpegMetadata class can't manage multiple IPTC keywords
99|         |            |     keywords
100|         |            |
101|         |            | * mantis bug:1861
102|         |            |   . Accentued chars from ISO-8859-1 charset are not
103|         |            |     recognized
104|         |            |
105|         |            | * ajax management entirely rewritted
106|         |            |
107|         |            | * user interface reviewed
108|         |            |
109|         |            | * add some triggers events when picture metadata are
110|         |            |   loaded in the picture.php page
111|         |            |   . amd_jpegMD_loaded
112|         |            |   . amd_jpegMD_userDefinedValues_built
113|         |            |
114|         |            | * mantis : feature 1858
115|         |            |   . Ability to import tags from picture to piwigo tags
116|         |            |
117|         |            |
118|         |            |
119|         |            |
120|         |            |
121|         |            |
122|         |            |
123|         |            |
124|         |            |
125|         |            |
126|         |            |
127|         |            |
128|         |            |
129
130
131:: TO DO
132
133--------------------------------------------------------------------------------
134*
135* :: NFO
136* AMD_AIM : classe to manage plugin integration into plugin menu
137* AMD_AIP : classe to manage plugin admin pages
138* AMD_PIP : classe to manage plugin public integration
139*
140*
141* :: Triggers & data provided
142* - amd_jpegMD_loaded
143*   . triggered on the picture.php page, when metadata were loaded from the
144*     picture file
145*   . the JpegMetadata object is provided as data to the callback function
146*
147* - amd_jpegMD_userDefinedValues_built
148*   . triggered on the picture.php page, when metadata were loaded from the
149*     picture file and user defined tags were built
150*   . an array is provided as data to the callback function
151*       $data['picture'] : an array of (tagId => value) with only the selected
152*                          metadata
153*       $data['user']    : an array of (tagId => value) with only the user
154*                          defined metadata built
155*
156*
157--------------------------------------------------------------------------------
158*/
159
160// pour faciliter le debug - make debug easier :o)
161// ini_set('error_reporting', E_ALL);
162// ini_set('display_errors', true);
163
164if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
165
166define('AMD_DIR' , basename(dirname(__FILE__)));
167define('AMD_PATH' , PHPWG_PLUGINS_PATH . AMD_DIR . '/');
168
169include_once('amd_version.inc.php'); // => Don't forget to update this file !!
170
171global $prefixeTable, $page;
172
173
174if(defined('IN_ADMIN'))
175{
176  //AMD admin part loaded and active only if in admin page
177  include_once("amd_aim.class.inc.php");
178  $obj = new AMD_AIM($prefixeTable, __FILE__);
179  $obj->initEvents();
180  set_plugin_data($plugin['id'], $obj);
181}
182else
183{
184  //AMD public part loaded and active only if in public page
185  include_once("amd_pip.class.inc.php");
186  $obj = new AMD_PIP($prefixeTable, __FILE__);
187  set_plugin_data($plugin['id'], $obj);
188}
189
190
191?>
Note: See TracBrowser for help on using the repository browser.