MoreGallery MoreGallery 1.x Plugin Events
As of MoreGallery 1.3.0 you can hook into various parts of the system using Plugin Events.
The available plugin events in MoreGallery are:
- MoreGallery_OnImageCreate (
$id,$object,$mode,$resource): fired when a new image is added to a gallery.$modecan bemgImage::MODE_UPLOADormgImage::MODE_IMPORT,$objectis the mgImage object and$resourceis the mgResource object. - MoreGallery_OnImageRemove (
$id,$object): fired when an image is removed from the gallery. Look at$object->get('resource')if you need the resource id. - MoreGallery_OnTagCreate (
$id,$tag,$object): fired when a new tag object has been created. This only happens the first time a particular tag is entered. If you need to know when any tag was added to a specific image, use the MoreGallery_OnImageTagCreate event instead. - MoreGallery_OnImageTagCreate (
$id,$tag,$object): fired when any tag is added to an image. The$tagvariable contains amgTagobject ($tag->get('display')contains the actual tag), and$objectis themgImageTagrelational object. - MoreGallery_OnImageTagRemove (
$id,$object): fired when a tag is removed from an image.