mirror of
				https://github.com/Mibew/tray.git
				synced 2025-10-03 00:03:34 +03:00 
			
		
		
		
	Integrate plugin system with mibew
This commit is contained in:
		
							parent
							
								
									66a0d6ddca
								
							
						
					
					
						commit
						3f95a395c8
					
				| @ -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'); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -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' | ||||||
|  | 	) | ||||||
|  | ) | ||||||
|  | */ | ||||||
|  | 
 | ||||||
| ?>
 | ?>
 | ||||||
							
								
								
									
										27
									
								
								src/messenger/webim/libs/plugins.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/messenger/webim/libs/plugins.php
									
									
									
									
									
										Normal 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); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | ?>
 | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user