/** * Constructor * * @access public * @param bool Enable calling of methods based on URI string * @return string */ public function __construct($switch = TRUE) { parent::__construct(); if ((bool) $switch === FALSE) { return; } // Install or Uninstall Request // -------------------------------------------- // Themes folder // -------------------------------------------- $this->theme_url = $this->sc->addon_theme_url; $this->cached_vars['theme_url'] = $this->theme_url; // -------------------------------------------- // Module Menu Items // -------------------------------------------- $menu = array('module_preferences' => array('name' => 'preferences', 'link' => $this->base . AMP . 'method=preferences', 'title' => lang('preferences')), 'module_diagnostics' => array('name' => 'diagnostics', 'link' => $this->base . AMP . 'method=diagnostics', 'title' => lang('diagnostics')), 'module_demo_templates' => array('link' => $this->base . '&method=code_pack', 'title' => lang('demo_templates')), 'module_documentation' => array('name' => 'documentation', 'link' => FBC_DOCS_URL, 'title' => lang('online_documentation'), 'new_window' => TRUE)); $this->cached_vars['lang_module_version'] = lang('fbc_module_version'); $this->cached_vars['module_version'] = FBC_VERSION; $this->cached_vars['module_menu_highlight'] = 'module_preferences'; $this->cached_vars['module_menu'] = $menu; // -------------------------------------------- // Sites // -------------------------------------------- $this->cached_vars['sites'] = array(); foreach ($this->data->get_sites() as $site_id => $site_label) { $this->cached_vars['sites'][$site_id] = $site_label; } }
/** * Contructor * * @access public * @return null */ function __construct() { parent::__construct(); // -------------------------------------------- // Module Actions // -------------------------------------------- $this->module_actions = explode('|', FBC_ACTIONS); // -------------------------------------------- // Extension Hooks // -------------------------------------------- $this->default_settings = array(); $default = array('class' => $this->extension_name, 'settings' => '', 'priority' => 10, 'version' => FBC_VERSION, 'enabled' => 'y'); $this->hooks = array('insert_comment_end' => array_merge($default, array('method' => 'insert_comment_end', 'hook' => 'insert_comment_end')), 'insert_rating_end' => array_merge($default, array('method' => 'insert_rating_end', 'hook' => 'insert_rating_end')), 'status_update' => array_merge($default, array('method' => 'status_update', 'hook' => 'friends_status_update_status'))); // -------------------------------------------- // Theme URL // -------------------------------------------- $this->theme_url = $this->sc->addon_theme_url; }
/** * Constructor * * @access public * @return null */ public function __construct() { parent::__construct(); }