示例#1
0
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 function Module_builder_bridge($name = '')
 {
     global $LANG, $PREFS, $DB;
     parent::Addon_builder_bridge($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)) {
             $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'] = '';
         /** --------------------------------------------
         			/**  Default Crumbs for Module
         			/** --------------------------------------------*/
         if (APP_VER < 2.0) {
             $this->add_crumb($this->EE->config->item('site_name'), $base_const);
             $this->add_crumb($this->EE->lang->line('modules'), $base_const . AMP . 'C=modules');
         }
         $this->add_crumb($this->EE->lang->line($this->lower_name . '_module_name'), $this->cached_vars['base_uri']);
     }
 }
示例#2
0
	/**
	 * Constructor
	 
	 * @access	public
	 * @return	null
	 */
    
	function Freeform_actions()
    {	
    	parent::Addon_builder_bridge('freeform');
    	
    	/** -------------------------------------
		/**  Module Installed and What Version?
		/** -------------------------------------*/
			
		if ($this->database_version() == FALSE OR $this->version_compare($this->database_version(), '<', FREEFORM_VERSION))
		{
			return;
		}
	}
 /**
  * Constructor
  *
  * @access	public
  * @return	null
  */
 function Extension_builder_bridge($name = '')
 {
     parent::Addon_builder_bridge($name);
     /** --------------------------------------------
         /**  Set Required Extension Variables
         /** --------------------------------------------*/
     $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') && 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');
     }
     /** --------------------------------------------
     		/**  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']);
     }
 }