global_error = Error::Singleton(); $this->plugin_name = $plugin_name; $this->plugin_base = "./plugins/" . $this->plugin_name . "/"; $this->checkfiles(); $this->getconfig(); } else { $this->global_error->addError("__construct()", "Parent constructor called without Plugin-Name!"); } } private function getconfig() { $filename = $this->plugin_base . $this->plugin_name . ".ini"; if (file_exists($filename)) { $this->plugin_config = parse_ini_file($filename, true); } } private function checkfiles() { if (!file_exists($this->plugin_base . "js/" . $this->plugin_name . ".js")) { $this->global_error->addError("file_exists(" . $this->plugin_base . "js/" . $this->plugin_name . ".js)", "JS-File for Plugin '" . $this->plugin_name . "' is missing!"); } if (!file_exists($this->plugin_base . "lang/en.xml")) { $this->global_error->addError("file_exists(" . $this->plugin_base . "lang/en.xml)", "At least an english translation must exist for the plugin!"); } } } ?>