Disclaimer: I am not one of the Gallery 3 developers. I have written a couple of modules and have made one of them (emboss) available as a 3rd party Gallery 3 contribution. The following is simply what I have been able to weasel out of the code by reading through it. If you find anything that is incorrect, PLEASE feel free to either make the corrections yourself or contact me and I will make the changes.
The Gallery3 Modules page provides a list of all nearly all of the event hooks defined by Gallery 3, but does not provide any details about what triggers these hooks or the arguments provided to the hooks. The following is an attempt to tackle this omission. I have attempted to group the events in a somewhat logical order... but they don't necessarily fit cleanly into any categorization. If you have a suggestion for a better way of laying them out, please feel free to let me know.
Each of the following hook description follows a similar (exact?) pattern, showing when the hook is triggered, what arguments are sent to the handler function, an example stack trace (or two), and a list of the modules that I could find that currently implement a handler for the hook.
Note that the stack traces are not necessarily the only scenarios; they are simply those that I could find by walking backward through the code. Note too that the location of the handler is well-defined for any given module (i.e. module/example/helpers/example_events.php) and thus are not spelled out for each hook.
Finally, I am not as comfortable with writing themes as I am with writing modules (not that I'm terribly proficient there either). I suspect the
stack trace often begins within a theme implementation. When I could figure this out, I identified it. When I could not, I began the stack trace up as far as I could crawl backward through the php code.
- During population of the content of the Admin menu
- $menu
- Menu object representing the admin menu
- $theme
- Theme_View object
- (site_menu event hook)
- └─gallery_event_Core::site_menu($menu,$theme,$item_css_selector)
- └─module::event("admin_menu",$admin_menu,$theme)
- or
- Admin_View_Core::admin_menu()
- └─module::event("admin_menu",$menu,$this)
- akismet
- comment
- digibug
- fancybox
- g2_import
- gallery
- recaptcha
- server_add
- tag
- thumbnav
- user
- watermark
- During population of the content of the "Album options" menu
- $menu
- Menu object representing the album menu
- $theme
- Theme_View object'
- (theme view (sidebar).html.php)
- └─Album_View_Core::album_menu()
- └─module::event("album_menu",$menu,$this)
- slideshow
- During population of the content of the context menu
- $menu
- Menu object representing the context menu
- $theme
- Theme_View object
- $item
- Item object representing the object to which the context menu applies
- $css_selector
- The css selector associated with the thumb style (nominally .g-thumbnail)
- (theme view (album).html.php
- └─Theme_View_Core::context_menu($item, $thumbnail_css_selector)
- └─module::event("context_menu", $menu, $this, $item, $thumbnail_css_selector)
- digibug
- gallery
- organize
- During population of the content of the "movie options" menu
- $menu
- Menu object representing the movie menu
- $theme
- Theme_View object'
- (theme view (sidebar).html.php)
- └─movie_View_Core::movie_menu()
- └─module::event("movie_menu",$menu,$this)
- none
- During population of the content of the "photo options" menu
- $menu
- Menu object representing the photo menu
- $theme
- Theme_View object'
- (theme view (sidebar).html.php)
- └─photo_View_Core::photo_menu()
- └─module::event("photo_menu",$menu,$this)
- comment
- slideshow
- During population of the content of the site menu
- $menu
- Menu object representing the site menu
- $theme
- Theme_View object
- $css_selector
- The css selector associated with the menu
- (theme view ( ).html.php)
- └─Theme_View_Core::album_menu()
- └─module::event("site_menu",$menu,$this)
- digibug
- gallery
- keeporiginal
- notification
- organize
- server_add
- During population of the content of a tag menu
- $menu
- Menu object representing the tag menu
- $theme
- Theme_View object
- $css_selector
- The css selector associated with the menu
- (theme view ( ).html.php)
- └─Theme_View_Core::tag_menu()
- └─module::event("tag_menu",$menu,$this)
- slideshow
- During population of the content of the user menu
- $menu
- Menu object representing the user menu
- $theme
- Theme_View object
- (theme view (page|admin).html.php)
- └─Theme_View_Core::user_menu()
- └─module::event("user_menu",$menu,$this)
- gallery
Form Population Events
Most of the events in this section follow a common pattern. In particular, they come in pairs: one event (xxx_form) is sent while the form is being constructed (after all of the nominal fields have been added), and the other (xxx_form_completed) is sent after the nominal action driven by the form has completed. Note that the completed event is only sent if the form has been successfully validated.
add_photos_form
- User (with administrative privileges) selects "Add photos" from the "Add" menu.
- $album
- Item_Model object populated with information about the album into which the photo will be added
- $form
- Forge object populated with the uploadify.html and uploadify_buttons.html views
- Uploader_Controller::add_photos($id)
- └─Uploader_Controller::_get_add_form($album)
- └─module::event("add_photos_form",$album,$form)
- tag
add_photos_form_completed
- After a photo has been successfully loaded in response to a user (with administrative privileges) selecting "Add photos" from the "Add" menu.
- $item
- Item_Model object populated with information about the photo which was just added
- $form
- Forge object populated with the uploadify.html and uploadify_buttons.html views
- Uploader_Controller::add_photos($id)
- └─module::event("add_photos_form_completed",$item,$form)
- tag
album_add_form
- User (with administrative privileges) selects "Add an album" from the "add" menu
- $parent
- Item_Model object populated with information about the album into which the new album will be added
- $form
- Forge object populated within album_Core::get_add_form
- Albums_Controller::create($parent_id)
- └─album_Core::get_add_form($album)
- └─module::event("album_add_form",$parent,$form)
- or
- Albums_Controller::form_add($album_id)
- └─album_Core::get_add_form($album)
- └─module::event("album_add_form",$parent,$form)
- none
album_add_form_completed
- After a new album has been successfully created in response to a user (with administrative privileges) selecting "Add an album" from the "add" menu.
- $album
- Item_Model object populated with information about the album which was just added
- $form
- Forge object populated within album_Core::get_add_form
- Albums_Controller::create($parent_id)
- └─module::event("album_add_form_completed",$album,$form)
- none
- User initiates a new comment by clicking on the "Add a Comment" button
- This event does not have the paired comment_add_form_completed event
- This event will be immediately followed with a captcha_protect_form event
- $form
- Forge object populated within comment_Core::get_add_form
- Comments_Controller::create($id)
- └─comment_Core::get_add_form($album)
- └─module::event("comment_add_form",$form)
- none
captcha_protect_form
- During construction of an "add comment" form in response to a user hitting the "Add a comment" button, prior to displaying the form.
- During construction of a "contact" form in response to a user attempting to contact another user via their profile.
- This event does not have the paired captha_protect_form_completed event
- This event will be sent immediately following the associated add_comment_form or user_profile_contact_form event
- $form
- Forge instance being constructed
- user_profile_Core::get_contact_form($user)
- └─module::event("captcha_protect_form",$form)
- or
- comment_Core::get_add_form($item)
- └─module::event("captcha_protect_form",$form)
- recaptcha
item_edit_form
- User (with administrative privileges) selects "Edit album" from the "Album options" menu or a album context menu.
- User (with administrative privileges) selects "Edit photo" from the "Photo options" menu or a photo context menu.
- User (with administrative privileges) selects "Edit movie" from the "Movie options" menu or a movie context menu.
- $item
- Item_Model object representing the album, photo, or movie item to be modified.
- $form
- Forge object populated within album_Core::get_edit_form or
- Forge object populated within photo_Core::get_edit_form or
- Forge object populated within movie_Core::get_edit_form
- Albums_Controller::update($album_id)
- └─album::get_edit_form($album)
- └─module::event("item_edit_form",$parent,$form)
- or
- Photos_Controller::update($album_id)
- └─photo::get_edit_form($album)
- └─module::event("item_edit_form",$photo,$form)
- or
- Movies_Controller::update($album_id)
- └─movie::get_edit_form($album)
- └─module::event("item_edit_form",$movie,$form)
- tag
item_edit_form_completed
- After an album has been modified in response to a user (with administrative privileges) selecting "Edit album" from the "Album options" menu or an album context menu.
- After a photo has been modified in response to a user (with administrative privileges) selecting "Edit photo" from the "Photo options" menu or a photo context menu.
- After a movie has been modified in response to a user (with administrative privileges) selecting "Edit movie" from the "Movie options" menu or a movie context menu.
- $item
- Item_Model object representing the album, photo, or movie which was just modified.
- $form
- Forge object populated within album_Core::get_edit_form or
- Forge object populated within photo_Core::get_edit_form or
- Forge object populated within movie_Core::get_edit_form
- Albums_Controller::update($album_id)
- └─module::event("item_edit_form_completed",$parent,$form)
- or
- Photos_Controller::update($album_id)
- └─module::event("item_edit_form_completed",$photo,$form)
- or
- Movies_Controller::update($album_id)
- └─module::event("item_edit_form_completed",$movie,$form)
- tag
theme_edit_form
- User (with administrative privileges) selects "Theme options" from the "Admin/Appearance" menu
- $form
- Forge object populated within Admin_Theme_Options_Controller::_get_edit_form_admin
- Admin_Theme_Options_Controller::save
- └─Admin_Theme_Options_Controller::_get_edit_form_admin()
- └─module::event("theme_edit_form",$form)
- none
theme_edit_form_completed
- After a theme has been successfully modified.
- $form
- Forge object populated within Admin_Theme_Options_Controller::_get_edit_form_admin
- Admin_Theme_Options_Controller::save
- └─module::event("theme_edit_form_completed",$form)
- none
user_add_form_admin
- User (with administrative privileges) selects "Add a new User" from the "Admin/Users & Groups" page
- $user
- ??? - this variable does not appear to be defined prior to posting the event
- $form
- Forge object populated within Admin_Users_Controller::_get_user_add_form_admin
- Admin_Users_Controller::add_user
- └─Admin_Users_Controller::_get_user_add_form_admin()
- └─module::event("user_add_form_admin",$user,$form)
- none
user_add_form_admin_completed
- After a new user has been added to the database in response to an administrative user selecting "Add a new User" on the "Admin/Users & Groups" page.
- $user
- User_Model object defining the new user
- $form
- Forge object populated within Admin_Users_Controller::_get_user_add_form_admin
- Admin_Users_Controller::add_user
- └─module::event("user_add_form_admin_completed",$user,$form)
- rest
user_change_email_form
Note that this event will be introduced when Pull #74 is introduced into the baseline
- User selects the "Change email" button on their user profile page (accessed by clicking on their login name).
- $user
- User_Model object (should represent the active user)
- $form
- Forge object populated within User_Controller::_get_change_email_form
- User_Controller::change_email($id)
- └─User_Controller::_get_change_email_form($user)
- └─module::event("user_change_email_form",$user,$form)
- none
user_change_email_form_completed
- User selects the "Change email" button on their user profile page (accessed by clicking on their login name).
- This hook is invoked after the change email form has been submitted.
- Note that if the user fails to authenticate, a user_auth_failed event will be sent instead
- $user
- User_Mode object
- $form
- Forge object populated within User_Controller::_get_change_email_form
- User_Controller::change_email($id)
- └─module::event("user_change_email_form_completed",$user,$form)
- none
user_change_password_form
- User selects the "Change password" button on their user profile page (accessed by clicking on their login name).
- $user
- User_Model object (should represent the active user)
- $form
- Forge object populated within User_Controller::_get_change_password_form
- User_Controller::change_password($id)
- └─User_Controller::_get_change_password_form($user)
- └─module::event("user_change_password_form",$user,$form)
- none
user_change_password_form_completed
- User selects the "Change password" button on their user profile page (accessed by clicking on their login name).
- This hook is invoked after the change password form has been submitted.
- Note that if the user fails to authenticate, a user_auth_failed event will be sent instead
- $user
- User_Model object
- $form
- Forge object populated within User_Controller::_get_change_password_form
- User_Controller::change_password($id)
- └─module::event("user_change_password_form_completed",$user,$form)
- none
user_edit_form
- User selects the "Edit" button on their user profile page (accessed by clicking on their login name).
- $user
- User_Model object (should represent the active user)
- $form
- Forge object populated within User_Controller::_get_edit_form
- User_Controller::update($id)
- └─User_Controller::_get_edit_form($user)
- └─module::event("user_edit_form",$user,$form)
- none
user_edit_form_completed
- User selects the "Edit" button on their user profile page (accessed by clicking on their login name).
- This hook is invoked after the change edit form has been submitted and the changes committed to the data.
- $user
- User_Model object
- $form
- Forge object populated within User_Controller::_get_edit_form
- User_Controller::update($id)
- └─module::event("user_edit_form_completed",$user,$form)
- none
user_edit_form_admin
- User (with administrative privileges) begins editting user info on the "Admin/Users & Groups" page
- $user
- User_Model object - obtained via user::lookup($id)
- $form
- Forge object populated within Admin_Users_Controller::_get_user_edit_form_admin
- Admin_Users_Controller::edit_user($id)
- └─Admin_Users_Controller::_get_user_edit_form_admin($user)
- └─module::event("user_edit_form_admin",$user,$form)
- rest
user_edit_form_admin_completed
- User (with administrative privileges) modifies user info on the "Admin/Users & Groups" page... after updating the user in the database.
- $user
- User_Model object defining the modified user
- $form
- Forge object populated within Admin_Users_Controller::_get_user_edit_form_admin
- Admin_Users_Controller::edit_user($id)
- └─module::event("user_edit_form_admin_completed",$user,$form)
- none
user_profile_contact_form
- During construction of a "contact" form in response to a user attempting to contact another user via their profile.
- This event does not have the paired user_profile_contact_form_completed event
- This event will be immediately followed with a captcha_protect_form event
- $form
- Forge object populated within user_profile_Core::get_contact_form
- User_Profile_Controller::contact($id)
- └─user_profile_Core::get_contact_form($user)
- └─module::event("user_profile_contact_form",$form)
- none
Content Modification Events
- After a new comment has been created by a user and saved to the database.
- $comment
- Comment_Model object (subclass of ORM)
- Comment_Model_Core::save()
- └─module::event("comment_created",$this)
- akismet/helpers/akismet_event
- notification/helpers/notification_event
- After an existing comment has been modified by a user and saved to the database.
- $original
- User_Model (a subclass of ORM). Note that this is a clone of the comment from prior to the save as the "real" user has now been updated in the database
- $comment
- User_Model (a subclass of ORM). This is the comment after the save.
- $comment
- Comment_Model object (subclass of ORM)
- Comment_Model_Core::save()
- └─module::event("comment_updated",$this)
- akismet
- notification
item_before_create
- Before saving a new item to the database (one that had not currently been in the database).
- $item
- Item_Model object to be saved to the database
- Item_Model_Core::save()
- └─module::event("item_before_create",$this)
- none
item_created
- After saving a new item to the database (one that had not currently been in the database).
- $item
- Item_Model object to be saved to the database. Note that the data_file attribute will have been set to null to avoid an infinite recursion.'
- Item_Model_Core::save()
- └─module::event("item_created",$this)
- exif
- g2_import
- gallery
- notification
- search
- tag
item_before_delete
- Before deleting an item from the database.
- $item
- Item_Model object to be deleted from the database
- Item_Model::delete()
- └─module::event("item_before_delete",$this)
- keeporiginal
item_deleted
- After deleting an item frim the database.
- $old
- Item_Model object representing the object that was deleted.
- Item_Model_Core::delete()
- └─module::event("item_deleted",$old)
- comment
- exif
- g2_import
- gallery
- notification
- search
- tag
item_index_data
- An album, photo, or movie item is created or updated. More specifically, when the search module event handler catches a item_created, item_updated, or item_related_update event.
- $item
- Item_Model object that was passed as an argument to one of the event handlers listed above.
- $data
- An empty ArrayObject. The event handler should add something to this array
- search_event_Core::item_created($item)
- └─search_Core::update($item)
- └─module::event("item_index_data",$item,$data)
- or
- search_event_Core::item_updated($original,$new)
- └─search_Core::update($new)
- └─module::event("item_index_data",$item,$data)
- or
- search_event_Core::item_related_update($item)
- └─search_Core::update($item)
- └─module::event("item_index_data",$item,$data)
- comment
- gallery
- tag
item_moved
- While saving an existing item to the database (one that had not currently been in the database) that has been relocated to a new album since the last save to the database; called after item_begin_update and before item_updated.
- $item
- Item_Model object to be saved to the database. Note that the data_file attribute will have been set to null to avoid an infinite recursion.
- $old_parent
- Item_Model object containing the information about the album in which the item used to be located.
- Item_Model_Core::save()
- └─module::event("item_moved",$this,$original->parent())
- gallery
- keeporiginal
item_related_update
- The tag module item_edit_form_completed event handler is invoked; called after any new tags have been added to the item to which the event applies, but before the tags are compacted.
- A new tag is added to the database
- An existing tag is deleted from the database
- $item
- Item_Model object for which the tags were modified
- tag_Core::item_edit_form_completed($item,$form)
- └─module::event("item_related_update",$item)
- search
item_before_update
- Before saving an existing item to the database (with changes).
- $item
- Item_Model object to be saved to the database
- Item_Model_Core::save()
- └─module::event("item_before_update",$this)
- none
item_updated
- After saving an existing item to the database (with changes).
- $original
- Item_Model object representing the state of the object prior to the current update.
- $item
- Item_Model object to be saved to the database.
- Item_Model_Core::save()
- └─module::event("item_updated",$original,$this)
- exif
- gallery
- keeporiginal
- notification
- search
item_updated_data_file
- After saving an existing item to the database (with changes) where the data_file attribute is not set to a null value; called after item_updated.
- $item
- Item_Model object to be saved to the database. Note that the data_file attribute will have been set to null to avoid an infinite recursion
- Item_Model_Core::save()
- └─module::event("item_updated_data_file",$this)
- none
Graphics Processing Events
graphics_composite
- Immediately prior to using the graphics package to overlay one image onto another.
- $input_file
- "Source" image file which serves as the base for the composited image
- $output_file
- "Destination" image file where the final composited image will be saved
- $options
- Array of options passed to the graphics package composite method
- $item
- Item_Model object containing information about the item being modified by the graphics package. Note that this info is not used by the graphics package. It is simply provided for use by the composite event hooks.
- gallery_graphics_Core::composite
- └─module::event("graphics_composite",$input_file,$output_file,$options,$item)
- none
graphics_composite_completed
- Immediately after using the graphics package to overlay one image onto another.
- $input_file
- "Source" image file which serves as the base for the composited image
- $output_file
- "Destination" image file where the final composited image will be saved
- $options
- Array of options passed to the graphics package composite method
- $item
- Item_Model object containing information about the item being modified by the graphics package. Note that this info is not used by the graphics package. It is simply provided for use by the composite event hooks.
- gallery_graphics_Core::composite
- └─module::event("graphics_composite",$input_file,$output_file,$options,$item)
- none
graphics_resize
- Immediately prior to using the graphics package to resize an image.
- $input_file
- "Source" image file which is to be resized
- $output_file
- "Destination" image file where the resized image will be saved
- $options
- Array of options passed to the graphics package resize method
- $item
- Item_Model object containing information about the item being resized by the graphics package. Note that this info is not used by the graphics package. It is simply provided for use by the composite event hooks.
- gallery_graphics_Core::resize
- └─module::event("graphics_resize",$input_file,$output_file,$options,$item)
- none
graphics_resize_completed
- Immediately after using the graphics package to resize an image.
- $input_file
- "Source" image file which is to be resized
- $output_file
- "Destination" image file where the resized image will be saved
- $options
- Array of options passed to the graphics package resize method
- $item
- Item_Model object containing information about the item being resized by the graphics package. Note that this info is not used by the graphics package. It is simply provided for use by the composite event hooks.
- gallery_graphics_Core::resize
- └─module::event("graphics_resize",$input_file,$output_file,$options,$item)
- none
graphics_rotate
- Immediately prior to using the graphics package to rotate an image.
- $input_file
- "Source" image file which is to be rotated
- $output_file
- "Destination" image file where the rotated image will be saved
- $options
- Array of options passed to the graphics package rotate method
- $item
- Item_Model object containing information about the item being rotated by the graphics package. Note that this info is not used by the graphics package. It is simply provided for use by the composite event hooks.
- gallery_graphics_Core::rotate
- └─module::event("graphics_rotate",$input_file,$output_file,$options,$item)
- keeporiginal
graphics_rotate_completed
- Immediately after using the graphics package to rotate an image.
- $input_file
- "Source" image file which is to be rotated
- $output_file
- "Destination" image file where the rotated image will be saved
- $options
- Array of options passed to the graphics package rotate method
- $item
- Item_Model object containing information about the item being rotated by the graphics package. Note that this info is not used by the graphics package. It is simply provided for use by the composite event hooks.
- gallery_graphics_Core::rotate
- └─module::event("graphics_rotate",$input_file,$output_file,$options,$item)
- keeporiginal
User/Group Modification Events
group_created
- User (with administrative privileges) creates a new group on the Users/Groups page... after adding the group to the database.
- $group
- Group_Model (a subclass of ORM)
- Group_Model_Core::save()
- └─module::event("group_created",$this)
- gallery
group_before_delete
- User (with administrative privileges) deletes a group on the Users/Groups page... prior to actually performing the deletion.
- $group
- Group_Model (a subclass of ORM)
- Group_Model_Core::delete($id=null)
- └─module::event("group_before_delete",$this)
- none
group_deleted
- User (with administrative privileges) deletes a group on the Users/Groups page... after performing the deletion.
- $group
- Group_Model (a subclass of ORM). Note that this is a clone of the actual group as the "real" group has now been deleted from the database
- Group_Model_Core::delete($id=null)
- └─module::event("group_deleted",$old)
- none
group_updated
- User (with administrative privileges) modifies an existing group on the Users/Groups page... after updating the group in the database.
- $original
- Group_Model (a subclass of ORM). Note that this is a clone of the group from prior to the save as the "real" group has now been updated in the database
- $group
- Group_Model (a subclass of ORM). This is the group after the save.
- Group_Model_Core::save()
- └─module::event("group_updated",$original,$this)
- none
user_created
- User (with administrative privileges) creates a new user on the Users/Groups page... after adding the user to the database.
- $user
- User_Model (a subclass of ORM)
- User_Model_Core::save()
- └─module::event("user_created",$this)
- none
user_before_delete
- User (with administrative privileges) deletes a user on the Users/Groups page... prior to actually performing the deletion.
- (It appears that the event handler cannot block the deletion. It can simply note it and take any action it needs to based on this information.)
- $user
- User_Model object (a subclass of ORM).
- Admin_Users_Controller::delete_user($id)
- └─User_Model_Core::delete($id=null)
- └─module::event("user_before_delete",$this)
- notification
user_deleted
- User (with administrative privileges) deletes a user on the Users/Groups page... after performing the deletion.
- $user
- User_Model object (a subclass of ORM). Note that this is a clone of the actual user as the "real" user has now been deleted from the database
- Admin_Users_Controller::delete_user($id)
- └─User_Model_Core::delete($id=null)
- └─module::event("user_deleted",$old)
- comment
- gallery
- notification
user_updated
- User (with administrative privileges) modifies an existing user on the Users/Users page... after updating the user in the database.
- $original
- User_Model (a subclass of ORM). Note that this is a clone of the user from prior to the save as the "real" user has now been updated in the database
- $user
- User_Model (a subclass of ORM). This is the user after the save.
- User_Model_Core::save()
- └─module::event("user_updated",$original,$this)
- gallery
show_user_profile
- User profile page is being populated
- $event_data
- stdClass with named arguments { user=>$user, content=>array() }
- http://(site)/gallery3/user_profiles/show/$id
- └─User_Profile_Controller::show($id)
- └─module::event("show_user_profile",$event_data)
- comment
- gallery
- notification
- rest
User Login/Authorization Events
user_auth
- A user has reauthenticated their login information or updated key user profile information (e.g. password or email address).
- $user
- User_Model object representing the authenticated user
- User_Controllers::change_email($id)
- └─module::event("user_auth",$user)
- or
- User_Controllers::change_password($id)
- └─module::event("user_auth",$user)
- or
- Reauthenticate_Controllers::auth()
- └─module::event("user_auth",$user)
- or
- gallery
user_auth_failed
- A user failed to authenticate their login information (e.g. wrong password). Note that either this event or user_auth will be sent during attempts to validate userid/password, but not both.
- $name
- Userid that failed to authenticate
- Login_Controllers::_auth($url)
- └─module::event("user_auth_failed",$name)
- or
- User_Controllers::change_email($id)
- └─module::event("user_auth_failed",$user)
- or
- User_Controllers::change_password($id)
- └─module::event("user_auth_failed",$user)
- or
- Reauthenticate_Controllers::auth()
- └─module::event("user_auth_failed",$user)
- or
- gallery
user_login
- A user succesfully logs into Gallery3
- $user
- User_Model object representing the user that just logged in
- Login_Controller::_auth($url)
- └─auth_Core::login($user)
- └─module::event("user_login",$user)
- or
- identity_Core::load_user
- └─auth_Core::login($user)
- └─module::event("user_login",$user)
- or
- Rest_Controller::index
- └─auth_Core::login($user)
- └─module::event("user_login",$user)
- gallery
user_login_failed
- Incorrect user/password provided when attempting to connect using REST
- $username
- string containing the login userid that failed connection
- Rest_Controller::index
- └─module::event("user_login_failed",$username)
- none
user_logout
- A user logs out from Gallery3
- $user
- user_Model object representing the user that just logged out
- Logout_Controller::index()
- └─auth_Core::logout()
- └─module::event("user_logout",$user)
- none
user_password_change
- User selects the "Change password" button on their user profile page (accessed by clicking on their login name).
- This hook is invoked after the changed password has been saved, the user_change_password_form_completed, and the user_auth event sent
- $user
- User_Model object
- abc
- └─Users_Controller::change_password($id)
- └─module::event("user_password_change",$user)
- none
Gallery Framework Events
gallery_ready
- Called when the Gallery is fully initialized
- none
- gallery_Core::ready()
- └─module::event("gallery_ready");
- none
gallery_shutdown
- Called right before the Kohana framework shuts down.
- none
- gallery_Core::shutdown
- └─module::event("gallery_shutdown")
- none
legal_movie_extensions
- A call is made to legal_file::get_movie_extensions
- $wrapper
- stdClass object with the extensions attributes initialized to a an array of "known" movie extensions
- legal_file_Core::get_movie_extensions()
- └─module::event("legal_movie_extensions",$wrapper);
- none
legal_movie_types
- A call is made to legal_file::get_movie_types
- $wrapper
- stdClass object with the extensions attributes initialized to a an array of "known" MIME movie types
- legal_file_Core::get_movie_types()
- └─module::event("legal_movie_types",$wrapper);
- none
legal_photo_extensions
- A call is made to legal_file::get_photo_extensions
- $wrapper
- stdClass object with the extensions attributes initialized to a an array of "known" photo extensions
- legal_file_Core::get_photo_extensions()
- └─module::event("legal_photo_extensions",$wrapper);
- none
legal_photo_types
- A call is made to legal_file::get_photo_types
- $wrapper
- stdClass object with the extensions attributes initialized to a an array of "known" MIME photo types
- legal_file_Core::get_photo_types()
- └─module::event("legal_photo_types",$wrapper);
- none
module_change
- User (with administrative privileges) makes a change to the list of active modules in the Admin>Modules page.
- $changes
- stdClass with two defined attributes (activate and deactivate) containing arrays of the modules to be activated or deactivated
- (Admin/Modules update button is pressed --- and a change has been made in the module list)
- └─Admin_Module_Controllers::do_save()
- └─module::event("module_change",$changes)
- slideshow
pre_deactivate
- User (with administrative privileges) clicks on the Update button in the Admin/Modules page; called for each module that has had its active state modified.
- $data
- stdClass with two named elements { module=>$module_name, messages=>array() }
- Admin_Modules_Controller::confirm()
- └─module::can_deactivate($module_name)
- └─module::event("pre_deactivate",$data)
- slideshow
Other Events
The events in this section are those that I couldn't get my head around. I found them in the code, but cold not really figure out what user action triggers them.
I would love for someone who does understand these to either fill in the details (and possibly categorize them appropriately) or contact me with the info so that I can make the updates.
before_combine
- Called from within Gallery_View_Core::get_combined before the data in the combine_queue has been processed into a single content item.
- $combine_data
- stdClass object
- └─contents = view's combine_queue[$type][$group] attribute
- (theme view (admin|page).html.php)
- └─Gallery_View_Core::get_combined($type,$group="core")
- └─after_combine($combine_data)
- none
after_combine
- Called from within Gallery_View_Core::get_combined after the data in the combine_queue has been processed into a single content item.
- $combine_data
- stdClass object
- └─contents = concatenation of the view's combine_queue[$type][$group] attribute
- (theme view (admin|page).html.php)
- └─Gallery_View_Core::get_combined($type,$group="core")
- └─after_combine($combine_data)
- none
batch_complete
- The batch_Core::stop method is while the value of the session batch_level attribute is 0
- none
- (various functions that use batch::start()/batch::stop())
- └─batch_Core::stop()
- └─module::event("batch_complete");
- gallery
- notification
- tag
identity_provider_changed
- ??? - I'm not sure what an identity provider is...
- $current_provider
- IdentityProvider - value of the identify_provider setting for gallery prior to changing the provider
- $new_provider
- IdentityProvider - value of the identify_provider setting for gallery after changing the provider
- IdentityProvider_Core::change_provider($new_provider)
- └─module::event("identity_provider_changed",$current_provider,$new_provider)
- comment
- gallery
- notification
info_block_get_metadata
- After a call has been made to the info_block_Core::get method with "metadata" as the block_id.
- This hook is invoked immediately before returning from the get method.
- $block
- Block object containing info about the current album, photo, or movie
- $item
- Item object representing the item to which the current page applies"
- info_block_Core::get("metadata",$theme);
- └─module::event("info_block_get_metadata",$block,$theme->item)
- tag