Ejemplo n.º 1
0
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  * Also will set the values in the parameters array as properties of this object
  *
  * @access	public
  * @param	array	Array of initalization parameters  (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
     $this->normalize_files_array();
     $this->dir_filetypes = $this->CI->fuel->config('editable_asset_filetypes');
     $this->_dirs = list_directories($this->CI->asset->assets_server_path(), $this->CI->fuel->config('assets_excluded_dirs'), FALSE, TRUE);
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  *
  * The constructor can be passed an array of config values.
  */
 public function __construct($params = array())
 {
     parent::__construct();
     if (empty($params)) {
         $params['name'] = 'posts';
     }
     $this->initialize($params);
 }
Ejemplo n.º 3
0
 public function initialize($params)
 {
     parent::initialize($params);
     if (empty($this->location)) {
         $this->location = uri_path();
     }
     $default_home = $this->fuel->config('default_home_view');
     if (empty($this->location) or $this->location == 'page_router') {
         $this->location = $default_home;
     }
 }
Ejemplo n.º 4
0
 public function initialize($params = array())
 {
     parent::initialize($params);
     if (empty($this->location)) {
         $this->location = uri_path();
     }
     $default_home = $this->fuel->config('default_home_view');
     if (empty($this->location) or $this->location == $this->CI->router->routes['404_override']) {
         $this->location = $default_home;
     }
 }
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  *
  * @access	public
  * @param	array	Array of initalization parameters  (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
     // need this here instead of the constructor, because this gets executed by
     // the parent Fuel_base_library before the rest of the constructor'
     if ($this->has_lang()) {
         $lang = defined('FUEL_ADMIN') ? $this->fuel->auth->user_lang() : NULL;
         $this->load_language($this->name, $lang);
     }
     $this->load_config();
 }
Ejemplo n.º 6
0
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  *
  * @access	public
  * @param	array	Array of initalization parameters  (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
     // set the cache path to the configs cache path if left empty
     if (empty($this->cache_path)) {
         $this->set_cache_path($this->CI->config->item('cache_path'));
     }
     // set the compile templates path
     if (empty($this->compiled_path)) {
         $this->set_compiled_path($this->fuel->parser->get_compiled_dir());
     }
 }
Ejemplo n.º 7
0
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  *
  * @access	public
  * @param	array	Array of initalization parameters  (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
     // set the cache path to the configs cache path if left empty
     if (empty($this->cache_path)) {
         $this->set_cache_path($this->CI->config->item('cache_path'));
     }
     // set the compile templates path
     if (empty($this->compiled_path)) {
         include APPPATH . 'config/parser.php';
         $this->set_compiled_path($config['parser_compile_dir']);
     }
 }
Ejemplo n.º 8
0
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  *
  * @access	public
  * @param	array	Array of initalization parameters  (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     // first set the default to the values in the FUEL config
     $_fuel_config = array('query_str_param', 'cookie_name', 'cookie_exp', 'use_cookies', 'detect_user_agent', 'default_option', 'domains');
     foreach ($_fuel_config as $p) {
         $config = $this->fuel->config('language_' . $p);
         if (!is_null($config)) {
             $this->{$p} = $config;
         }
     }
     parent::initialize($params);
     $this->options = $this->fuel->config('languages');
     $this->selected = $this->CI->config->item('language');
 }
Ejemplo n.º 9
0
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  *
  * @access	public
  * @param	array	Array of initalization parameters  (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
 }
 public function __construct()
 {
     parent::__construct();
     $this->_config = $this->fuel->forms->config('stopforumspam');
 }
Ejemplo n.º 11
0
 /**
  * Constructor
  *
  * Accepts an associative array as input, containing preferences (optional)
  *
  * @access	public
  * @param	array	config preferences
  * @return	void
  */
 public function __construct($params = array())
 {
     parent::__construct($params);
     $this->CI->load->helper('cookie');
 }
Ejemplo n.º 12
0
 public function __construct($params = array())
 {
     parent::__construct($params);
     // if the module name is still empty, then we will grab it from the class name
     if (empty($this->module)) {
         $this->module = substr(get_class($this), 5);
     }
 }
Ejemplo n.º 13
0
 /**
  * Constructor
  *
  * Accepts an associative array as input, containing preferences (optional)
  *
  * @access	public
  * @param	array	config preferences
  * @return	void
  */
 public function __construct($params = array())
 {
     parent::__construct();
     $this->CI->load->helper('cookie');
     // cookie check... would be nice to remove to speed things up a little bit
     if (is_fuelified()) {
         $this->_fuelified = TRUE;
         $this->only_published = FALSE;
     }
     if (!empty($params)) {
         $this->initialize($params);
     }
 }
Ejemplo n.º 14
0
 /**
  * Initialize the object and set object parameters
  *
  * Accepts an associative array as input, containing object preferences.
  *
  * @access	public
  * @param	array	Array of initalization parameters  (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
     $this->fuel->load_model('fuel_logs');
 }
Ejemplo n.º 15
0
 public function __construct($params = array())
 {
     parent::__construct($params);
     $this->fuel->load_model('fuel_settings');
 }
 /**
  * Constructor - Sets parameters
  */
 function __construct($params = array())
 {
     parent::__construct();
     $this->initialize($params);
 }
Ejemplo n.º 17
0
 /**
  * Initialize the FUEL admin object
  *
  * Accepts an associative array as input for setting properties
  *
  * @access	public
  * @param	array	Config preferences (optional)
  * @return	void
  */
 public function initialize($params = array())
 {
     parent::initialize($params);
     // now load the other languages
     $this->load_languages();
     // load assets config
     $this->CI->config->load('asset');
     // load fuel helper
     $this->CI->load->module_helper(FUEL_FOLDER, 'fuel');
     // check if the admin is even accessible... this method looks at if the admin is enabled and at any remote host or IP restrictions
     if (!$this->fuel->auth->can_access() and $this->validate) {
         show_404();
     }
     // set asset output settings
     $this->CI->asset->assets_output = $this->fuel->config('fuel_assets_output');
     if ($this->validate) {
         $this->check_login();
     }
     // set variables
     $load_vars = array('js' => array(), 'css' => $this->load_css(), 'js_controller_params' => array(), 'keyboard_shortcuts' => $this->fuel->config('keyboard_shortcuts'), 'nav' => $this->nav(), 'modules_allowed' => $this->fuel->config('modules_allowed'), 'page_title' => $this->page_title(), 'form_action' => $this->CI->uri->uri_string());
     if ($this->validate) {
         $load_vars['user'] = $this->fuel->auth->user_data();
         $load_vars['session_key'] = $this->fuel->auth->get_session_namespace();
     }
     $this->CI->js_controller_path = js_path('', FUEL_FOLDER);
     $this->CI->load->vars($load_vars);
     $this->load_js_localized();
     // set asset paths
     $this->CI->asset->assets_folders = array('images' => 'images/', 'css' => 'css/', 'js' => 'js/', 'pdf' => 'pdf/', 'media' => 'media/', 'swf' => 'swf/', 'docs' => 'docs/');
     $this->CI->asset->assets_path = 'assets/';
     $this->main_layout = $this->fuel->config('main_layout');
     $this->set_inline($this->CI->input->get('inline'));
     // set last page
     $this->last_page = $this->fuel->auth->user_data('fuel_last_page');
     $this->init_display_modes();
 }