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 // | Spam-X Plugin 1.2 |
6 // +---------------------------------------------------------------------------+
9 // | This file provides helper functions for the automatic plugin install. |
10 // +---------------------------------------------------------------------------+
11 // | Copyright (C) 2008-2009 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 // +---------------------------------------------------------------------------+
33 * Autoinstall API functions for the Spam-X plugin
39 * Plugin autoinstall function
41 * @param string $pi_name Plugin name
42 * @return array Plugin information
45 function plugin_autoinstall_spamx($pi_name)
48 $pi_display_name = 'Spam-X';
49 $pi_admin = $pi_name . ' Admin';
52 'pi_name' => $pi_name,
53 'pi_display_name' => $pi_display_name,
54 'pi_version' => '1.2.0',
55 'pi_gl_version' => '1.6.0',
56 'pi_homepage' => 'http://www.pigstye.net/gplugs/staticpages/index.php/spamx'
60 $pi_admin => 'Users in this group can administer the '
61 . $pi_display_name . ' plugin'
65 $pi_name . '.admin' => 'Full access to ' . $pi_display_name
70 $pi_name . '.admin' => array($pi_admin)
80 'features' => $features,
81 'mappings' => $mappings,
89 * Load plugin configuration from database
91 * @param string $pi_name Plugin name
92 * @return boolean true on success, otherwise false
93 * @see plugin_initconfig_spamx
96 function plugin_load_configuration_spamx($pi_name)
100 $base_path = $_CONF['path'] . 'plugins/' . $pi_name . '/';
102 require_once $_CONF['path_system'] . 'classes/config.class.php';
103 require_once $base_path . 'install_defaults.php';
105 return plugin_initconfig_spamx();
109 * Check if the plugin is compatible with this Geeklog version
111 * @param string $pi_name Plugin name
112 * @return boolean true: plugin compatible; false: not compatible
115 function plugin_compatible_with_this_version_spamx($pi_name)
117 global $_CONF, $_DB_dbms;
119 // check if we support the DBMS the site is running on
120 $dbFile = $_CONF['path'] . 'plugins/' . $pi_name . '/sql/'
121 . $_DB_dbms . '_install.php';
122 if (! file_exists($dbFile)) {
126 if (! function_exists('PLG_spamAction')) {
130 if (! function_exists('SEC_createToken')) {
134 if (! function_exists('COM_showMessageText')) {