- Timestamp:
- Apr 25, 2010, 12:33:24 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.