Added a check to all plugins to see if they support the DBMS the site is running on
3 /* Reminder: always indent with 4 spaces (no tabs). */
4 // +---------------------------------------------------------------------------+
5 // | Calendar Plugin 1.1 |
6 // +---------------------------------------------------------------------------+
9 // | This file provides helper functions for the automatic plugin install. |
10 // +---------------------------------------------------------------------------+
11 // | Copyright (C) 2008 by the following authors: |
13 // | Authors: Dirk Haun - dirk AT haun-online DOT de |
14 // +---------------------------------------------------------------------------+
16 // | This program is free software; you can redistribute it and/or |
17 // | modify it under the terms of the GNU General Public License |
18 // | as published by the Free Software Foundation; either version 2 |
19 // | of the License, or (at your option) any later version. |
21 // | This program is distributed in the hope that it will be useful, |
22 // | but WITHOUT ANY WARRANTY; without even the implied warranty of |
23 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
24 // | GNU General Public License for more details. |
26 // | You should have received a copy of the GNU General Public License |
27 // | along with this program; if not, write to the Free Software Foundation, |
28 // | Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
30 // +---------------------------------------------------------------------------+
32 function plugin_autoinstall_calendar($pi_name)
34 $pi_name = 'calendar';
35 $pi_display_name = 'Calendar';
36 $pi_admin = $pi_display_name . ' Admin';
39 'pi_name' => $pi_name,
40 'pi_display_name' => $pi_display_name,
41 'pi_version' => '1.1.0',
42 'pi_gl_version' => '1.6.0',
43 'pi_homepage' => 'http://www.geeklog.net/'
47 $pi_admin => 'Has full access to ' . $pi_display_name . ' features'
51 $pi_name . '.moderate' => 'Ability to moderate pending events',
52 $pi_name . '.edit' => 'Access to event editor',
53 $pi_name . '.submit' => 'May skip the event submission queue'
57 $pi_name . '.moderate' => array($pi_admin),
58 $pi_name . '.edit' => array($pi_admin),
59 $pi_name . '.submit' => array($pi_admin)
71 'features' => $features,
72 'mappings' => $mappings,
79 function plugin_load_configuration_calendar($pi_name)
83 $base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/';
85 require_once $_CONF['path_system'] . 'classes/config.class.php';
86 require_once $base_path . 'install_defaults.php';
88 return plugin_initconfig_calendar();
91 function plugin_postinstall_calendar($pi_name)
96 function plugin_compatible_with_this_version_calendar($pi_name)
98 global $_CONF, $_DB_dbms;
100 // check if we support the DBMS the site is running on
101 $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
102 . $_DB_dbms . '_install.php';
103 if (! file_exists($dbFile)) {
107 if (function_exists('COM_printUpcomingEvents')) {
108 // if this function exists, then someone's trying to install the
109 // plugin on Geeklog 1.4.0 or older - sorry, but that won't work
113 if (!function_exists('MBYTE_strpos')) {
114 // the plugin requires the multi-byte functions
118 if (!function_exists('COM_createLink')) {
122 if (!function_exists('SEC_createToken')) {
126 if (!function_exists('COM_showMessageText')) {