Procedural File: lib-plugins.php
Source Location: /system/lib-plugins.php
Page Details:
This is the plugin library for Geeklog. This is the API that plugins can implement to get tight integration with Geeklog.
See each function for more details.
Tags:
Includes:
require_once($_CONF['path_system'].'classes/plugin.class.php') [line 49]
Include plugin class
PLG_RET_AUTH_FAILED [line 58]
PLG_RET_ERROR [line 56]
PLG_RET_OK [line 55]
PLG_RET_PERMISSION_DENIED [line 57]
PLG_RET_PRECONDITION_FAILED [line 59]
PLG_afterSaveSwitch [line 2488]
string PLG_afterSaveSwitch(
string $target, string $item_url, string $plugin, [string $message = ''])
|
|
Forward the user depending on config setting after saving something
Tags:
Parameters
| string |
$target |
where to redirect to |
| string |
$item_url |
the url of the item saved |
| string |
$plugin |
the name of the plugin that saved the item |
| string |
$message |
(optional) message number to attach to url |
PLG_approveSubmission [line 989]
boolean PLG_approveSubmission(
string $type, string $id)
|
|
This function is responsible for calling plugin_moderationapproves_<pluginname> which approves an item from the submission queue for a plugin.
Tags:
Parameters
| string |
$type |
Plugin name to do submission approval for |
| string |
$id |
used to identify the record to approve |
PLG_checkforSpam [line 2017]
int PLG_checkforSpam(
string $content, [int $action = -1])
|
|
Allows plugins and Core Geeklog Components to filter out spam. The Spam-X Plugin is now part of the Geeklog Distribution This plugin API will call the main function in the Spam-X plugin but can also be used to call other plugins or custom functions if available for filtering spam or content. The caller should check for return values > 0 in which case spam has been detected and the poster should be told, either via echo COM_refresh($_CONF['site_url'] . '/index.php?msg=' . $result
. '&plugin=spamx');
or by
Where the former will only display a "spam detected" message while the latter will also send an HTTP status code 403 with the message.
Tags:
Parameters
| string |
$content |
Text to be filtered or checked for spam |
| int |
$action |
what to do if spam found |
PLG_chkVersion [line 214]
boolean PLG_chkVersion(
string $type)
|
|
Calls the plugin function to return the current version of code. Used to indicate to admin if an update or upgrade is required.
Tags:
Parameters
PLG_commentDelete [line 449]
mixed PLG_commentDelete(
string $type, int $cid, string $id)
|
|
Plugin should delete a comment
Tags:
Parameters
| string |
$type |
Plugin to delete comment |
| int |
$cid |
Comment to be deleted |
| string |
$id |
Item id to which $cid belongs |
PLG_commentPreSave [line 526]
mixed PLG_commentPreSave(
int $uid, string &$title, string &$comment, string $sid, int $pid, string $type, string &$postmode)
|
|
Allows plugins a chance to handle a comment before Geeklog does. This is a first-come-first-serve affair so if a plugin returns an error, other plugins wishing to handle comment preprocessing won't get called
Tags:
Parameters
| int |
$uid |
User ID |
| string |
&$title |
Comment title |
| string |
&$comment |
Comment text |
| string |
$sid |
Story ID (not always a story, remember!) |
| int |
$pid |
Parent comment ID |
| string |
$type |
Type of comment |
| string |
&$postmode |
HTML or text |
PLG_commentSave [line 469]
mixed PLG_commentSave(
string $type, string $title, string $comment, string $id, int $pid, string $postmode)
|
|
Plugin should save a comment
Tags:
Parameters
| string |
$type |
Plugin to delete comment |
| string |
$title |
comment title |
| string |
$comment |
comment text |
| string |
$id |
Item id to which $cid belongs |
| int |
$pid |
comment parent |
| string |
$postmode |
'html' or 'text' |
PLG_configChange [line 2569]
void PLG_configChange(
string $group, array $changes)
|
|
Inform plugins of configuration changes NOTE: Plugins will only be notified of details of changes in 'Core' and in their own configuration. For other plugins, they will only be notified of the fact that something in the other plugin's config changed.
Tags:
Parameters
| string |
$group |
plugin name or 'Core' for $_CONF changes |
| array |
$changes |
names of config values that changed |
PLG_createUser [line 1131]
void PLG_createUser(
int $uid)
|
|
This function will inform all plugins when a new user account is created.
Parameters
| int |
$uid |
user id of the new user account |
PLG_deleteSubmission [line 1006]
boolean PLG_deleteSubmission(
string $type, string $id)
|
|
This function is responsible for calling plugin_moderationdelete_<pluginname> which deletes an item from the submission queue for a plugin.
Tags:
Parameters
| string |
$type |
Plugin to do submission deletion for |
| string |
$id |
used to identify the record for which to delete |
PLG_deleteUser [line 1155]
void PLG_deleteUser(
int $uid)
|
|
This function will inform all plugins when a user account is deleted.
Parameters
| int |
$uid |
user id of the deleted user account |
PLG_displayComment [line 494]
mixed PLG_displayComment(
string $type, string $id, int $cid, string $title, string $order, string $format, int $page, boolean $view)
|
|
Plugin should display [a] comment[s]
Tags:
Parameters
| string |
$type |
Plugin to display comment |
| string |
$id |
Unique idenifier for item comment belongs to |
| int |
$cid |
Comment id to display (possibly including sub-comments) |
| string |
$title |
Page/comment title |
| string |
$order |
'ASC' or 'DSC' or blank |
| string |
$format |
'threaded', 'nested', or 'flat' |
| int |
$page |
Page number of comments to display |
| boolean |
$view |
True to view comment (by cid), false to display (by $pid) |
PLG_doSearch [line 744]
array PLG_doSearch(
string $query, date $datestart, date $dateend, string $topic, string $type, int $author, [string $keyType = 'all'], [int $page = 1], [int $perpage = 10])
|
|
This function gives each plugin the opportunity to do their search and return their results. Results come back in an array of HTML formatted table rows that can be quickly printed by search.php
Tags:
Parameters
| string |
$query |
What the user searched for |
| date |
$datestart |
beginning of date range to search for |
| date |
$dateend |
ending date range to search for |
| string |
$topic |
the topic the user searched within |
| string |
$type |
Type of items they are searching, or 'all' |
| int |
$author |
UID...only return results for this person |
| string |
$keyType |
search key type: 'all', 'phrase', 'any' |
| int |
$page |
page number of current search (deprecated) |
| int |
$perpage |
number of results per page (deprecated) |
PLG_enableStateChange [line 360]
boolean PLG_enableStateChange(
string $type, boolean $enable)
|
|
Inform plugin that it is either being enabled or disabled.
Tags:
Parameters
| string |
$type |
Plugin name |
| boolean |
$enable |
true if enabling, false if disabling |
PLG_feedUpdateCheck [line 1863]
boolean PLG_feedUpdateCheck(
string $plugin, int $feed, string $topic, string $update_data, string $limit, [string $updated_type = ''], [string $updated_topic = ''], [string $updated_id = ''])
|
|
The plugin is expected to check if the feed content needs to be updated. This is called from COM_rdfUpToDateCheck() every time Geeklog's index.php is displayed - it should try to be as efficient as possible ... NOTE: The presence of non-empty $updated_XXX parameters indicates that an existing entry has been changed. The plugin may therefore apply a different method to check if its feed has to be updated.
Tags:
Parameters
| string |
$plugin |
plugin name |
| int |
$feed |
feed id |
| string |
$topic |
"topic" of the feed - plugin specific |
| string |
$update_data |
comma-sep. list of updated ids |
| string |
$limit |
number of entries or number of hours |
| string |
$updated_type |
(optional) type of feed to update |
| string |
$updated_topic |
(optional) topic to update |
| string |
$updated_id |
(optional) entry id to update |
PLG_getAdminOptions [line 935]
array PLG_getAdminOptions(
)
|
|
This function will show any plugin adminstrative options in the admin functions block on every page (assuming the user is an admin and is logged in). NOTE: the plugin is responsible for its own security. This supports that a plugin can have several lines in the Admin menu. The plugin has to provide simply a set arrays with 3 variables in order to get n lines in the menu such as array(
array("first line", "url1", "1"),
array("second line", "url2", "44"),,
etc, etc)
If there is only one item, a single array is enough: array("first line", "url1", "1")
Tags:
PLG_getBlocks [line 2333]
array PLG_getBlocks(
string $side, [string $topic = ''])
|
|
Gets Geeklog blocks from plugins Returns data for blocks on a given side and, potentially, for a given topic.
Tags:
Parameters
| string |
$side |
Side to get blocks for (right or left for now) |
| string |
$topic |
Only get blocks for this topic |
PLG_getCCOptions [line 902]
array PLG_getCCOptions(
)
|
|
This function shows the option for all plugins at the top of the command and control center. This supports that a plugin can have several lines in the CC menu. The plugin has to provide simply a set arrays with 3 variables in order to get n lines in the menu such as array(
array("first line", "url1", "1"),
array("second line", "url2", "44"),
etc, etc)
If there is only one item, a single array is enough: array("first line", "url1", "1")
Tags:
PLG_getCommentUrlId [line 425]
array PLG_getCommentUrlId(
string $type)
|
|
Get view URL and name of unique identifier
Tags:
Parameters
| string |
$type |
Plugin to delete comment |
PLG_getDocumentationUrl [line 2604]
mixed PLG_getDocumentationUrl(
string $type, string $file)
|
|
Ask plugin for the URL to its documentation
Tags:
Parameters
| string |
$type |
plugin name |
| string |
$file |
documentation file being requested, e.g. 'config' |
PLG_getFeedContent [line 1711]
array PLG_getFeedContent(
string $plugin, int $feed, string &$link, string &$update_data, string $feedType, string $feedVersion)
|
|
Get the content of a feed from the plugin. The plugin is expected to return an array holding the content of the feed and to fill in 'link' (some link that represents the same content on the site as that in the feed) and 'update_data' (to be stored for later up-to-date checks.
Tags:
Parameters
| string |
$plugin |
plugin name |
| int |
$feed |
feed id |
| string |
&$link |
link to content on the site |
| string |
&$update_data |
information for later up-to-date checks |
| string |
$feedType |
The type of feed (RSS/Atom etc) |
| string |
$feedVersion |
The version info of the feed. |
PLG_getFeedElementExtensions [line 1748]
array PLG_getFeedElementExtensions(
string $contentType, string $contentID, string $feedType, string $feedVersion, string $topic, string $fid)
|
|
Get extension tags for a feed. For example, some plugins may extened the available elements for an RSS 2.0 feed for articles. For some reason. This function allows that.
Tags:
Parameters
| string |
$contentType |
Type of feed content, article or a plugin specific type |
| string |
$contentID |
Unique identifier of content item to extend |
| string |
$feedType |
Type of feed format (RSS/Atom/etc) |
| string |
$feedVersion |
Type of feed version (RSS 1.0 etc) |
| string |
$topic |
The topic for the feed. |
| string |
$fid |
The ID of the feed being fetched. |
PLG_getFeedExtensionTags [line 1819]
array PLG_getFeedExtensionTags(
string $contentType, string $feedType, string $feedVersion, string $topic, string $fid)
|
|
Get meta tag extensions for a feed. Add extended tags to the meta area of a feed.
Tags:
Parameters
| string |
$contentType |
Type of feed content, article or a plugin specific type |
| string |
$feedType |
Type of feed format (RSS/Atom/etc) |
| string |
$feedVersion |
Type of feed version (RSS 1.0 etc) |
| string |
$topic |
The topic for the feed. |
| string |
$fid |
The ID of the feed being fetched. |
PLG_getFeedNames [line 1668]
array PLG_getFeedNames(
string $plugin)
|
|
Ask the plugin for a list of feeds it supports. The plugin is expected to return an array of id/name pairs where 'id' is the plugin's internal id for the feed and 'name' is what will be presented to the user.
Tags:
Parameters
| string |
$plugin |
plugin name |
PLG_getFeedNSExtensions [line 1784]
array PLG_getFeedNSExtensions(
string $contentType, string $feedType, string $feedVersion, string $topic, string $fid)
|
|
Get namespaces extensions for a feed. If a plugin has added extended tags to a feed, then it may also need to insert some extensions to the name spaces.
Tags:
Parameters
| string |
$contentType |
Type of feed content, article or a plugin specific type |
| string |
$feedType |
Type of feed format (RSS/Atom/etc) |
| string |
$feedVersion |
Type of feed version (RSS 1.0 etc) |
| string |
$topic |
The topic for the feed. |
| string |
$fid |
The ID of the feed being fetched. |
PLG_getHeaderCode [line 1446]
string PLG_getHeaderCode(
)
|
|
This function is called from COM_siteHeader and will return additional header information. This can be used for JavaScript functions required for the plugin or extra Metatags
Tags:
PLG_getIcon [line 2365]
string PLG_getIcon(
string $type)
|
|
Get the URL of a plugin's icon
Tags:
Parameters
PLG_getItemInfo [line 2112]
mixed PLG_getItemInfo(
string $type, string $id, string $what, [int $uid = 0], [array $options = array()])
|
|
Ask plugin for information about one of its items Item properties that can be requested: - 'date-created' - creation date, if available
- 'date-modified' - date of last modification, if available
- 'description' - full description of the item
- 'excerpt' - short description of the item
- 'id' - ID of the item, e.g. sid for articles
- 'title' - title of the item
- 'url' - URL of the item
'excerpt' and 'description' may return the same value. Properties should be returned in the order they are listed in $what. Properties that are not available should return an empty string. Return false for errors (e.g. access denied, item does not exist, etc.).
Tags:
Parameters
| string |
$type |
plugin type (incl. 'article' for stories) |
| string |
$id |
ID of an item under the plugin's control or '*' |
| string |
$what |
comma-separated list of item properties |
| int |
$uid |
user ID or 0 = current user |
| array |
$options |
(reserved for future extensions) |
PLG_getMenuItems [line 400]
array PLG_getMenuItems(
)
|
|
Gives plugins a chance to print their menu items in header Note that this is fairly unflexible. This simply loops through the plugins in the database in the order they were installed and get their menu items. If you want more flexibility in your menu then you should hard code the menu items in header.thtml for the theme(s) you are using.
Tags:
PLG_getModerationValues [line 1058]
string PLG_getModerationValues(
string $type)
|
|
This function is responsible for setting the plugin-specific values needed by moderation.php to approve stuff.
Parameters
| string |
$type |
Plugin to call function for |
PLG_getPluginStats [line 628]
mixed PLG_getPluginStats(
int $showsitestats)
|
|
The way this function works is very specific to how Geeklog shows its statistics. On stats.php, there is the top box which gives overall statistics for Geeklog and then there are blocks below it that give more specific statistics for various components of Geeklog. This plugin API function suffers from a variety of bugs and bad design decisions for which we have to provide backward compatibility, so please bear with us ... The only parameter to this function, $showsitestats, was documented as being being 1 for the site stats and 0 for the plugin-specific stats. However, the latter was always called with a value of 2, so plugins only did a check for 1 and "else", which makes extensions somewhat tricky. Furthermore, due to the original templates for the site stats, it has become standard practice to hard-code a <table> in the plugins as the return value for $showsitestats == 1. This table, however, didn't align properly with the built-in site stats entries. Because of all this, the new mode, 3, works differently: - for $showsitestats == 3, we call a new plugin API function,
plugin_statssummary_<plugin-name>, which is supposed to return the plugin's
entry for the site stats in an array which stats.php will then properly
format, alongside the entries for the built-in items.
- for $showsitestats == 1, we only call those plugins that do NOT have a
plugin_statssummary_<plugin-name> function, thus providing backward
compatibility
- for $showsitestats == 2, nothing has changed
Tags:
Parameters
| int |
$showsitestats |
value indicating type of stats to return |
PLG_getSearchTypes [line 697]
array PLG_getSearchTypes(
)
|
|
This function gives each plugin the opportunity to put a value(s) in the 'Type' drop down box on the search.php page so that their plugin can be incorporated into searches.
Tags:
PLG_getSubmissionCount [line 783]
int PLG_getSubmissionCount(
)
|
|
Asks each plugin to report any submissions they may have in their submission queue
Tags:
PLG_getUserOptions [line 968]
array PLG_getUserOptions(
)
|
|
This function will show any plugin user options in the user block on every page This supports that a plugin can have several lines in the User menu. The plugin has to provide simply a set of arrays with 3 variables in order to get n lines in the menu such as array(
array("first line", "url1", "1"),
array("second line", "url2", "44"),
etc, etc)
If there is only one item, a single array is enough: array("first line", "url1", "1")
NOTE: the plugin is responsible for its own security.
Tags:
PLG_getWhatsNew [line 1894]
Ask plugins if they want to add something to Geeklog's What's New block.
Tags:
PLG_getWhatsNewComment [line 1946]
array PLG_getWhatsNewComment(
)
|
|
Ask plugins if they want to add new comments to Geeklog's What's New block.
PLG_groupChanged [line 1260]
void PLG_groupChanged(
int $grp_id, string $mode)
|
|
This function is called to inform plugins when a group's information has changed or a new group has been created.
Parameters
| int |
$grp_id |
Group ID |
| string |
$mode |
type of change: 'new', 'edit', or 'delete' |
PLG_handlePingComment [line 2157]
mixed PLG_handlePingComment(
string $type, string $id, string $operation)
|
|
Geeklog is about to perform an operation on a trackback or pingback comment to one of the items under the plugin's control and asks for the plugin's permission to continue. Geeklog handles receiving and deleting trackback comments and pingbacks for the plugin but since it doesn't know about the plugin's access control, it has to ask the plugin to approve / reject such an operation. $operation can be one of the following: - 'acceptByID': accept a trackback comment on item with ID $id
returns: true for accept, false for reject
- 'acceptByURI': accept a pingback comment on item at URL $id
returns: the item's ID for accept, false for reject
- 'delete': is the current user allowed to delete item with ID $id?
returns: true for accept, false for reject
Tags:
Parameters
| string |
$type |
plugin type |
| string |
$id |
an ID or URL, depending on the operation |
| string |
$operation |
operation to perform |
PLG_install [line 167]
boolean PLG_install(
string $type)
|
|
Tells a plugin to install itself. NOTE: not currently used any more
Tags:
Parameters
PLG_invokeService [line 2426]
int PLG_invokeService(
string $type, string $action, array $args, array &$output, array &$svc_msg)
|
|
Invoke a service
Tags:
Parameters
| string |
$type |
The plugin type whose service is to be called |
| string |
$action |
The service action to be performed |
| array |
$args |
The arguments to be passed to the service invoked |
| array |
&$output |
The output variable that will contain the output after invocation |
| array |
&$svc_msg |
The output variable that will contain the service messages |
PLG_isModerator [line 384]
boolean PLG_isModerator(
)
|
|
Checks to see if user is a plugin moderator Geeklog is asking if the user is a moderator for any installed plugins.
Tags:
PLG_itemDeleted [line 2244]
void PLG_itemDeleted(
string $id, string $type)
|
|
"Generic" plugin API: Delete item To be called (eventually) whenever Geeklog removes an item from the database. Plugins can define their own 'itemdeleted' function to be notified whenever an item is deleted.
Tags:
Parameters
| string |
$id |
ID of the item |
| string |
$type |
type of the item, e.g. 'article' |
PLG_itemDisplay [line 2285]
array PLG_itemDisplay(
string $id, string $type)
|
|
"Generic" plugin API: Display item To be called (eventually) whenever Geeklog displays an item. Plugins can hook into this and add content to the displayed item, in the form of an array (true, string1, string2...). The object that called can then display one or several items with a object-defined layout. Plugins can signal an error by returning an array (false, 'Error Message') In case of an error, the error message will be written to the error.log and nothing will be displayed on the output.
Tags:
Parameters
| string |
$id |
unique ID of the item |
| string |
$type |
type of the item, e.g. 'article' |
PLG_itemPreSave [line 568]
string PLG_itemPreSave(
string $type, string $content)
|
|
Allows plugins a chance to handle an item before Geeklog does. Modeled after the PLG_commentPreSave() function. This is a first-come-first-serve affair so if a plugin returns an error, other plugins wishing to handle comment preprocessing won't get called
Tags:
Parameters
| string |
$type |
Type of item, i.e.; registration, contact ... |
| string |
$content |
item specific content |
PLG_itemSaved [line 2207]
void PLG_itemSaved(
string $id, string $type, [string $old_id = ''])
|
|
"Generic" plugin API: Save item To be called (eventually) whenever Geeklog saves an item into the database. Plugins can define their own 'itemsaved' function to be notified whenever an item is saved or modified. NOTE: The behaviour of this API function changed in Geeklog 1.6.0
Tags:
Parameters
| string |
$id |
unique ID of the item |
| string |
$type |
type of the item, e.g. 'article' |
| string |
$old_id |
(optional) old ID when the ID was changed |
PLG_loginUser [line 1183]
void PLG_loginUser(
int $uid)
|
|
This function will inform all plugins when a user logs in Note: This function is NOT called when users are re-authenticated by their long-term cookie. The global variable $_USER['auto_login'] will be set to 'true' in that case, however.
Parameters
PLG_logoutUser [line 1209]
void PLG_logoutUser(
int $uid)
|
|
This function will inform all plugins when a user logs out. Plugins should not rely on this ever being called, as the user may simply close the browser instead of logging out.
Parameters
PLG_migrate [line 194]
boolean PLG_migrate(
string $type, array $old_conf)
|
|
Called during site migration - let plugin handle changed URLs or paths
Tags:
Parameters
| string |
$type |
Plugin name |
| array |
$old_conf |
contents of $_CONF before the migration |
PLG_pluginStateChange [line 2629]
void PLG_pluginStateChange(
string $type, string $status)
|
|
Inform plugins when another plugin's state changed Unlike PLG_enableStateChange, this function is called after the state change. NOTE: You can not rely on being informed of state changes for 'installed', 'uninstalled', and 'upgraded', as these may happen in the plugin's install script, outside of Geeklog's control.
Tags:
Parameters
| string |
$type |
plugin name |
| string |
$status |
new status: 'enabled', 'disabled', 'installed', 'uninstalled', 'upgraded' |
PLG_profileBlocksDisplay [line 1366]
string PLG_profileBlocksDisplay(
int $uid)
|
|
Geeklog is about to display the user's profile. Plugins now get a chance to add their own blocks below the standard profile form.
Tags:
Parameters
| int |
$uid |
user id of the user profile to be edited |
PLG_profileBlocksEdit [line 1311]
string PLG_profileBlocksEdit(
int $uid)
|
|
Geeklog is about to display the edit form for the user's profile. Plugins now get a chance to add their own blocks below the standard form.
Tags:
Parameters
| int |
$uid |
user id of the user profile to be edited |
PLG_profileExtrasSave [line 1398]
void PLG_profileExtrasSave(
[string $plugin = ''])
|
|
The user wants to save changes to his/her profile. Any plugin that added its own variables or blocks to the profile input form will now have to extract its data and save it. Plugins will have to refer to the global $_POST array to get the actual data.
Parameters
| string |
$plugin |
name of a specific plugin or empty(all plugins) |
PLG_profileVariablesDisplay [line 1341]
void PLG_profileVariablesDisplay(
int $uid, ref &$template)
|
|
Geeklog is about to display the user's profile. Plugins now get a chance to add their own variables to the profile.
Parameters
| int |
$uid |
user id of the user profile to be edited |
| ref |
&$template |
reference of the Template for the profile edit form |
PLG_profileVariablesEdit [line 1286]
void PLG_profileVariablesEdit(
int $uid, ref &$template)
|
|
Geeklog is about to display the edit form for the user's profile. Plugins now get a chance to add their own variables and input fields to the form.
Parameters
| int |
$uid |
user id of the user profile to be edited |
| ref |
&$template |
reference of the Template for the profile edit form |
PLG_replaceTags [line 1517]
void PLG_replaceTags(
string $content, [string $plugin = ''])
|
|
This function will allow plugins to support the use of custom autolinks in other site content. Plugins can now use this API when saving content and have the content checked for any autolinks before saving. The autolink would be like: [story:20040101093000103 here]
Parameters
| string |
$content |
Content that should be parsed for autolinks |
| string |
$plugin |
Optional if you only want to parse using a specific plugin |
PLG_runScheduledTask [line 2175]
void PLG_runScheduledTask(
)
|
|
Check if plugins have a scheduled task they want to run The interval between runs is determined by $_CONF['cron_schedule_interval']
PLG_saveSubmission [line 1022]
boolean PLG_saveSubmission(
string $type, array $A)
|
|
This function calls the plugin_savesubmission_<pluginname> to save a user submission
Tags:
Parameters
| string |
$type |
Plugin to save submission for |
| array |
$A |
holds plugin specific data to save |
PLG_showCenterblock [line 1091]
string PLG_showCenterblock(
[int $where = 1], [int $page = 1], [string $topic = ''])
|
|
This function will show the centerblock for any plugin. Plugin can display some of their own content in a block on the index or any topic index page. The block can be at the top or bottom of the page, after the featured story or the plugin can take over the entire page. The plugin is responsible to format the output correctly.
Tags:
Parameters
| int |
$where |
where 1 = top, 2 = after feat. story, 3 = bottom of page, 0 = entire page |
| int |
$page |
page number (1, ...) |
| string |
$topic |
topic ID or empty string == front page |
PLG_showModerationList [line 1037]
string PLG_showModerationList(
string $token)
|
|
This function starts the chain of calls needed to show any submissions needing moderation for the plugins.
Tags:
Parameters
| string |
$token |
security token |
PLG_showSubmitForm [line 1071]
string PLG_showSubmitForm(
string $type)
|
|
This function is resonsible for calling plugin_submit_<pluginname> so that the submission form for the plugin is displayed.
Tags:
Parameters
| string |
$type |
Plugin to show submission form for |
PLG_spamAction [line 2063]
int PLG_spamAction(
string $content, [int $action = -1])
|
|
Act on spam This is normally called from PLG_checkforSpam (see above) automatically when spam has been detected. There may however be situations where spam has been detected by some other means, in which case you may want to trigger the spam action explicitly.
Tags:
Parameters
| string |
$content |
Text to be filtered or checked for spam |
| int |
$action |
what to do if spam found |
PLG_supportingFeeds [line 1632]
array PLG_supportingFeeds(
)
|
|
Prepare a list of all plugins that support feeds. To do this, we re-use plugin_getfeednames_<plugin name> and only keep the names of those plugins which support that function
Tags:
PLG_templateSetVars [line 1421]
void PLG_templateSetVars(
string $templatename, ref &$template)
|
|
This function can be called to check if an plugin wants to set a template variable Example in COM_siteHeader, the API call is now added A plugin can check for $templatename == 'header' and then set additional template variables
Tags:
Parameters
| string |
$templatename |
Name of calling template |
| ref |
&$template |
reference for the Template |
PLG_uninstall [line 227]
boolean PLG_uninstall(
string $type)
|
|
Tells a plugin to uninstall itself.
Tags:
Parameters
| string |
$type |
Plugin to uninstall |
PLG_upgrade [line 179]
mixed PLG_upgrade(
string $type)
|
|
Upgrades a plugin. Tells a plugin to upgrade itself.
Tags:
Parameters
PLG_userInfoChanged [line 1234]
void PLG_userInfoChanged(
int $uid)
|
|
This function is called to inform plugins when a user's information (profile or preferences) has changed.
Parameters
PLG_wsEnabled [line 2461]
boolean PLG_wsEnabled(
string $type)
|
|
Returns true if the plugin supports webservices
Tags:
Parameters
| string |
$type |
The plugin type that is to be checked |
|