'load_language_on_setup', 'core.page_header' => 'add_page_header_link', 'overall_header_stylesheets_after' => 'add_page_header_link', 'core.viewonline_overwrite_location' => 'viewonline_location', ); } /** * Constructor */ public function __construct(\phpbb\template\template $template, \phpbb\user $user, $phpbb_root_path) { $this->template = $template; $this->user = $user; $this->phpbb_root_path = $phpbb_root_path; } public function load_language_on_setup($event) { $lang_set_ext = $event['lang_set_ext']; $lang_set_ext[] = array( 'ext_name' => 'sheer/knowlegebase', 'lang_set' => 'knowlegebase_lng', ); $event['lang_set_ext'] = $lang_set_ext; } public function add_page_header_link($event) { $this->template->assign_vars(array( 'U_LIBRARY' => append_sid("{$this->phpbb_root_path}knowlegebase"), 'KB_THEME_PATH' => append_sid("{$this->phpbb_root_path}ext/sheer/knowlegebase/styles/" . rawurlencode($this->user->style['style_path']) . "/theme"), )); } public function viewonline_location($event) { $on_page = $event['row']; if ($on_page['session_page'] == 'app.php/knowlegebase') { $event['location'] = $this->user->lang['LIBRARY']; $event['location_url'] = append_sid("{$this->phpbb_root_path}knowlegebase"); } } }