source: extensions/GrumPluginClasses/gpc_aip.class.inc.php @ 29019

Last change on this file since 29019 was 16012, checked in by grum, 12 years ago

feature:2634- compatibility with Piwigo 2.4
+add some objects on js framework

File size: 2.8 KB
Line 
1<?php
2/* -----------------------------------------------------------------------------
3  Plugin     : Grum Plugin Classes - 3
4  Author     : Grum
5    email    : grum@piwigo.org
6    website  : http://photos.grum.fr
7
8    << May the Little SpaceFrog be with you ! >>
9  ------------------------------------------------------------------------------
10  See main.inc.php for release information
11
12  AI classe => manage integration in administration interface
13
14  --------------------------------------------------------------------------- */
15if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
16
17include_once('gpc_aim.class.inc.php');
18include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
19include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCore.class.inc.php');
20
21class GPC_AIP extends GPC_AIM
22{
23  protected $tabsheet;
24
25  public function __construct($prefixeTable, $filelocation)
26  {
27    parent::__construct($prefixeTable, $filelocation);
28
29    $this->loadConfig();
30    $this->initEvents();
31
32    $this->tabsheet = new tabsheet();
33    $this->tabsheet->add('infos',
34                          l10n('Infos'),
35                          '');
36  }
37
38  /* ---------------------------------------------------------------------------
39  Public classe functions
40  --------------------------------------------------------------------------- */
41
42  /*
43    manage plugin integration into piwigo's admin interface
44  */
45  public function manage()
46  {
47    global $template;
48
49    $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/gpc_admin.tpl");
50
51    $this->displayStats();
52
53    $this->tabsheet->select('infos');
54    $this->tabsheet->assign();
55    $selected_tab=$this->tabsheet->get_selected();
56    $template->assign($this->tabsheet->get_titlename(), "[".$selected_tab['caption']."]");
57
58    $template_plugin["GPC_VERSION"] = "<i>".$this->getPluginName()."</i> ".l10n('version').GPC_VERSION;
59
60    $template->assign('plugin', $template_plugin);
61    $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
62  }
63
64  /* ---------------------------------------------------------------------------
65  Private classe functions
66  --------------------------------------------------------------------------- */
67
68
69  private function displayStats()
70  {
71    global $template;
72
73    $template->set_filename('body_page', dirname(__FILE__)."/admin/gpc_infos.tpl");
74
75    $template_datas = array();
76
77    $template_datas['modules']=GPCCore::getModulesInfos();
78    $template_datas['plugins']=GPCCore::getRegistered();
79
80    $template->assign('datas', $template_datas);
81    $template->assign_var_from_handle('GPC_BODY_PAGE', 'body_page');
82  }
83
84  /* ---------------------------------------------------------------------------
85   * AJAX functions
86   * ------------------------------------------------------------------------- */
87
88} // GPC_AIP class
89
90
91?>
Note: See TracBrowser for help on using the repository browser.