1 | <?php |
---|
2 | /* |
---|
3 | * ----------------------------------------------------------------------------- |
---|
4 | * Plugin Name: Advanced MetaData |
---|
5 | * ----------------------------------------------------------------------------- |
---|
6 | * Author : Grum |
---|
7 | * email : grum@piwigo.org |
---|
8 | * website : http://photos.grum.fr |
---|
9 | * PWG user : http://forum.piwigo.org/profile.php?id=3706 |
---|
10 | * |
---|
11 | * << May the Little SpaceFrog be with you ! >> |
---|
12 | * |
---|
13 | * ----------------------------------------------------------------------------- |
---|
14 | * |
---|
15 | * See main.inc.php for release information |
---|
16 | * |
---|
17 | * AIPRelease class => display warning if GPC release is not up to date |
---|
18 | * |
---|
19 | * ----------------------------------------------------------------------------- |
---|
20 | */ |
---|
21 | |
---|
22 | |
---|
23 | if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
24 | |
---|
25 | include_once('cstat_root.class.inc.php'); |
---|
26 | |
---|
27 | class CStat_AIPRelease extends CSTAT_root |
---|
28 | { |
---|
29 | public function __construct($prefixeTable, $filelocation) |
---|
30 | { |
---|
31 | parent::__construct($prefixeTable, $filelocation); |
---|
32 | $this->loadConfig(); |
---|
33 | $this->initEvents(); |
---|
34 | } |
---|
35 | |
---|
36 | /* |
---|
37 | initialize events call for the plugin |
---|
38 | */ |
---|
39 | public function initEvents() |
---|
40 | { |
---|
41 | parent::initEvents(); |
---|
42 | add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS')); |
---|
43 | } |
---|
44 | |
---|
45 | /* |
---|
46 | display administration page |
---|
47 | */ |
---|
48 | public function manage() |
---|
49 | { |
---|
50 | global $template; |
---|
51 | |
---|
52 | $template->set_filename('plugin_admin_content', dirname($this->getFileLocation())."/admin/cstat_admin.tpl"); |
---|
53 | |
---|
54 | $pluginInfo=array( |
---|
55 | 'CSTAT_VERSION' => "<i>".$this->getPluginName()."</i> ".l10n('g003_version').CSTAT_VERSION, |
---|
56 | 'PATH' => CSTAT_PATH |
---|
57 | ); |
---|
58 | |
---|
59 | $template->assign('plugin', $pluginInfo); |
---|
60 | $template->assign('CSTAT_BODY_PAGE', '<p class="warnings">'.sprintf(l10n('cstat_gpc_not_up_to_date'),CSTAT_GPC_NEEDED, GPC_VERSION).'</p>'); |
---|
61 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
62 | } |
---|
63 | |
---|
64 | |
---|
65 | |
---|
66 | |
---|
67 | } //class |
---|
68 | |
---|
69 | |
---|
70 | ?> |
---|