Notifications
This is a list of all built-in notifications that Zotonic sends. Observe these notifications in your code to add custom functionality.
This is a list of all built-in notifications that Zotonic sends. Observe these notifications in your code to add custom functionality.
Validators Reference Installation requirements
Modify the list of collaboration groups of a user. Called internally by the ACL modules when fetching the list of…
Set the context to a typical authenticated user. Used by m_acl.erl
Check if a user is authorized to perform an operation on a an object (some resource or module). Observe this…
Check if a user is authorizded to perform an action on a property. Defaults to true .
Check if a user is the owner of a resource. id is the resource id.
Clear the associated access policy for the context.
Initialize context with the access policy for the user.
MQTT acl check, called via the normal acl notifications. Actions for these checks: subscribe, publish
Return the groups for the current user.
Modify the list of user groups of a user. Called internally by the ACL modules when fetching the list of user groups a…
Render the javascript for a custom action event type. The custom event type must be a tuple, for example: {% wire…
An activity in Zotonic. When this is handled as a notification then return a list of patterns matching this activity.
Push a list of activities via a ‘channel’ (eg ‘email’) to a recipient. The activities are a list of #activity{} records.
Used in the admin to fetch the possible blocks for display
Used for fetching the menu in the admin.
Used in the admin to process a submitted resource form
Fold over the context after logon of user with username, communicates valid or invalid password
Send a request to the client to login a user. The zotonic.auth.worker.js will send a request to…
Send a request to the client to switch users. The zotonic.auth.worker.js will send a request to…
Confirm a user id.
A user id has been confirmed.
Return the list of identity types that allow somebody to logon and become an active user of the system. Defaults to […
User is about to log off. Modify (if needed) the logoff request context.
User logs on. Add user-related properties to the logon request context.
Update the given (accumulator) authentication options with the request options. Note that the request options are from…
First for logon of user with username, called after successful password check.
First for logon of user with username, check for ratelimit, blocks etc.
First to check for password reset forms, return undefined, ok, or {error, Reason}.
First to validate a password. Return {ok, RscId} or {error, Reason}.
Authentication against some (external or internal) service was validated
Save (and update) the complete category hierarchy
Notification to signal an inserted comment. ‘comment_id’ is the id of the inserted comment, ‘id’ is the id of the…
Get available content types and their dispatch rules Example: {“text/html”, page} A special dispatch rule is ‘page_url’
Set CORS headers on the HTTP response.
Add custom pivot fields to a resource’s search index (map) Result is a single tuple or list of tuples {pivotname
Push some information to the debug page in the user-agent. Will be displayed with io_lib:format(“~p: ~p~n”, [What, Arg]…
Internal message of mod_development. Start a stream with debug information to the user agent. ‘target’ is the id of the…
Final try for dispatch, try to match the request. Called when the site is known, but no match is found for the path
Try to find the site for the request Called when the request Host doesn’t match any active site.
Rewrite a URL before it will be dispatched using the z_sites_dispatcher
Handle a new file received in the ‘files/dropbox’ folder of a site. Unhandled files are deleted after a hour.
An edge has been deleted Note that the Context for this notification does not have the user who deleted the edge.
An edge has been inserted. Note that the Context for this notification does not have the user who created the edge.
An edge has been updated Note that the Context for this notification does not have the user who updated the edge.
Add a handler for receiving e-mail notifications
Bounced e-mail notification. The recipient is the e-mail that is bouncing. When the the message_nr is unknown the it…
Return the options for the DKIM signature on outgoing emails. Called during email encoding.
Drop an e-mail handler for a user/resource id. (notify). The notification, user and resource should be the same as when…
Add a handler for receiving e-mail notifications
Notify that we could NOT send an e-mail (there might be a bounce later…) The Context is the depickled z_email:send/2…
Check if an email address is blocked
Check if an email address is safe to send email to. The email address is not blocked and is not marked as bouncing.
Notification sent to a site when e-mail for that site is received
Add a handler for receiving e-mail notifications
Notify that we could NOT send an e-mail (there might be a bounce later…) The Context is the depickled z_email:send/2…
Email status notification, sent when the validity of an email recipient changes
export_resource_content_disposition
mod_export - return the {ok, Disposition} for the content disposition.
mod_export -
mod_export - fetch a row for the export, can return a list of rows, a binary, and optionally a continuation state.
mod_export - Encode a single data element.
mod_export - return the {ok, Filename} for the content disposition.
mod_export - Fetch the footer for the export. Should cleanup the continuation state, if needed.
mod_export - Fetch the header for the export.
mod_export - Check if the resource or dispatch is visible for export.
Broadcast some file changed, used for livereload by mod_development
Signal that the hierarchy underneath a resource has been changed by mod_menu
Access log event for http. Called from the z_stats.
Check if passwords are matching. Uses the password hashing algorithms.
Notify that a user’s identity has been updated by the identity model.
Request to send a verification to the user. Return ok or an error. Handled by mod_signup to send out verification…
Notify that a user’s identity has been verified. Signals to modules handling identities to mark this identity as…
Find an import definition for a CSV file by checking the filename of the to be imported file.
An external feed delivered a resource. First handler can import it. Return:: {ok, m_rsc:resource_id()} , {error
Notify that the session’s language has been changed
Try to detect the language of a translation. Set is_editable_only to false to detect any language, even if the language…
Check for logon options, called if logon_submit returns undefined . This is used to fetch external (or local…
Check where to go after a user logs on.
Handle a user logon. The posted query args are included. Return:: {ok, UserId} or {error, Reason}
Send a page to a mailinglist (notify) Use {single_test_address, Email} when sending to a specific e-mail address.
Send a welcome or goodbye message to the given recipient. The recipient is either a recipient-id or a recipient props.
Site configuration parameter was changed
Site configuration parameter was changed
Try to find a filename extension for a mime type (example: “.jpg”)
Try to identify a file, returning a map with file properties.
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…
Notification to import a medium record from external source. This is called for non-file medium records, for example…
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…
Modify the options for an image preview url or tag. This is called for every image url generation, except if the…
Notification that a medium file has been changed (notify) The id is the resource id, medium contains the medium’s…
See if there is a ‘still’ image preview of a media item. (eg posterframe of a movie) Return:: {ok, ResourceId} or…
Media update done notification. action is ‘insert’, ‘update’ or ‘delete’
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue…
Notification that a medium file has been uploaded. This is the moment to change properties, modify the file etc. The…
Notification that a medium file has been uploaded. This is the moment to change resource properties, modify the file…
Request to generate a HTML media viewer for a resource
Optionally wrap HTML with external content so that it adheres to the cookie/privacy settings of the current site…
Fetch the menu id belonging to a certain resource
Save the menu tree of a menu resource
Delegates the request processing.
A module has been activated and started.