> ------------------------------------------------------------------------------ this class provides base functions to manage an integration into main index page the class use plugin MenuBarManager function if installed - constructor public_integration($section) - (public) function init_events() - (public) function set_callback_page_function($value) - (private) function init_section() - (private) function call_page() use init_events() function to initialize needed triggers for updating menubar the "callback_page_function" is called everytime a specific page is displayed ----------------------------------------------------------------------------- */ class public_integration { var $section; //section applied to the page viewed var $callback_page_function; //called function to display page function public_integration($section) { $this->section=$section; $this->callback_page_function=''; } //initialize events to manage menu & page integration function init_events() { add_event_handler('loc_end_section_init', array(&$this, 'init_section')); add_event_handler('loc_end_index', array(&$this, 'call_page')); } function set_callback_page_function($value) { $this->callback_page_function=$value; } /* init section */ function init_section() { global $tokens, $page; if ($tokens[0] == $this->section) { $page['section'] = $this->section; } } /* loads a page */ function call_page() { global $page, $user; if($page['section'] == $this->section) { @call_user_func($this->callback_page_function); } } } //class public_integration ?>