Plugin Hooks
From GregariusWiki
[edit] rss.plugins.admin.activate
- Input parameter
null- Returned parameter
null- Description
- Called by the admin interface when the plugin is activated. (This hook will be provided in 0.5.3 soon)
- Sample plugins using this hook
[edit] rss.plugins.admin.deactivate
- Input parameter
null- Returned parameter
null- Description
- Called by the admin interface when the plugin is deactivated. (this hook will be provided in 0.5.3 soon)
- Sample plugins using this hook
- Input parameter
null- Returned parameter
String- Description
- Called right after the top navigation links. Prints out the returned string.
- Sample plugins using this hook
- Input parameter
null- Returned parameter
String- Description
- Allows the plugin author to extend the item properties editing dialog. Prints out the returned string.
- Sample plugins using this hook
- Input parameter
null- Returned parameter
String(javascript code)- Description
- Allows the plugin author to override the javascript function to be called when the user cancels the item editing action.
- Input parameter
null- Returned parameter
String(javascript code)- Description
- Allows the plugin author to override the javascript function to be called when the user submits the item editing action.
- Sample plugins using this hook
- Input parameter
array(exported function names)- Returned parameter
array(exported function names)- Description
- Extends the list of PHP functions whose interfaces are to be exported as AJAX functions. The input parameter must be returned.
- Input parameter
null- Returned parameter
null- Description
- Called when the user clicks the 'edit tag' link. Allows to inject extra Javascript.
- Sample plugins using this hook
-
- del.icio.us Tags
- Input parameter
null- Returned parameter
String(javascript code)- Description
- AJAX-related javascript functions. Prints out the returned javascript code in
ajax.php?jsif the Administrator cookie is set. - Input parameter
null- Returned parameter
String(javascript code)- Description
- AJAX-related javascript functions. Prints out the returned javascript code in
ajax.php?jsregardless of the Administrator cookie. - Input parameter
null- Returned parameter
null- Description
- Called immediately the mainobject is rendered.
- Sample plugins using this hook
-
- Slider
- Input parameter
null- Returned parameter
String(html code)- Description
- Prints out the returned html code right before the closing
</body>tag. Can be used to inject generic javascript code. - Sample plugins using this hook
-
- Doubleclick to Read
- New Window
- Input parameter
null- Returned parameter
null- Description
- Called before any HTML content is sent to the browser. If your plugins requires to set any HTTP headers, it should do so here.
- Sample plugins using this hook
- Input parameter
array($title,$urlDB,$siteurl,$folderid,$descr,$icon)- Returned parameter
array($title,$urlDB,$siteurl,$folderid,$descr,$icon)- Description
- Array containing a new Feed, right before it is inserted into the database
- Input parameter
null- Returned parameter
null- Description
- Called right after the Feeds in the sidecolumn have been rendered
- Input parameter
null- Returned parameter
String (to be printed)- Description
- Allows plugin authors to insert text into the page footer. Note: the returned markup should be enclosed in "span" tags.
- Sample plugins using this hook
- Input parameter
String (item content)- Returned parameter
String (item content)- Description
- This hook allows plugin authors to edit the description of items as they were extracted from the RSS feeds.
- Sample plugins using this hook
-
- Url filter
- Tidy HTML filter
- HTML filter
- Input parameter
null- Returned parameter
null- Description
- Called immediately after all items are displayed in the browser.
- Sample plugins using this hook
-
- Extra Button
- Input parameter
null- Returned parameter
null- Description
- Called immediately before all items are displayed in the browser.
- Input parameter
null- Returned parameter
null- Description
- Use this hook to add your own code on the top of every item's list, right after the 'mark items as read' buttons.
- Sample plugins using this hook
- Input parameter
Item- Returned parameter
Item- Description
- Called before items are rendered. Can slow down page rendering significantly.
- Sample plugins using this hook
- See Also
- Ticket #43 (plugin display hooks)
- Input parameter
rss_item_id- Returned parameter
null- Description
- Called just before the title of each item is rendered. Can slow down page rendering significantly.
- Input parameter
null- Returned parameter
null- Description
- Undefined
- Sample plugins using this hook
- Input parameter
array ($cid, $title, $url, $description)- Returned parameter
array ($cid, $title, $url, $description)- Description
- Called when a new item is found in a feed, right before it is inserted into the database. The plugin author can edit the data before the insertion and must return the data as it was passed to the plugin
- Input parameter
array($newIid,$item,$channelId)- Returned parameter
null- Description
- Called right after an item was inserted into the database. The passed parameters are
- The new item's database id (iid)
- MagpieRSS
itemobject - Gregarius' feed ID this item belongs to
- Input parameter
String $sqlOrder- Returned parameter
String $sqlOrder- Description
- Allows to override the order (sql-wise) which items as displayed in. (see ItemList::populate())
- Input parameter
array($cid, $iid, $description)- Returned parameter
array($cid, $iid, $description)- Description
- Same as
#rss.plugins.items.newbut called when an item is updated - Input parameter
Array (of URLs of javascript files to include)- Returned parameter
Array (of URLs of javascript files to include)- Description
- This plugin hook can be used to append additional javascript resources in the rendered header. The passed array must be returned after the plugin has appended its own javascript resource.
- Sample plugins using this hook
-
- del.icio.us Tags
- Input parameter
null- Returned parameter
null- Description
- This plugin hook can be used to append additional buttons to the main navigation section.
- Sample plugins using this hook
-
- Sticky Button
- Input parameter
MagpieRSS array $item- Returned parameter
MagpieRSS array $item- Description
- Allows to manipulate items as they are being added
- Input parameter
null- Returned parameter
null- Description
- Called right before the sidemenu is rendered
- Input parameter
null- Returned parameter
null- Description
- Called right before the CSS stylesheets are output
- Sample plugins using this hook
-
- roundedcorners
- slider
- Input parameter
null- Returned parameter
null- Description
- Called right before an update starts
- Sample plugins using this hook
- Input parameter
null- Returned parameter
null- Description
- Called right after an update ends
- Sample plugins using this hook
[edit] rss.plugins.afternav
[edit] rss.plugins.ajax.admindlg
[edit] rss.plugins.ajax.admindlg.oncancel
[edit] rss.plugins.ajax.admindlg.onok
[edit] rss.plugins.ajax.exports
[edit] rss.plugins.ajax.extrajs.edittag
[edit] rss.plugins.ajax.extrajs.private
[edit] rss.plugins.ajax.extrajs.public
[edit] rss.plugins.before.mainobject
[edit] rss.plugins.bodyend
[edit] rss.plugins.bodystart
[edit] rss.plugins.feed.new
[edit] rss.plugins.feeds.after
[edit] rss.plugins.footer.span
[edit] rss.plugins.import.description
[edit] rss.plugins.items.afteritems
[edit] rss.plugins.items.beforeitems
[edit] rss.plugins.items.beforeitemsimmediate
[edit] rss.plugins.items.beforerender
[edit] rss.plugins.items.beforetitle
[edit] rss.plugins.items.enclosure
[edit] rss.plugins.items.new
[edit] rss.plugins.items.newiid
[edit] rss.plugins.items.order
[edit] rss.plugins.items.updated
[edit] rss.plugins.javascript
[edit] rss.plugins.navelements
[edit] rss.plugins.rating.rated
To be completed
[edit] rss.plugins.rssitem
[edit] rss.plugins.sidemenu
[edit] rss.plugins.stylesheets
[edit] rss.plugins.updates.before
[edit] rss.plugins.updates.after
[edit] Plugin Configuration Hook
Unlike most hooks, this is defined in the Meta-information section. Please see the section entitled "Providing Configuration Options" for more information.

