Changeset 5958 for extensions
- Timestamp:
- Apr 25, 2010, 12:33:24 AM (15 years ago)
- Location:
- extensions/GrumPluginClasses
- Files:
-
- 2 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/CommonPlugin.class.inc.php
r5550 r5958 225 225 226 226 /* 227 in tialize plugin's events227 initialize plugin's events 228 228 to be surcharged by child's classes 229 229 */ -
extensions/GrumPluginClasses/classes/GPCCore.class.inc.php
r5919 r5958 3 3 /* ----------------------------------------------------------------------------- 4 4 class name : GPCCore 5 class version : 3.0.06 plugin version : 3. 0.05 class version : 1.1.0 6 plugin version : 3.1.0 7 7 date : 2010-03-30 8 8 ------------------------------------------------------------------------------ … … 14 14 15 15 | release | date | 16 | 3.0.0 | 2010/03/30 | * Update class & function names 17 | | | 16 | 1.0.0 | 2010/03/30 | * Update class & function names 17 | | | 18 | 1.1.0 | 2010/03/30 | * add the BBtoHTML function 18 19 | | | 19 20 | | | … … 31 32 - static function register 32 33 - static function unregister 34 - static function BBtoHTML 33 35 ---------------------------------------------------------------------- */ 34 36 … … 48 50 Array('name' => "CommonPlugin", 'version' => "2.1.0"), 49 51 Array('name' => "GPCAjax", 'version' => "3.0.0"), 50 Array('name' => "GPCCore", 'version' => "1. 0.0"),52 Array('name' => "GPCCore", 'version' => "1.1.0"), 51 53 Array('name' => "GPCCss", 'version' => "3.0.0"), 52 54 Array('name' => "GPCPagesNavigations", 'version' => "2.0.0"), … … 223 225 } 224 226 227 228 /** 229 * convert (light) BB tag to HTML tag 230 * 231 * all BB codes are not recognized, only : 232 * - [ul] [/ul] 233 * - [li] [/li] 234 * - [b] [/b] 235 * - [i] [/i] 236 * - [url] [/url] 237 * - carriage return is replaced by a <br> 238 * 239 * @param String $text : text to convert 240 * @return String : BB to HTML text 241 */ 242 static public function BBtoHTML($text) 243 { 244 $patterns = Array( 245 '/\[li\](.*?)\[\/li\]\n*/im', 246 '/\[b\](.*?)\[\/b\]/ism', 247 '/\[i\](.*?)\[\/i\]/ism', 248 '/\[url\]([\w]+?:\/\/[^ \"\n\r\t<]*?)\[\/url\]/ism', 249 '/\[url=([\w]+?:\/\/[^ \"\n\r\t<]*?)\](.*?)\[\/url\]/ism', 250 '/\n{0,1}\[ul\]\n{0,1}/im', 251 '/\n{0,1}\[\/ul\]\n{0,1}/im', 252 '/\n/im', 253 ); 254 $replacements = Array( 255 '<li>\1</li>', 256 '<b>\1</b>', 257 '<i>\1</i>', 258 '<a href="\1">\1</a>', 259 '<a href="\1">\2</a>', 260 '<ul>', 261 '</ul>', 262 '<br>', 263 ); 264 265 return(preg_replace($patterns, $replacements, $text)); 266 } 267 225 268 } //class 226 269 -
extensions/GrumPluginClasses/classes/GPCCss.class.inc.php
r5550 r5958 41 41 { 42 42 private $filename; 43 44 static public function applyGpcCss() 45 { 46 add_event_handler('loc_end_page_header', array('GPCCss', 'applyCSSFile')); 47 } 48 49 static public function applyCSSFile($fileName="") 50 { 51 global $template; 52 53 if($fileName=="") 54 { 55 //if no filename given, load the gpc.css file 56 $fileName=basename(dirname(dirname(__FILE__))).'/css/gpc.css'; 57 $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="plugins/'.$fileName.'">'); 58 } 59 elseif(file_exists($fileName)) 60 { 61 $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="plugins/'.basename(dirname($fileName))."/".basename($fileName).'">'); 62 } 63 } 43 64 44 65 public function __construct($filename) … … 86 107 global $template; 87 108 88 if($this->fileExists()) 89 { 90 $template->append('head_elements', '<link rel="stylesheet" type="text/css" href="plugins/'.basename(dirname($this->filename))."/".basename($this->filename).'">'); 91 } 109 GPCCss::applyCSSFile($this->filename); 92 110 } 111 112 93 113 } //class 94 114 -
extensions/GrumPluginClasses/classes/genericjs.class.inc.php
r5550 r5958 12 12 this classes provides base functions to add genericjs.js file into html page 13 13 14 > see genericjs.js file to know javascript functions added 14 > see genericjs.js file to know javascript functions added 15 15 16 16 - constructor genericjs() … … 29 29 global $template; 30 30 31 $name='plugins/'.basename(dirname( __FILE__)).'/genericjs.js';31 $name='plugins/'.basename(dirname(dirname(__FILE__))).'/js/genericjs.js'; 32 32 33 33 $template->append('head_elements', '<script src="'.$name.'" type="text/javascript"></script>'); -
extensions/GrumPluginClasses/main.inc.php
r5918 r5958 42 42 | | | . it_IT 43 43 | | | 44 | 3.1.0 | 2010/04/18 | * add the GPCTabSheet class 44 | 3.1.0 | 2010/04/24 | * add the GPCTabSheet class 45 | | | * update the GPCCore class 45 46 | | | * Add new languages 46 47 | | | . nl_NL
Note: See TracChangeset
for help on using the changeset viewer.