- Timestamp:
- Jul 29, 2010, 2:58:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
r6106 r6733 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCCore 5 class version : 1. 1.06 plugin version : 3. 1.07 date : 2010-0 3-305 class version : 1.2.0 6 plugin version : 3.2.0 7 date : 2010-07-28 8 8 ------------------------------------------------------------------------------ 9 9 author: grum at piwigo.org … … 18 18 | 1.1.0 | 2010/03/30 | * add the BBtoHTML function 19 19 | | | 20 | 1.2.0 | 2010/07/28 | * add the loadConfigFromFile function 20 21 | | | 21 22 | | | … … 26 27 no constructor, only static function are provided 27 28 - static function loadConfig 29 - static function loadConfigFromFile 28 30 - static function saveConfig 29 31 - static function deleteConfig … … 48 50 return( 49 51 Array( 50 Array('name' => "CommonPlugin", 'version' => "2. 1.0"),52 Array('name' => "CommonPlugin", 'version' => "2.2.0"), 51 53 Array('name' => "GPCAjax", 'version' => "3.0.0"), 52 Array('name' => "GPCCore", 'version' => "1. 1.0"),54 Array('name' => "GPCCore", 'version' => "1.2.0"), 53 55 Array('name' => "GPCCss", 'version' => "3.0.0"), 54 56 Array('name' => "GPCPagesNavigations", 'version' => "2.0.0"), … … 56 58 Array('name' => "GPCRequestBuilder", 'version' => "1.0.0"), 57 59 Array('name' => "GPCTables", 'version' => "1.5.0"), 58 Array('name' => "GPCTabSheet", 'version' => "1. 0.0"),60 Array('name' => "GPCTabSheet", 'version' => "1.1.0"), 59 61 Array('name' => "GPCTranslate", 'version' => "2.1.0"), 60 62 Array('name' => "GPCUsersGroups", 'version' => "2.0.0"), … … 189 191 190 192 /** 193 * load config from a file into an array 194 * 195 * note : the config file is a PHP file one var $conf used as an array, 196 * like the piwigo $conf var 197 * 198 * @param String $fileName : the file name 199 * @param Array $config : array, initialized or not with default values ; the 200 * config values are loaded in this value 201 * @return Boolean : true if config is loaded, otherwise false 202 */ 203 static public function loadConfigFromFile($fileName, &$config=Array()) 204 { 205 $conf=array(); 206 207 if(!is_array($config) or !file_exists($fileName)) 208 { 209 return(false); 210 } 211 212 include_once($fileName); 213 214 foreach($conf as $key=>$val) 215 { 216 $config[$key]=$val; 217 } 218 return(true); 219 } 220 221 222 /** 191 223 * save var $my_config into CONFIG_TABLE 192 224 * … … 247 279 '/\[b\](.*?)\[\/b\]/ism', 248 280 '/\[i\](.*?)\[\/i\]/ism', 281 '/\[p\](.*?)\[\/p\]/ism', 249 282 '/\[url\]([\w]+?:\/\/[^ \"\n\r\t<]*?)\[\/url\]/ism', 250 283 '/\[url=([\w]+?:\/\/[^ \"\n\r\t<]*?)\](.*?)\[\/url\]/ism', … … 257 290 '<b>\1</b>', 258 291 '<i>\1</i>', 292 '<p>\1</p>', 259 293 '<a href="\1">\1</a>', 260 294 '<a href="\1">\2</a>',
Note: See TracChangeset
for help on using the changeset viewer.