Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Autoload module helpers (or models,libraries etc)

edited July 2011 in Modules
Hi again,

I'm currently looking into modules and what I can do with them...

My question was, can I make a module helper(or model or library) auto load without having to edit the autoload config file. It would get bothersome to go through the config file every time you want enable/disable a module.

On a side-note. I want to make a module that can manage other modules(enable,disable,install etc)
I want to make it possible to just put a module in the fuel/modules folder and don't have to edit any other files to make it work, maybe edit something in the admin dashboard. Maybe have a install/uninstall function in the modules so they can run some sql to create/remove the tables they need etc.

After I get this done to some point, I think I would like to make a module to handle the settings in the config file(s) from the admin dashboard.

I'm still getting used to Fuel and CI and I'm not exactly sure on the right way to go about this.
Can anyone advise me on a possible solution or to point me in a right direction to start with?

Comments

  • edited 2:35PM
    You could try the following:

    1. Use a CI hook to load in your helpers, models, libraries, etc
    2. In your MY_fuel.php file, you could make a database call to get a list of enabled modules and dynamically set the $config['modules_allowed'] property and perhaps the $config['nav']['modules'] property which says which simple modules to display in the side menu (default is set to AUTO). Alternatively, you could use a CI hook to overwrite the values found in the fuel config using a database call.
    http://codeigniter.com/user_guide/general/hooks.html
Sign In or Register to comment.