Plugin hooks reference

From StatusNet

Jump to: navigation, search

Contents

The following hooks are available for plugins to use:

[edit] InitializePlugin

A chance to initialize a plugin in a complete environment

[edit] CleanupPlugin

A chance to cleanup a plugin at the end of a program

[edit] StartPrimaryNav

Showing the primary nav menu

  • $action: the current action

[edit] EndPrimaryNav

At the end of the primary nav menu

  • $action: the current action

[edit] StartSecondaryNav

Showing the secondary nav menu

  • $action: the current action

[edit] EndSecondaryNav

At the end of the secondary nav menu

  • $action: the current action

[edit] StartShowStyles

Showing Style links; good place to add UA style resets

  • $action: the current action

[edit] EndShowStyles

End showing Style links; good place to add custom styles

  • $action: the current action

[edit] StartShowStatusNetStyles

Showing StatusNet Style links

  • $action: the current action

[edit] EndShowStatusNetStyles

End showing StatusNet Style links; good place to add handheld or JavaScript dependant styles

  • $action: the current action

[edit] StartShowLaconicaStyles

Backwards compatibility; deprecated

  • $action: the current action

[edit] EndShowLaconicaStyles

Backwards compatibility; deprecated

  • $action: the current action

[edit] StartShowUAStyles

Showing custom UA Style links

  • $action: the current action

[edit] EndShowUAStyles

End showing custom UA Style links; good place to add user-agent (e.g., filter, -webkit, -moz) specific styles

  • $action: the current action

[edit] StartShowScripts

Showing JavaScript links

  • $action: the current action

[edit] EndShowScripts

End showing JavaScript links; good place to add custom links like Google Analytics

  • $action: the current action

[edit] StartShowJQueryScripts

Showing JQuery script links (use this to link to e.g. Google mirrors)

  • $action: the current action

[edit] EndShowJQueryScripts

End showing JQuery script links

  • $action: the current action

[edit] StartShowStatusNetScripts

Showing StatusNet script links (use this to link to a CDN or something)

  • $action: the current action

[edit] EndShowStatusNetScripts

End showing StatusNet script links

  • $action: the current action

[edit] StartShowLaconicaScripts

Backwards compatibility; deprecated

  • $action: the current action

[edit] EndShowLaconicaScripts

Backwards compatibility; deprecated

  • $action: the current action

[edit] StartShowSections

Start the list of sections in the sidebar

  • $action: the current action

[edit] EndShowSections

End the list of sections in the sidebar

  • $action: the current action

[edit] StartShowBody

Showing before the body container

  • $action: the current action

[edit] EndShowBody

Showing after the body container

  • $action: the current action

[edit] StartShowHeader

Showing before the header container

  • $action: the current action

[edit] EndShowHeader

Showing after the header container

  • $action: the current action

[edit] StartShowFooter

Showing before the footer container

  • $action: the current action

[edit] EndShowFooter

Showing after the footer container

  • $action: the current action

[edit] StartShowContentBlock

Showing before the content container

  • $action: the current action

[edit] EndShowContentBlock

Showing after the content container

  • $action: the current action

[edit] StartNoticeSave

Before inserting a notice (good place for content filters)

  • $notice: notice being saved (no ID or URI)

[edit] EndNoticeSave

After inserting a notice and related code

  • $notice: notice that was saved (with ID and URI)

[edit] StartShowLocalNavBlock

Showing the local nav menu

  • $action: the current action

[edit] EndShowLocalNavBlock

At the end of the local nav menu

  • $action: the current action

[edit] StartShowHTML

Chance to set document headers (e.g., content type, charset, language), DOCTYPE and html element properties

  • $action: the current action

[edit] EndShowHTML

Showing after the html element

  • $action: the current action

[edit] StartPublicGroupNav

Showing the public group nav menu

  • $action: the current action

[edit] EndPublicGroupNav

At the end of the public group nav menu

  • $action: the current action

[edit] StartSubGroupNav

Showing the subscriptions group nav menu

  • $action: the current action

[edit] EndSubGroupNav

At the end of the subscriptions group nav menu

  • $action: the current action

[edit] RouterInitialized

After the router instance has been initialized

  • $m: the Net_URL_Mapper that has just been set up

[edit] StartLogout

Before logging out

  • $action: the logout action

[edit] EndLogout

After logging out

  • $action: the logout action

[edit] ArgsInitialized

After the argument array has been initialized

  • $args: associative array of arguments, can be modified

[edit] StartAddressData

Allows the site owner to provide additional information about themselves for contact (e.g., tagline, email, location)

  • $action: the current action

[edit] EndAddressData

At the end of <address>

  • $action: the current action

[edit] StartShowHeadElements

Right after the <head> tag

  • $action: the current action

[edit] EndShowHeadElements

Right before the </head> tag; put <script>s here if you need them in <head>

  • $action: the current action

[edit] CheckSchema

See Plugin schema changes

Personal tools