Extending framework

jerryh

Joined: 2013-02-04
Posts: 27
Posted: Thu, 2013-02-07 22:11

Need a little direction on extending ItemAddOption.
Earlier I was asking about doing some post processing after we upload an item.

So if we are just doing some post processing, do I need to imlpement loadTemplate function?
> it would need to include methods handleRequestAfterAdd, loadTemplate and isAppropriate
@see /modules/core/ItemAdd.inc -> ItemAddOption

If I were to implement, it would just to display message or is this mostly for capturing form.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2013-02-07 22:36

loadTemplate is for adding your fields/options to the upload form
handleRequestAfterAdd processes the post from the form - so you would then store your customfields for each item uplaoded. @see CustomFieldItemEdit.inc -> handleRequest

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
jerryh

Joined: 2013-02-04
Posts: 27
Posted: Thu, 2013-02-07 22:45

OK.
We are doing this programmatically so we are given file and we are uploading files.
As we are adding items, we want to do post processing(ie add custom field values) to photos or albums

That's why I was asking if we really needed it...