Procedural File: functions.inc
Source Location: /plugins/links/functions.inc
Page Details:
Implementation of the Plugin API for the Links plugin
Includes:
require_once($langfile) [line 56]
Language file include
require_once($_CONF['path_system'].'classes/config.class.php') [line 65]
Check and see if we need to load the plugin configuration
require_once($plugin_path.'language/english.php') [line 58]
links_breadcrumbs [line 1409]
void links_breadcrumbs(
$root, $cid)
|
|
Parameters
links_buildSql [line 581]
string links_buildSql(
string $cid, string $limits)
|
|
Helper function: Build part of an SQL request
Tags:
Parameters
| string |
$cid |
category id |
| string |
$limits |
limit (number of entries or number of hours) |
LINKS_countLinksAndClicks [line 270]
array(number LINKS_countLinksAndClicks(
)
|
|
Helper function: count number of links and total number of clicks
Tags:
LINKS_getCategorySQL [line 1673]
string LINKS_getCategorySQL(
[string $type = 'WHERE'], [int $u_id = 0], [string $table = ''])
|
|
Return SQL expression to check for allowed categories. Creates part of an SQL expression that can be used to only request links from categories to which the user has access to. Note that this function does SQL requests, so you should cache the resulting SQL expression if you need it more than once.
Tags:
Parameters
| string |
$type |
part of the SQL expr. e.g. 'WHERE', 'AND' |
| int |
$u_id |
user id or 0 = current user |
| string |
$table |
table name if ambiguous (e.g. in JOINs) |
links_select_box [line 1349]
void links_select_box(
$access, [ $sel = ''])
|
|
Parameters
links_select_box_recursive [line 1369]
void links_select_box_recursive(
&$menu, $cid, $sel, $indent, $access)
|
|
Parameters
| |
&$menu |
|
| |
$cid |
|
| |
$sel |
|
| |
$indent |
|
| |
$access |
|
LINKS_sendNotification [line 1098]
void LINKS_sendNotification(
string $table, array $A)
|
|
Send an email notification for a new submission.
Parameters
| string |
$table |
Table where the new submission can be found |
| array |
$A |
submission data |
links_validateUrl [line 1250]
void links_validateUrl(
$url)
|
|
Parameters
phpblock_topic_categories [line 1495]
void phpblock_topic_categories(
)
|
|
Returns a list of categories that are associated with the current topic Relies on the fact that $topic is set (and sanitized) in lib-common.php
phpblock_topic_links [line 1463]
void phpblock_topic_links(
)
|
|
Returns a list of links that belong to categories associated with the current topic Relies on the fact that $topic is set (and sanitized) in lib-common.php
plugin_autotags_links [line 183]
void plugin_autotags_links(
string $op, [string $content = ''], [array $autotag = ''], mixed 3)
|
|
Implements the [link:] autotag.
Parameters
| string |
$op |
operation to perform |
| string |
$content |
item (e.g. story text), including the autotag |
| array |
$autotag |
parameters used in the autotag |
| mixed |
3 |
tag names (for $op='tagname') or formatted content |
plugin_autouninstall_links [line 1312]
array plugin_autouninstall_links(
)
|
|
Automatic uninstall function for plugins
Tags:
plugin_cclabel_links [line 434]
mixed plugin_cclabel_links(
)
|
|
This will put an option for links in the command and control block on moderation.php
Tags:
plugin_chkVersion_links [line 253]
string plugin_chkVersion_links(
)
|
|
Called by the plugin Editor to display the current plugin code version This may be different than the version installed and registered currently. If newer then you may want to run the update
Tags:
plugin_dopluginsearch_links [line 394]
object search plugin_dopluginsearch_links(
string $query, date $datestart, date $dateend, string $topic, string $type, int $author, string $keyType, int $page, int $perpage)
|
|
This searches for links matching the user query and returns an array for the header and table rows back to search.php where it will be formated and printed
Tags:
Parameters
| string |
$query |
Keywords user is looking for |
| date |
$datestart |
Start date to get results for |
| date |
$dateend |
End date to get results for |
| string |
$topic |
The topic they were searching in |
| string |
$type |
Type of items they are searching, or 'all' (deprecated) |
| int |
$author |
Get all results by this author |
| string |
$keyType |
search key type: 'all', 'phrase', 'any' |
| int |
$page |
page number of current search (deprecated) |
| int |
$perpage |
number of results per page (deprecated) |
plugin_enablestatechange_links [line 772]
void plugin_enablestatechange_links(
boolean $enable)
|
|
Geeklog informs us that we're about to be enabled or disabled
Parameters
| boolean |
$enable |
true = we're being enabled, false = disabled |
plugin_feedupdatecheck_links [line 630]
boolean plugin_feedupdatecheck_links(
int $feed, string $topic, string $update_data, string $limit, [string $updated_type = ''], [string $updated_topic = ''], [string $updated_id = ''])
|
|
Checking if links feeds are up to date
Tags:
Parameters
| int |
$feed |
id of feed to be checked |
| string |
$topic |
topic (actually: cid) |
| string |
$update_data |
data describing current feed contents |
| string |
$limit |
number of entries or number of hours |
| string |
$updated_type |
(optional) type of feed to be updated |
| string |
$updated_topic |
(optional) feed's "topic" to be updated |
| string |
$updated_id |
(optional) id of entry that has changed |
plugin_getadminoption_links [line 453]
mixed plugin_getadminoption_links(
)
|
|
returns the administrative option for this plugin
Tags:
plugin_getconfigtooltip_links [line 1776]
mixed plugin_getconfigtooltip_links(
string $id)
|
|
Provides text for a Configuration tooltip
Tags:
Parameters
| string |
$id |
Id of config value |
plugin_getdocumentationurl_links [line 1737]
mixed plugin_getdocumentationurl_links(
string $file)
|
|
Provide URL of a documentation file
Tags:
Parameters
| string |
$file |
documentation file being requested, e.g. 'config' |
plugin_getfeedcontent_links [line 533]
array plugin_getfeedcontent_links(
int $feed, &$link, &$update, ref $link, ref $update)
|
|
Provide feed data
Tags:
Parameters
| int |
$feed |
feed ID |
| ref |
$link |
|
| ref |
$update |
|
| |
&$link |
|
| |
&$update |
|
plugin_getfeednames_links [line 503]
array plugin_getfeednames_links(
)
|
|
Do we support feeds?
Tags:
plugin_geticon_links [line 1129]
string plugin_geticon_links(
)
|
|
Returns the URL of the plugin's icon
Tags:
plugin_getiteminfo_links [line 1529]
mixed plugin_getiteminfo_links(
string $lid, string $what, [int $uid = 0], [array $options = array()])
|
|
Return information for a link
Tags:
Parameters
| string |
$lid |
link ID or '*' |
| string |
$what |
comma-separated list of properties |
| int |
$uid |
user ID or 0 = current user |
| array |
$options |
(reserved for future extensions) |
plugin_getListField_categories [line 1190]
void plugin_getListField_categories(
$fieldname, $fieldvalue, $A, $icon_arr)
|
|
Parameters
| |
$fieldname |
|
| |
$fieldvalue |
|
| |
$A |
|
| |
$icon_arr |
|
plugin_getListField_links [line 1136]
void plugin_getListField_links(
$fieldname, $fieldvalue, $A, $icon_arr)
|
|
Parameters
| |
$fieldname |
|
| |
$fieldvalue |
|
| |
$A |
|
| |
$icon_arr |
|
plugin_getmenuitems_links [line 85]
mixed plugin_getmenuitems_links(
)
|
|
Returns the items for this plugin that should appear on the main menu NOTE: this MUST return the url/value pairs in the following format $<arrayname>[<label>] = <url>
Tags:
plugin_getwhatsnew_links [line 128]
string plugin_getwhatsnew_links(
)
|
|
Return new links for the What's New block
Tags:
plugin_ismoderator_links [line 808]
boolean plugin_ismoderator_links(
)
|
|
Checks that the current user has the rights to moderate the plugin, returns true if this is the case, false otherwise
Tags:
plugin_itemlist_links [line 820]
mixed plugin_itemlist_links(
)
|
|
Returns SQL & Language texts to moderation.php
Tags:
plugin_migrate_links [line 748]
void plugin_migrate_links(
array $old_conf, boolean 1)
|
|
Called during site migration - handle changed URLs or paths
Parameters
| array |
$old_conf |
contents of the $_CONF array on the old site |
| boolean |
1 |
true on success, otherwise false |
plugin_moderationapprove_links [line 868]
string plugin_moderationapprove_links(
string $id)
|
|
Performs plugin exclusive work for items approved by moderation While moderation.php handles the actual move from linkssubmission to links tables, within the function we handle all other approval relate tasks
Tags:
Parameters
| string |
$id |
Identifying string |
plugin_moderationdelete_links [line 900]
string plugin_moderationdelete_links(
string $id)
|
|
Performs plugin exclusive work for items deleted by moderation While moderation.php handles the actual removal from <plugin>submission table, within this function we handle all other deletion related tasks
Tags:
Parameters
| string |
$id |
Identifying string |
plugin_moderationvalues_links [line 846]
array plugin_moderationvalues_links(
)
|
|
returns list of moderation values The array returned contains (in order): the row 'id' label, main plugin table, moderation fields (comma seperated), and plugin submission table
Tags:
plugin_savesubmission_links [line 918]
string plugin_savesubmission_links(
array $A)
|
|
Check submission form values and save if OK. Else show form again
Tags:
Parameters
plugin_save_submit_links [line 983]
string plugin_save_submit_links(
array $A)
|
|
Saves a link submission
Tags:
Parameters
| array |
$A |
Data for that submission |
plugin_searchtypes_links [line 368]
array plugin_searchtypes_links(
)
|
|
Geeklog is asking us to provide any items that show up in the type drop-down on search.php. Let's users search for links.
Tags:
plugin_showstats_links [line 294]
void plugin_showstats_links(
$showsitestats, int $showsitestate, string 1)
|
|
Shows the statistics for the links plugin on stats.php. If $showsitestats is 1 then we are to only print the overall stats in the 'site statistics box' otherwise we show the detailed stats
Parameters
| int |
$showsitestate |
Flag to let us know which stats to get |
| string |
1 |
HTML for the stats section |
| |
$showsitestats |
|
plugin_statssummary_links [line 348]
array(item plugin_statssummary_links(
)
|
|
New stats plugin API function for proper integration with the site stats
Tags:
plugin_submissioncount_links [line 788]
int plugin_submissioncount_links(
)
|
|
Counts the items that are submitted
Tags:
plugin_submit_links [line 946]
string plugin_submit_links(
)
|
|
Shows link submission form
Tags:
plugin_templatesetvars_links [line 1291]
void plugin_templatesetvars_links(
string $templatename, &$template, ref $template)
|
|
Set template variables
Tags:
Parameters
| string |
$templatename |
name of template, e.g. 'header' |
| ref |
$template |
reference of actual template |
| |
&$template |
|
plugin_upgrade_links [line 669]
int plugin_upgrade_links(
)
|
|
Update the Links plugin
Tags:
plugin_user_delete_links [line 475]
void plugin_user_delete_links(
int $uid)
|
|
A user is about to be deleted. Update ownership of any links owned by that user or delete them.
Parameters
| int |
$uid |
User id of deleted user |
plugin_whatsnewsupported_links [line 106]
mixed plugin_whatsnewsupported_links(
)
|
|
Return headlines for New Links section in the What's New block, if enabled
Tags:
|