source: trunk/plugins/AMenuManager/maintain.inc.php @ 2488

Last change on this file since 2488 was 2488, checked in by rvelices, 16 years ago
  • based on test_menu by grum (thanks to you) - integration of dynamic menu bar to pwg
  • the menubar is composed now of dynamic blocks that can be ordered/hidden
  • plugins can add their own blocks
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
4
5ini_set('error_reporting', E_ALL);
6ini_set('display_errors', true);
7
8defined('AMM_DIR') || define('AMM_DIR' , basename(dirname(__FILE__)));
9defined('AMM_PATH') || define('AMM_PATH' , PHPWG_PLUGINS_PATH . AMM_DIR . '/');
10@include_once(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/tables.class.inc.php');
11
12
13global $gpc_installed, $lang; //needed for plugin manager compatibility
14
15$gpc_installed=false;
16if(file_exists(PHPWG_PLUGINS_PATH.'grum_plugins_classes-2/common_plugin.class.inc.php'))
17{
18  @include_once("amm_install.class.inc.php");
19  $gpc_installed=true;
20}
21
22load_language('plugin.lang', AMM_PATH);
23
24function plugin_install($plugin_id, $plugin_version, &$errors) 
25{
26  global $prefixeTable, $gpc_installed;
27  if($gpc_installed)
28  {
29    //$menu->register('mbAMM_links', 'Links', 0, 'AMM');
30    //$menu->register('mbAMM_randompict', 'Random pictures', 0, 'AMM');
31    $amm=new AMM_install($prefixeTable, __FILE__);
32    $result=$amm->install();
33  }
34  else
35  {
36    array_push($errors, l10n('Grum Plugin Classes is not installed'));
37  }
38}
39
40function plugin_activate($plugin_id, $plugin_version, &$errors)
41{
42}
43
44function plugin_deactivate($plugin_id)
45{
46}
47
48function plugin_uninstall($plugin_id)
49{
50  global $prefixeTable;
51  $amm=new AMM_install($prefixeTable, __FILE__);
52  $result=$amm->uninstall();
53}
54
55
56
57?>
Note: See TracBrowser for help on using the repository browser.