modifying asset uploading
When creating page dyanmically, i have few asset fields. However these assets are untracked. I am planning to build a table to track assets related to each pages, so when i am backing up pages, i am able to back up the associated assets too, which class can i modify to handle this kind of request.
Comments
http://docs.getfuelcms.com/modules/simple#overwrites
Then you can leverage a model hook like on_before_save to do any further processing. If you do, use a hook and have extended the model, be sure to call parent::on_before_save() in your on_before_save method as well.
1) i upload the asset by clicking upload button beside asset fields
2) the asset fields is populated
i then use on_before_save to save the asset fields to an asset table?
However, there is also an upload button when click the image icon on markitup textfield. how to handle this part?
Additionally, there are "module hooks" which operate outside of the model and act like normal CI hooks. I just added this in the develop branch to the assets module (that module didn't have them implemented for the creation process since it dealt with the file system and not the database).
http://docs.getfuelcms.com/modules/hooks
$hook['before_create_assets'] = array( 'class' => 'Test_hooks', 'function' => 'before_create_assets', 'filename' => 'Test_hooks.php', 'filepath' => 'hooks', 'params' => array(), 'module' => 'app');