edited February 2016 in Share
Hi im probably being slightly thick but is there a way of adding the config settings to include other fuel application config files i.e My_config


  • Yes, create your file in the config directory and then add to the autoload.php config file.
  • edited 3:25AM
    Cool thank you
  • edited 3:25AM
    Ive added My_config to autoload file but i still cant see any of the settings in the setting link in fuel
  • edited 3:25AM
    Any chance of an example i want to get other configs from the different config files in fuel/applications/config and add them to the settings in the cms especially the profiler so i can turn it on and off when ever i need it
  • edited 3:25AM
    An example can be found on the Search module at the bottom and you basically just need a:$config[{$module}]['settings'] = array(); // <-- Form_builder array syntax for form fields
    $config['search']['settings'] = array(); $config['search']['settings']['user_agent'] = array(); $config['search']['settings']['delimiters'] = array('default' => '<div id="main">'); $config['search']['settings']['query_type'] = array('type' => 'select', 'options' => array('match' => 'match', 'match boolean' => 'match boolean', 'like' => 'like'));
  • edited 3:25AM
    i get that and have no problem with the above but what i want to do is add configs from fuel application config folder i already have $config['setting'] in MY_fuel.php but i also want to add some of the configs in MY_config.php but i cant seem to get these configs to load in the settings in fuel if i can do this it would be great ive added then to the autoload file as well
  • edited 3:25AM
    Settings need to be associated with an advanced module. You can try adding them to the MY_fuel.php file (note the example at the bottom of that file).
  • edited 3:25AM
    i would like to put $config['enable_profiler'] in the settings for fuel but it is in the My_config.php file and i can seem to get them into the settings any ideas or suggestions
  • edited 3:25AM
    The following would give you a checkbox to enable it.
    $config['settings']['enable_profiler'] = array('type' => 'checkbox', 'value' => 1);
    However, there are other issues due to the fact that it is tied to the Fuel_hook::post_controller hook and it looks like it could use a change:
    public function post_controller() { $CI =& get_instance(); $enable = $CI->config->item('enable_profiler') OR $CI->fuel->config('enable_profiler'); $CI->output->enable_profiler($enable); }
    I've pushed that change to the develop branch:
  • edited 3:25AM
    Absolutely brilliant it works great think this will be very useful for everyone :) Thank you
Sign In or Register to comment.