Changeset 5549 for extensions/UserStat/userstat_aim.class.inc.php
- Timestamp:
- Apr 1, 2010, 9:06:01 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserStat/userstat_aim.class.inc.php
r4270 r5549 16 16 if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } 17 17 18 include_once(PHPWG_PLUGINS_PATH.' grum_plugins_classes-2/common_plugin.class.inc.php');19 include_once(PHPWG_PLUGINS_PATH.' grum_plugins_classes-2/css.class.inc.php');18 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 19 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php'); 20 20 21 class UserStat_AIM extends common_plugin21 class UserStat_AIM extends CommonPlugin 22 22 { 23 23 protected $css = null; 24 24 25 function UserStat_AIM($prefixeTable, $filelocation)25 public function __construct($prefixeTable, $filelocation) 26 26 { 27 $this-> plugin_name="UserStat";28 $this-> plugin_name_files="userstat";27 $this->setPluginName("UserStat"); 28 $this->setPluginNameFiles("userstat"); 29 29 parent::__construct($prefixeTable, $filelocation); 30 $this->css = new css(dirname($this->filelocation).'/'.$this->plugin_name_files.".css"); 30 $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css"); 31 } 32 33 public function __destruct() 34 { 35 unset($this->css); 36 parent::__destruct(); 31 37 } 32 38 … … 34 40 initialize events call for the plugin 35 41 */ 36 function init _events()42 function initEvents() 37 43 { 38 add_event_handler('get_admin_plugin_menu_links', array(&$this, 'plugin _admin_menu') );44 add_event_handler('get_admin_plugin_menu_links', array(&$this, 'pluginAdminMenu') ); 39 45 } 40 46 … … 43 49 initialization of config properties 44 50 */ 45 function init _config()51 function initConfig() 46 52 { 47 $this-> my_config=array(53 $this->config=array( 48 54 'UserStat_MouseOverColor' => '303030', 49 55 /*'AStat_BarColor_Pages' => '6666ff', … … 69 75 70 76 /* 71 surchage of common_plugin->save_config function77 surchage of CommonPlugin->saveConfig function 72 78 */ 73 function load _config()79 function loadConfig() 74 80 { 75 parent::load _config();76 if(!$this->css-> css_file_exists())81 parent::loadConfig(); 82 if(!$this->css->fileExists()) 77 83 { 78 $this->css->make _CSS($this->generate_CSS());84 $this->css->makeCSS($this->generate_CSS()); 79 85 } 80 86 } 81 87 82 88 /* 83 surchage of common_plugin->save_config function89 surchage of CommonPlugin->saveConfig function 84 90 */ 85 function save _config()91 function saveConfig() 86 92 { 87 if(parent::save _config())93 if(parent::saveConfig()) 88 94 { 89 $this->css->make _CSS($this->generate_CSS());95 $this->css->makeCSS($this->generate_CSS()); 90 96 return(true); 91 97 } … … 99 105 { 100 106 $text = " 101 .StatTableRow:hover { background-color:#".$this-> my_config['UserStat_MouseOverColor']."; }107 .StatTableRow:hover { background-color:#".$this->config['UserStat_MouseOverColor']."; } 102 108 .formtable, .formtable P { text-align:left; display:block; } 103 109 .formtable tr { vertical-align:top; }
Note: See TracChangeset
for help on using the changeset viewer.