Integrate plugin system with mibew

This commit is contained in:
Dmitriy Simushev 2012-07-18 11:32:37 +00:00
parent 66a0d6ddca
commit 3f95a395c8
3 changed files with 42 additions and 0 deletions

View File

@ -19,6 +19,7 @@ session_start();
require_once(dirname(__FILE__) . '/converter.php'); require_once(dirname(__FILE__) . '/converter.php');
require_once(dirname(__FILE__) . '/config.php'); require_once(dirname(__FILE__) . '/config.php');
require_once(dirname(__FILE__) . '/plugins.php');
require_once(dirname(__FILE__) . '/classes/database.php'); require_once(dirname(__FILE__) . '/classes/database.php');
require_once(dirname(__FILE__) . '/classes/settings.php'); require_once(dirname(__FILE__) . '/classes/settings.php');

View File

@ -51,4 +51,18 @@ $mail_encoding = "utf-8";
$home_locale = "en"; /* native name will be used in this locale */ $home_locale = "en"; /* native name will be used in this locale */
$default_locale = "en"; /* if user does not provide known lang */ $default_locale = "en"; /* if user does not provide known lang */
/*
* Plugins
*/
$plugins_list = array();
/* Exapmle of plugins configuration
$plugins_list[] = array(
'name' => 'plugin_name',
'config' => array(
'weight' => 100,
'some_configurable_value' => 'value'
)
)
*/
?> ?>

View File

@ -0,0 +1,27 @@
<?php
/*
* Copyright 2005-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once(dirname(__FILE__) . '/classes/event_dispatcher.php');
require_once(dirname(__FILE__) . '/classes/plugin_manager.php');
require_once(dirname(__FILE__) . '/classes/plugin.php');
if (! empty($plugins_list)) {
// Variable $plugins_config defined in libs/config.php
PluginManager::loadPlugins($plugins_list);
}
?>