User Tools

Site Tools


nupusi:nucleus:pluginevents

Plugin Event List

Events on which a plugin can subscribe

Name When Parameters
InitSkinParseJust before the skin is initializedskin
The SKIN-object that is handling the parse
type
Type of skinpart (one of 'index', 'item', 'archive', 'archivelist', 'member', 'error', 'search', 'imagepopup', 'fileparser')
PreSkinParseImmediately before the parsing of a skin beginsskin
The SKIN-object that is handling the parse
type
Type of skinpart (one of 'index', 'item', 'archive', 'archivelist', 'member', 'error', 'search', 'imagepopup', 'fileparser')
contents
The content of the skin
PostSkinParseImmediately after parsing a skinskin
The SKIN-object that is handling the parse
type
Type of skinpart (one of 'index', 'item', 'archive', 'archivelist', 'member', 'error', 'search', 'imagepopup', 'fileparser')
PreItemBefore an item is parsed, but after the item header has been placedblog
BLOG object
item
object containing item data
PostItemAfter an item has been parsed, but before the item footer has been parsedblog
BLOG object
item
object containing item data
PreCommentBefore a comment is showncomment
associative array containing comment data
PostCommentAfter a comment has been showncomment
associative array containing comment data
PreDateHeadBefore a date header is shownblog
BLOG object
timestamp
Timestamp for date header
PostDateHeadAfter a date header has been parsedblog
BLOG object
timestamp
Timestamp for date header
PreDateFootBefore a date footer is parsedblog
BLOG object
timestamp
Timestamp for day that is closed
PostDateFootAfter a date footer has been parsedblog
BLOG object
timestamp
Timestamp for day that is closed
LoginSuccessAfter a successful loginmember
MEMBER object
LoginFailedAfter a failed loginusername
login name that was used in the login attempt
LogoutAfter logoutusername
name of the user that logged out
PreBlogContentBefore blog content has been inserted through a skinvarblog
BLOG object
type
Type of skinvar that's being called ('blog', 'otherblog', 'archive', 'archivelist', 'item', 'searchresults', 'othersearchresults', 'categorylist', 'otherarchive', 'otherarchivelist')
PostBlogContentAfter blog content has been inserted through a skinvarblog
BLOG object
type
Type of skinvar that's being called ('blog', 'otherblog', 'archive', 'archivelist', 'item', 'searchresults', 'othersearchresults', 'categorylist', 'otherarchive', 'otherarchivelist')
PreAddCommentBefore adding a comment to the databasecomment
comment data (associative array)
PostAddCommentAfter adding a comment to the databasecomment
comment data (associative array)
commentid
comment ID
PostRegisterAfter a new user has registeredmember
New MEMBER object
PostAddItemAfter an item has been added to the databaseitemid
new itemid in database
PostUpdateItemImmediately after an item gets updates in the database itemid
item ID
PreAddItemImmediately before an item is added to the databasetitle
title
body
body text
more
extended text
blog
BLOG object
authorid
ID of author
timestamp
UNIX timestamp
closed
1 (no comments allowed) or 0 (comments allowed)
draft
1 (draft) or 0 (not draft)
catid
ID fo category
PreUpdateItemImmediately before an item gets updates in the databaseitemid
item ID
title
title
body
body text
more
extended text
blog
BLOG object
closed
1 (no comments allowed) or 0 (comments allowed)
catid
ID fo category
PrepareItemForEditCalled after getting an item from the database, and before presenting it to the user to be edited.item
associative array containing item data
PreUpdateCommentImmediately before a comment is updated and saved into the databasebody
Comment body
PrepareCommentForEditAfter a comment is retrieved from the database, and before it is presented to the user to be edited.comment
comment data (associative array)
PrePluginOptionsEdit(v2.0b) before the 'edit plugin options' form is created.
(v2.2) extra parameters
(v3.2) extra parameter for every option
context
(v2.2) global, blog, member, item or category
options
Array with for each option an associative array, having the following indices: name, value, oid, description, type, typeinfo, contextid, extra. Extra options can be added here (if you want to do something with them, you'll need to subscribe to PostPluginOptionsUpdate as well)
Using the extra-field you can add extra html (by example formcontrols) to the option. If you do so, you should compare pid with getID() and also check name before adding things to extra
plugid
plugin ID (compare with GetID() to find out if this concerns you) (only present when context is global)
contextid
context ID (blogid, memberid, catid, itemid depending on context)
PrePluginOptionsUpdate(v3.2) Before the options for a plugin have been updated. (using this event you can validate/change the new value for an option)context
(v2.2) global, member, blog, item or category
plugid
plugin ID (compare with GetID() to find out if this concerns you)
optionname
Name of the option
contextid
context ID (blogid, memberid, catid, itemid depending on context)
value
New value for the option
PostPluginOptionsUpdate(v2.0b) After the options for a plugin have been updated.
(v2.2) Different parameters depending on context
context
(v2.2) global, member, blog, item or category
plugid
plugin ID (compare with GetID() to find out if this concerns you) (global context)
blogid
(v2.2) blog ID (blog context)
blog
(v2.2) BLOG object (blog context)
memberid
(v2.2) member ID (member context)
member
(v2.2) MEMBER object (member context)
catid
(v2.2) category ID (category context)
itemid
(v2.2) item ID (item context)
member
(v2.2) ITEM object (item context)
PostAuthentication(v2.0b) After the login procedure has been completed. This occurs on each page request.loggedIn
result of $member→isLoggedIn()
PreAddItemForm(v2.0b) Immediately before an add item form (bookmarklet or admin area) is created.contents
reference to an associative array, in which the values 'title', 'body' and 'more' can be filled with initial values for the formfields. To avoid multiple plugins to alter these values, set the 'hasBeenSet' value to 1 when you're done (and check for it before starting)
blog
reference to a BLOG object
AddItemFormExtras(v2.0b) Somewhere inside the add item page or bookmarklet. Here, plugins can add their custom fields without having to alter one of the .template files.blog
reference to a BLOG object
EditItemFormExtras(v2.0b) Somewhere inside the edit item page or bookmarklet. Here, plugins can add their custom fields without having to alter one of the .template files.

Don't add too much data, and please generate valid XHTML, looking like this:
<h3>plugin name</h3>
<p>your stuff</p>
This way, multiple plugins can add options here while things keep a good structure. Also try to use prefixes for your fieldnames, in order to avoid nameclashes (e.g. plug_tb_url)
blog
reference to a BLOG object
variables
(read-only) An associative array containing all sorts of information on the item that's being edited: 'itemid', 'draft', 'closed', 'title', 'body', 'more', 'author', 'authorid', 'timestamp', 'karmapos', 'karmaneg', 'catid'
itemid
shortcut to the item ID
BlogSettingsFormExtras(v2.0) On the blog settings page. You can add your own forms here.

Don't add too much data, and please generate valid XHTML, looking like this:
<h4>plugin name</h4>
<form method=“post” action=“…”><p>
your stuff
</p></form>
This way, multiple plugins can add options here while things keep a good structure. Also try to use prefixes for your fieldnames, in order to avoid nameclashes (e.g. plug_tb_url)
blog
reference to a BLOG object
PreDeleteItem(v2.0) Immediately before an item gets deleted in the databaseitemid
id of the item that will be deleted
PostDeleteItem(v2.0) Immediately after an item has been deleted in the databaseitemid
id of the deleted item
PreDeleteCategory(v2.0) Immediately before a category gets deleted from the databasecatid
category ID
PostDeleteCategory(v2.0) Immediately after a category has been deleted from the databasecatid
category ID
PreDeleteBlog(v2.0) Immediately before a blog gets deleted from the databaseblogid
ID of the blog that will be deleted
PostDeleteBlog(v2.0) Immediately after a blog has been deleted from the databaseblogid
ID of the blog that was deleted from the database
PreDeleteMember(v2.0) Immediately before a member gets deleted from the databasemember
reference to the MEMBER object associated with the member that needs to be deleted
PostDeleteMember(v2.0) Immediately after a member has been deleted from the databasemember
reference to the MEMBER object associated with the member that has been deleted
PreDeleteTeamMember(v2.0) Immediately before a member gets deleted from a weblog teammember
reference to the MEMBER object
blogid
ID of the blog
PostDeleteTeamMember(v2.0) Immediately after a member has been deleted from a weblog teammember
reference to the MEMBER object
blogid
ID of the blog
PreDeleteComment(v2.0) Immediately before a comment gets deleted from the databasecommentid
ID of the comment that will be deleted
PostDeleteComment(v2.0) Immediately after a comment has been deleted from the databasecommentid
ID of the deleted comment
ActionLogCleared(v2.0) After the action log has been clearedNone
PreDeleteTemplate(v2.0) Immediately before a template gets deleted from the databasetemplateid
ID of the template that will be deleted
PostDeleteTemplate(v2.0) Immediately after a template has been deleted from the databasetemplateid
ID of the deleted template
PreDeleteSkin(v2.0) Immediately before a skin gets deleted from the databaseskinid
ID of the skin that will be deleted
PostDeleteSkin(v2.0) Immediately after a skin has been deleted from the databaseskinid
ID of the deleted skin
PreDeletePlugin(v2.0) Immediately before a plugin gets deleted from the databaseplugid
ID of the plugin that will be deleted
PostDeletePlugin(v2.0) Immediately after a plugin has been deleted from the databaseplugid
ID of the deleted plugin
PreDeleteBan(v2.0) Immediately before an IP ban gets deleted from the databaseblogid
ID of the blog for which the ban will be deleted
iprange
banned IP range
PostDeleteBan(v2.0) Immediately after an IP ban has been deleted from the databaseblogid
ID of the blog for which the ban has been deleted
iprange
banned IP range
PreAddCategory(v2.0) Immediately before a new category is created in the databaseblog
reference to BLOG object
name
name of new category
description
description of new category
PostAddCategory(v2.0) Immediately after a new category has been created in the databaseblog
reference to BLOG object
name
name of new category
description
description of new category
catid
New category ID
PreAddBlog(v2.0) Immediately before a new blog is createdname
name of new blog
shortname
shortname of new blog
timeoffset
time offset of new blog
description
description of new blog
defaultskin
ID of default skin for new blog
PostAddBlog(v2.0) Immediately after a new blog has been createdblog
new BLOG object
PreAddPlugin(v2.0) Immediately before a plugin is addedfile
filename of the new plugin
PostAddPlugin(v2.0) Immediately after a plugin has been addedplugin
An object of the newly added plugin
PreAddTeamMember(v2.0) Immediately before a member gets added to a blog teamblog
BLOG object
member
MEMBER object
admin
boolean indicating if the newly added member will have blog admin rights or not
PostAddTeamMember(v2.0) Immediately after a member has been added to a blog teamblog
BLOG object
member
MEMBER object
admin
boolean indicating if the newly added member has admin rights or not
PreAddTemplate(v2.0) Immediately before a new template is created (note: this one also gets called when a template is cloned))name
name of the new template
description
description of the new template
PostAddTemplate(v2.0) Immediately after a new template has been createdname
name of the new template
description
description of the new template
templateid
ID of the new template
PreAddSkin(v2.0) Immediately before a new skin is created (note: this one also gets called when a skin is cloned))name
name of the new skin
description
description of the new skin
type
content type of the skin
includeMode
includeMode of the new skin
includePrefix
includePrefix of the new skin
PostAddSkin(v2.0) Immediately after a new skin has been createdname
name of the new skin
description
description of the new skin
type
content type of the skin
includeMode
includeMode of the new skin
includePrefix
includePrefix of the new skin
skinid
ID of the new skin
PreAddBan(v2.0) Immediately before a new ban is added to a weblogblogid
ID of the blog
iprange
IP range to be banned
reason
textual message describing the reason for the ban
PostAddBan(v2.0) Immediately after a new ban has been addedblogid
ID of the blog
iprange
IP range to be banned
reason
textual message describing the reason for the ban
PreMoveItem(v2.0) Immediately before an item is moved to another blog/categoryitemid
ID of the item
destblogid
ID of the destination blog
destcatid
ID of the destination category
PostMoveItem(v2.0) Immediately after an item has been moved to another blog/categoryitemid
ID of the item
destblogid
ID of the new blog
destcatid
ID of the new category
PreMoveCategory(v2.0) Immediately before a catgeory is moved to another blogcatid
ID of the catgeory
sourceblog
source BLOG object
destblog
destination BLOG object
PostMoveCategory(v2.0) Immediately after a catgeory has been moved to another blogcatid
ID of the catgeory
sourceblog
source BLOG object
destblog
destination BLOG object
MemberSettingsFormExtras(v2.0) On the member settings page. You can add your own forms here.

Don't add too much data, and please generate valid XHTML, looking like this:
<h4>plugin name</h4>
<form method=“post” action=“…”><p>
your stuff
</p></form>
This way, multiple plugins can add options here while things keep a good structure. Also try to use prefixes for your fieldnames, in order to avoid nameclashes (e.g. plug_tb_url)
member
reference to a MEMBER object
GeneralSettingsFormExtras(v2.0) On the general settings page. You can add your own forms here.

Don't add too much data, and please generate valid XHTML, looking like this:
<h4>plugin name</h4>
<form method=“post” action=“…”><p>
your stuff
</p></form>
This way, multiple plugins can add options here while things keep a good structure. Also try to use prefixes for your fieldnames, in order to avoid nameclashes (e.g. plug_tb_url)
None
AdminPrePageHead(v2.5) On admin area pages, immediately before the page head is printed. This event could be used to add extra script/css includes in the head sectionextrahead
Extra information to be included in the head section of the HTML page. Append your extras here.
action
Currently executed action or pagetype
AdminPrePageFoot(v2.5) On admin area pages, immediately before the page footer is printed.action
Currently executed action or pagetype
PreSendContentType(v2.5) Immediately before a content type is being set in the HTTP headercontentType
content type (e.g. application/xhtml+xml)
charset
Character set
pageType
String indicating which type of page we're displaying: skin (skinparts), media (media library), admin-action (admin area), bookmarklet-action (bookmarklet)
QuickMenu(v2.5) At the end of the Admin Area quick menu. This can be used to add extra plugin entries. To add entries, push associative arrays on the options array. An example can be found in the section about creating a plugin admin area.options
Array
BookmarkletExtraHead(v2.5) Somewhere inside the head section of the bookmarklet XHTML code.extrahead
Information to be included in the head section of the XHTML code. Add your extras here.
FormExtra(v3.2) Inside one of the comment, membermail or account activation forms. This event allows plugins to insert extra fields in the form. This event corresponds with the ValidateForm event that is fires when the form is handled.type
Type of the form from which the event fired.
* activation
* additemform (note: this is not the add item form from the admin area!)
* commentform-loggedin
* commentform-notloggedin
* membermailform-loggedin
* membermailform-notloggedin
member
When type is activation, this field contains the details of the member that's being activated
ValidateForm(v3.2) Called when one of the comment, membermail or account activation forms is being handled. This event allows plugins to perform their own validation on the data, and prevent further handling if something is wrong. When used together with the FormExtra field, it can be used to add extra fields to forms.type
Type of the form being handled
* membermail
* comment
* activation
error
When the plugin wants to stop the handling of the form, it needs to fill out a non-empty error string message in this error field. This error message will then be presented to the user.
comment
On comment-type forms, contains an associative array with the comment data.
member
On activation-type forms, contains information about the member being activated.
nupusi/nucleus/pluginevents.txt · Last modified: 2008/12/06 13:56 (external edit)