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.

image asset management via database

edited April 2016 in Share
Hi ive had an idea to have images stored in the database with relevant alt and title tags.
I currently want to be able to use the same library calls so it can be used without having to re-code loads of controllers, models. So the only way i can see to do this is by extending the following classes
Upload, Asset, Formbuilder could you please advice on any classes i may of missed or is there a better way to do this. I also need to be able to store and view the images in the control panel with the alt tags and tiles being editable.

Comments

  • edited 7:02PM
    Most of that work happens here:
    fuel/controllers/assets.php (could change the route for this to be your own controller)
    fuel/libraries/Fuel_assets.php (could create your own class and use FUEL()->attach('assets', $my_asset_obj_instance);
    fuel/models/fuel_assets_model.php (you could use module_overwrites to point to a different model entirely http://docs.getfuelcms.com/modules/simple#overwrites)
  • edited 7:02PM
    OK cheers will investigate more
  • edited 7:02PM
    Could all the above be done in a seperate module and how do i change the route for fuel/controllers/assets.php to be my own controller
  • edited 7:02PM
    You could definitely create your own advanced module. In your advanced module, you can create a fuel/{module}/config/{module}_routes.php file that has the routes you want including one that can overwrite the fuel/controller/assets route (advanced module routes get loaded before the fuel routes in the fuel/modules/fuel/config/fuel_routes.php file)
Sign In or Register to comment.