Extending the scope of Quam Plures

Plugin Hooks

This is almost the entire list of hooks a plugin might take advantage of. Some are missing for a silly reason that one day will be fixed :) If you are a plugin author or just very curious, please be aware these are not the hooks in the most recent Quam Plures release. This list contains hooks added since the release, and hooks in branches I add for my clients.

  • AdminAfterMenuInit This gets called after the backoffice menu has been initialized
  • AdminAfterNavbarInit This gets called after the navbar menu has been initialized
  • AdminAfterPageFooter This gets called after the backoffice HTML footer has been displayed
  • AdminBeforeItemEditCreate This gets called before a new item gets created from the backoffice
  • AdminBeforeItemEditDelete This gets called before an existing item gets deleted from the backoffice
  • AdminBeforeItemEditUpdate This gets called before an existing item gets updated from the backoffice
  • AdminBeginPayload This gets called before the main payload in the backoffice is displayed
  • AdminDispCommentFormField Display form fieldsets on the backoffice comment editing form
  • AdminDisplayCommentToolbar Display a toolbar on the admin-side feedback form
  • AdminDisplayEditorButton Display action buttons on the edit screen(s)
  • AdminDisplayFieldsetAbove Called when displaying item form fieldsets above the post textarea
  • AdminDisplayFieldsetBelow Called when displaying item form fieldsets below the post textarea
  • AdminDisplayFieldsetSidebar Called when displaying item form fieldsets at the top of the sidebar
  • AdminDisplayToolbarAbove Called when displaying editor toolbars above the post textarea
  • AdminDisplayToolbarBelow Called when displaying editor toolbars below the post textarea
  • AdminDisplayToolbarSidebar Called when displaying editor toolbars at the top of the sidebar
  • AdminEndHtmlHead This gets called at the end of the HTML HEAD section in backoffice templates
  • AdminTabAction This gets called before AdminTabPayload when the Tools tab for the plugin is selected; no output allowed!
  • AdminTabPayload This gets called when the Tools tab for the plugin is selected and content should be displayed
  • AdminToolAction (this hook might be obsolete!)
  • AdminToolPayload This gets called when the plugin's block in the Tools menu should be displayed
  • AfterCommentDelete Gets called after a comment has been deleted from the database
  • AfterCommentFormInsert Called after a comment has been added through public form
  • AfterCommentInsert Gets called after a comment has been inserted into the database
  • AfterCommentUpdate Gets called after a comment has been updated in the database
  • AfterFileSave Called after an uploaded file gets saved on server
  • AfterFileUpload Called before an uploaded file gets saved on server
  • AfterInstall
  • AfterItemDelete This gets called after an item has been deleted from the database
  • AfterItemInsert This gets called after an item has been inserted into the database
  • AfterItemUpdate This gets called after an item has been updated in the database
  • AfterLoginAnonymousUser Gets called at the end of the login procedure for anonymous visitors
  • AfterLoginRegisteredUser Gets called at the end of the login procedure for registered users
  • AfterSendMessage Called after a email message has been sent through public form
  • AfterTrackbackInsert Gets called after a trackback has been recorded
  • AfterUserDelete This gets called after an user has been deleted from the database
  • AfterUserInsert This gets called after an user has been inserted into the database
  • AfterUserRegistration Gets called after a new user has registered
  • AfterUserUpdate This gets called after an user has been updated in the database
  • AlternateAuthentication Called at the end of the login process, if the user did not try to login, the session has no user attached or only the username and no password is given (see Plugin::AlternateAuthentication() for more info)
  • AppendHitLog Called when a hit gets logged, but before it gets recorded
  • AppendItemPreviewTransact This gets called when instantiating an item for preview
  • AppendUserRegistrTransact Gets appended to the transaction that creates a new user on registration
  • BeforeBlogDisplay Gets called before a (part of the blog) gets displayed
  • BeforeCommentFormInsert Called before a comment gets recorded through the public comment form
  • BeforeDisable
  • BeforeEnable
  • BeforeInstall
  • BeforeSendMessage Called when a message form has been submitted
  • BeforeSessionsDelete Gets called when sessions are being pruned to enable plugin house cleaning, plugin might change the sess_lastseen timestamp of any sessions they want to keep
  • BeforeThumbCreate This gets called before an image thumbnail gets created
  • BeforeTrackbackInsert Gets called before a trackback gets recorded
  • BeforeUninstall
  • BeforeUninstallPayload
  • CacheIsCollectingContent Gets asked for if we are generating cached content
  • CacheObjects Cache data objects
  • CachePageContent Cache page content
  • CaptchaPayload Provide a turing test to detect humans
  • CaptchaValidated Validate the test from CaptchaPayload to detect humans
  • CaptchaValidatedCleanup Cleanup data used for CaptchaValidated
  • CommentFormSent Called when a public comment form has been sent and gets received
  • DisplayCommentFormButton Called in the submit button section of the frontend comment form
  • DisplayCommentFormFieldset Called at the end of the frontend comment form
  • DisplayCommentToolbar Display a toolbar on the public feedback form
  • DisplayItemAsHtml Called on an item when it gets displayed as HTML
  • DisplayItemAsText Called on an item when it gets displayed as text
  • DisplayItemAsXml Called on an item when it gets displayed as XML
  • DisplayLoginFormFieldset Called when displaying the "Login" form
  • DisplayMessageFormButton Called in the submit button section of the frontend message form
  • DisplayMessageFormFieldset Called at the end of the frontend message form
  • DisplayRegisterFormFieldset Called when displaying the "Register" form
  • DisplayTemplate called on a template from {@link GetProvidedTemplates()}
  • DisplayTrackbackAddr Called to display the trackback URL for an item
  • DisplayValidateAccountFormFieldset Called when displaying the "Validate account" form
  • ExecCronJob
  • FilterCommentAuthor Filters the comment author
  • FilterCommentAuthorUrl Filters the URL of the comment author
  • FilterCommentContent Filters the content of a comment
  • FilterIpAddress Called when displaying an IP address
  • FilterItemContents Filters the content of a post/item right after input
  • GetCronJobs Gets a list of implemented cron jobs
  • GetDefaultSettings
  • GetDefaultUserSettings
  • GetExtraEvents
  • GetProvidedTemplates Get a list of "templates" handled by the plugin
  • GetSpamKarmaForComment Asks plugin for the spam karma of a comment/trackback
  • GetSrvcMethods
  • IsValidFilteredEmail Called when checking if an email address that looks syntactically correct is in fact valid
  • IsValidRawEmail Called when checking if an unprocessed email address as supplied by the user is valid
  • ItemApplyAsRenderer Asks the plugin if it wants to apply as a renderer for an item
  • ItemCanComment Asks the plugin if an item can receive comments/feedback
  • ItemInsertFileJavascript Allows an editor plugin to write custom tags when inserting a file, usually an image
  • ItemSendPing Send a ping to a service about new items
  • ItemViewsIncreased Called when the view counter of an item got increased
  • LoginAttempt Called when a user tries to login
  • LoginAttemptNeedsRawPassword A plugin has to return true here, if it needs a raw (un-hashed) password in LoginAttempt
  • Logout Called when a user logs out
  • ModifySendMessage Called after preparing but before sending a message
  • PluginInit
  • PluginSettingsEditAction Called as action before editing the plugin's settings
  • PluginSettingsEditDisplayAfter Called after standard plugin settings are displayed for editing
  • PluginSettingsUpdateAction Called as action before updating the plugin's settings
  • PluginSettingsValidateSet Called before setting a plugin's setting in the backoffice
  • PluginUserSettingsEditAction Called as action before editing a user's settings
  • PluginUserSettingsEditDisplayAfter Called after displaying normal user settings
  • PluginUserSettingsUpdateAction Called as action before updating the plugin's user settings
  • PluginUserSettingsValidateSet Called before setting a plugin's user setting in the backoffice
  • PluginVersionChanged Called when we detect a version change
  • PrependItemInsertTransact This gets called before an item is inserted into the database
  • PrependItemUpdateTransact This gets called before an item gets updated in the database.
  • RegisterFormSent Called when the "Register" form has been submitted
  • RenderItemAsHtml Renders content when generated as HTML
  • RenderItemAsText Renders content when generated as plain text
  • RenderItemAsXml Renders content when generated as XML
  • SessionLoaded Gets called after $Session is initialized, quite early
  • TemplateBeginHtmlBody Called at the beginning of the template's HTML BODY section
  • TemplateBeginHtmlHead Gets called at the top of the HTML HEAD section in a template
  • TemplateEndHtmlBody Called at the end of the template's HTML BODY section
  • TemplateTag This method gets invoked when a plugin is called by its code. Providing this method causes the plugin to be listed as a widget
  • UnfilterItemContents Unfilters the content of a post/item right before editing
  • ValidateAccountFormSent Called when the "Validate account" form has been submitted
2 comments »

2 comments

Comment from: Lee Turner [Visitor] · http://www.hackingquamplures.com
Nice to have the list all in one place. Are the ones you added for clients too specific or will they be added to the core of QP ?

L
07/11/11 @ 05:29
Comment from: admin [Member]Email
Right now the list has nothing that isn't in QP, but that means QP from launchpad. I think maybe 4 of the hooks above are not in v0.0.0 but are in the current trunk.

Hopefully I won't need client-specific hooks, but the possibility exists. IF that happens chances are real strong that the existence of the hook will be a branch ... which means it would show up here.
07/11/11 @ 09:56

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

©2012 by admin

<hic sunt dracones />