コード例 #1
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 public function __construct()
 {
     parent::__construct();
     // --------------------------------------------
     //  Default CP Variables
     // --------------------------------------------
     if (REQ == 'CP') {
         // For 2.0, we have '&D=cp' with BASE and
         //	we want pure characters, so we convert it
         $this->base = str_replace('&', '&', $this->get_cp_url_base()) . '&C=addons_modules&M=show_module_cp&module=' . $this->lower_name;
         $this->cached_vars['page_crumb'] = '';
         $this->cached_vars['page_title'] = '';
         $this->cached_vars['base_uri'] = $this->base;
         $this->cached_vars['module_menu'] = array();
         $this->cached_vars['module_menu_highlight'] = 'module_home';
         $this->cached_vars['module_version'] = $this->version;
         // --------------------------------------------
         //  Default Crumbs for Module
         // --------------------------------------------
         if (function_exists('lang')) {
             $this->add_crumb(lang($this->lower_name . '_module_name'), $this->base);
         }
     }
     // --------------------------------------------
     //  Module Installed and Up to Date?
     // --------------------------------------------
     if (REQ == 'PAGE' and constant(strtoupper($this->lower_name) . '_VERSION') !== NULL and ($this->database_version() == FALSE or $this->version_compare($this->database_version(), '<', constant(strtoupper($this->lower_name) . '_VERSION')))) {
         $this->disabled = TRUE;
         if (empty($this->cache['disabled_message']) and !empty(ee()->lang->language[$this->lower_name . '_module_disabled'])) {
             trigger_error(lang($this->lower_name . '_module_disabled'), E_USER_NOTICE);
             $this->cache['disabled_message'] = TRUE;
         }
     }
 }
コード例 #2
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 function Extension_builder_calendar($name = '')
 {
     parent::Addon_builder_calendar($name);
     // --------------------------------------------
     //  Set Required Extension Variables
     // --------------------------------------------
     //we do not want this firing unless these two are not set
     //this should only be true in CI 1.7, because in 2.0 it
     //fires before EE session exists.
     if (!isset($this->EE->lang) and !is_object($this->EE->lang)) {
         $this->fetch_language_file($this->lower_name);
     }
     $this->name = $this->line($this->lower_name . '_label');
     $this->description = $this->line($this->lower_name . '_description');
     if (defined(strtoupper($this->lower_name) . '_VERSION') and defined(strtoupper($this->lower_name) . '_DOCS_URL')) {
         $this->version = constant(strtoupper($this->lower_name) . '_VERSION');
         $this->docs_url = constant(strtoupper($this->lower_name) . '_DOCS_URL');
     }
     /** --------------------------------------------
     		/**  Extension Table Defaults
     		/** --------------------------------------------*/
     $this->extension_defaults = array('class' => $this->extension_name, 'settings' => '', 'priority' => 10, 'version' => $this->version, 'enabled' => 'y');
     /** --------------------------------------------
     		/**  Default CP Variables
     		/** --------------------------------------------*/
     if (REQ == 'CP') {
         //BASE is not set until AFTER sessions_end, and we don't want to clobber it.
         $base_const = defined('BASE') ? BASE : SELF . '?S=0';
         //2.x adds an extra param for base
         if (!(APP_VER < 2.0)) {
             $base_const .= '&amp;D=cp';
         }
         // For 2.0, we have '&amp;D=cp' with BASE and we want pure characters, so we convert it
         $this->base = APP_VER < 2.0 ? $base_const . '&C=admin&M=utilities&P=extension_settings&name=' . $this->lower_name : str_replace('&amp;', '&', $base_const) . '&C=addons_extensions&M=extension_settings&file=' . $this->lower_name;
         $this->cached_vars['page_crumb'] = '';
         $this->cached_vars['page_title'] = '';
         $this->cached_vars['base_uri'] = $this->base;
         $this->cached_vars['onload_events'] = '';
         $this->cached_vars['extension_menu'] = array();
         $this->cached_vars['extension_menu_highlight'] = '';
         /** --------------------------------------------
         			/**  Default Crumbs for Module
         			/** --------------------------------------------*/
         if (APP_VER < 2.0) {
             $this->add_crumb($this->EE->config->item('site_name'), $base_const);
             $this->add_crumb(ee()->lang->line('admin'), $base_const . AMP . 'C=admin');
             $this->add_crumb(ee()->lang->line('utilities'), $base_const . AMP . 'C=admin' . AMP . 'area=utilities');
             $this->add_crumb(ee()->lang->line('extensions_manager'), $base_const . AMP . 'C=admin' . AMP . 'M=utilities' . AMP . 'P=extensions_manager');
         }
         $this->add_crumb($this->EE->lang->line($this->lower_name . '_label'), $this->cached_vars['base_uri']);
     }
 }
コード例 #3
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 public function __construct()
 {
     parent::Addon_builder_calendar('calendar');
     // -------------------------------------
     //	Module Installed and What Version?
     // -------------------------------------
     if ($this->database_version() == FALSE or $this->version_compare($this->database_version(), '<', CALENDAR_VERSION)) {
         return;
     }
     if (!defined('CALENDAR_EVENTS_CHANNEL_NAME_DEFAULT')) {
         require_once 'constants.calendar.php';
     }
     $this->default_event_weblog_name = CALENDAR_EVENTS_CHANNEL_NAME_DEFAULT;
     $this->default_calendar_weblog_name = CALENDAR_CALENDARS_CHANNEL_NAME_DEFAULT;
 }
コード例 #4
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 function __construct()
 {
     parent::__construct();
     // --------------------------------------------
     //  Set Required Extension Variables
     // --------------------------------------------
     //lang loader not loaded?
     if (!isset(ee()->lang) and !is_object(ee()->lang)) {
         $this->fetch_language_file($this->lower_name);
     }
     $this->name = $this->line($this->lower_name . '_label');
     $this->description = $this->line($this->lower_name . '_description');
     // -------------------------------------
     //	module backups
     // -------------------------------------
     if ($this->name == $this->lower_name . '_label') {
         $this->name = $this->line($this->lower_name . '_module_name');
     }
     if ($this->name == $this->lower_name . '_description') {
         $this->description = $this->line($this->lower_name . '_module_description');
     }
     // --------------------------------------------
     //  Extension Table Defaults
     // --------------------------------------------
     $this->extension_defaults = array('class' => $this->extension_name, 'settings' => '', 'priority' => 10, 'version' => $this->version, 'enabled' => 'y');
     // --------------------------------------------
     //  Default CP Variables
     // --------------------------------------------
     if (REQ == 'CP') {
         // For 2.0, we have '&amp;D=cp' with BASE and
         // we want pure characters, so we convert it
         $this->base = str_replace('&amp;', '&', $this->get_cp_url_base()) . '&C=addons_extensions&M=extension_settings&file=' . $this->lower_name;
         $this->cached_vars['page_crumb'] = '';
         $this->cached_vars['page_title'] = '';
         $this->cached_vars['base_uri'] = $this->base;
         $this->cached_vars['extension_menu'] = array();
         $this->cached_vars['extension_menu_highlight'] = '';
         //install wizard doesn't load lang shortcut
         if (function_exists('lang')) {
             $this->add_crumb(lang($this->lower_name . '_label'), $this->cached_vars['base_uri']);
         }
     }
 }
コード例 #5
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 public function Module_builder_calendar($name = '')
 {
     parent::Addon_builder_calendar($name);
     // --------------------------------------------
     //  Default CP Variables
     // --------------------------------------------
     if (REQ == 'CP') {
         //BASE is not set until AFTER sessions_end, and we don't want to clobber it.
         $base_const = defined('BASE') ? BASE : SELF . '?S=0';
         //2.x adds an extra param for base
         if (!(APP_VER < 2.0) && substr($base_const, -4) != 'D=cp') {
             $base_const .= '&amp;D=cp';
         }
         // For 2.0, we have '&amp;D=cp' with BASE and
         //	we want pure characters, so we convert it
         $this->base = APP_VER < 2.0 ? $base_const . '&C=modules&M=' . $this->lower_name : str_replace('&amp;', '&', $base_const) . '&C=addons_modules&M=show_module_cp&module=' . $this->lower_name;
         $this->cached_vars['page_crumb'] = '';
         $this->cached_vars['page_title'] = '';
         $this->cached_vars['base_uri'] = $this->base;
         $this->cached_vars['onload_events'] = '';
         $this->cached_vars['module_menu'] = array();
         $this->cached_vars['module_menu_highlight'] = 'module_home';
         $this->cached_vars['module_version'] = $this->version;
         // --------------------------------------------
         //  Default Crumbs for Module
         // --------------------------------------------
         if (APP_VER < 2.0) {
             $this->add_crumb(ee()->config->item('site_name'), $base_const);
             $this->add_crumb(ee()->lang->line('modules'), $base_const . AMP . 'C=modules');
         }
         $this->add_crumb(ee()->lang->line($this->lower_name . '_module_name'), $this->base);
     }
     // --------------------------------------------
     //  Module Installed and Up to Date?
     // --------------------------------------------
     if (REQ == 'PAGE' and constant(strtoupper($this->lower_name) . '_VERSION') !== NULL and ($this->database_version() == FALSE or $this->version_compare($this->database_version(), '<', constant(strtoupper($this->lower_name) . '_VERSION')))) {
         $this->disabled = TRUE;
         if (empty($this->cache['disabled_message']) and !empty(ee()->lang->language[$this->lower_name . '_module_disabled'])) {
             trigger_error(ee()->lang->line($this->lower_name . '_module_disabled'), E_USER_NOTICE);
             $this->cache['disabled_message'] = TRUE;
         }
     }
 }
コード例 #6
0
 /**
  * __construct
  *
  * @access	public
  * @return	object
  */
 public function __construct()
 {
     parent::__construct('calendar');
     $this->prefs = $this->get_permissions_preferences();
     $this->cal_prefs = $this->data->get_module_preferences();
 }
コード例 #7
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 public function __construct()
 {
     parent::Addon_builder_calendar('calendar');
     $this->actions();
     $this->fetch_dynamic_parameters();
 }
コード例 #8
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 public function __construct()
 {
     parent::__construct();
     $this->actions();
     $this->fetch_dynamic_parameters();
 }