Procedural File: functions.inc
Source Location: /plugins/calendar/functions.inc
Page Details:
Implementation of the Plugin API for the Calendar plugin
Includes:
require_once($_CONF['path_system'].'classes/config.class.php') [line 60]
require_once($plugin_path.'language/english.php') [line 53]
require_once($langfile) [line 51]
CALENDAR_deleteEvent [line 850]
void CALENDAR_deleteEvent(
string $eid, [string $type = ''], string 2)
|
|
Delete an event
Parameters
| string |
$eid |
id of event to delete |
| string |
$type |
'submission' when attempting to delete a submission |
| string |
2 |
HTML redirect |
CALENDAR_deleteOld [line 979]
string CALENDAR_deleteOld(
)
|
|
This function deletes the events selected in the listOld function
Tags:
CALENDAR_eventTypeList [line 1868]
string CALENDAR_eventTypeList(
[string $currtype = ''])
|
|
Creates a dropdown list of all the event types
Tags:
Parameters
| string |
$currtype |
current event type (to preselect in the list) |
CALENDAR_listevents [line 1012]
void CALENDAR_listevents(
)
|
|
CALENDAR_listOld [line 887]
CALENDAR_sendNotification [line 1084]
void CALENDAR_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 |
calendar_templatePath [line 1656]
string calendar_templatePath(
[string $path = ''])
|
|
Get path for the template files.
Tags:
Parameters
| string |
$path |
subdirectory within the base template path |
phpblock_calendar [line 102]
string phpblock_calendar(
[string $help = ''], [string $title = ''])
|
|
Returns the upcoming events block Returns the HTML for any upcoming events in the calendar
Tags:
Parameters
| string |
$help |
Help file for block |
| string |
$title |
Title to be used in block header |
plugin_autotags_calendar [line 1140]
void plugin_autotags_calendar(
$op, [ $content = ''], [ $autotag = ''])
|
|
Implements the [event:] autotag.
Parameters
plugin_autouninstall_calendar [line 1626]
array plugin_autouninstall_calendar(
)
|
|
Automatic uninstall function for plugins
Tags:
plugin_cclabel_calendar [line 1408]
void plugin_cclabel_calendar(
)
|
|
This will put an option for the calendar in the command and control block on moderation.php
plugin_chkVersion_calendar [line 1483]
void plugin_chkVersion_calendar(
)
|
|
Return the current version of code. Used in the Plugin Editor to show the registered version and code version
plugin_dopluginsearch_calendar [line 1723]
object search plugin_dopluginsearch_calendar(
string $query, date $datestart, date $dateend, string $topic, string $type, int $author, string $keyType, int $page, int $perpage)
|
|
This searches for events 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_calendar [line 1601]
void plugin_enablestatechange_calendar(
$enable, boolean $enabled)
|
|
Geeklog informs us that we're about to be enabled or disabled
Parameters
| boolean |
$enabled |
true = we're being enabled, false = disabled |
| |
$enable |
|
plugin_feedupdatecheck_calendar [line 1294]
void plugin_feedupdatecheck_calendar(
int $feed, string $topic, string $update_data, string $limit, [string $updated_type = ''], [string $updated_topic = ''], [string $updated_id = ''])
|
|
Checking if calendar feeds are up to date
Parameters
| int |
$feed |
id of feed to be checked |
| string |
$topic |
topic (actually: category) |
| 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_calendar [line 1426]
void plugin_getadminoption_calendar(
)
|
|
returns the administrative option for this plugin
plugin_getconfigtooltip_calendar [line 2070]
mixed plugin_getconfigtooltip_calendar(
string $id)
|
|
Provides text for a Configuration tooltip
Tags:
Parameters
| string |
$id |
Id of config value |
plugin_getdocumentationurl_calendar [line 2031]
mixed plugin_getdocumentationurl_calendar(
string $file)
|
|
Provide URL of a documentation file
Tags:
Parameters
| string |
$file |
documentation file being requested, e.g. 'config' |
plugin_getfeedcontent_calendar [line 1215]
array plugin_getfeedcontent_calendar(
string $feed, &$link, &$update, $feedType, $feedVersion, string $link, string $update)
|
|
Get content for a feed that holds all events.
Tags:
Parameters
| string |
$feed |
feed ID |
| string |
$link |
link to homepage |
| string |
$update |
list of story ids |
| |
&$link |
|
| |
&$update |
|
| |
$feedType |
|
| |
$feedVersion |
|
plugin_getfeednames_calendar [line 1194]
void plugin_getfeednames_calendar(
)
|
|
plugin_getheadercode_calendar [line 673]
void plugin_getheadercode_calendar(
)
|
|
plugin_geticon_calendar [line 1684]
string plugin_geticon_calendar(
)
|
|
Returns the URL of the plugin's icon
Tags:
plugin_getiteminfo_calendar [line 1903]
mixed plugin_getiteminfo_calendar(
string $eid, string $what, [int $uid = 0], [array $options = array()])
|
|
Return information for an event
Tags:
Parameters
| string |
$eid |
event 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_calendar [line 1802]
void plugin_getListField_calendar(
$fieldname, $fieldvalue, $A, $icon_arr)
|
|
Parameters
| |
$fieldname |
|
| |
$fieldvalue |
|
| |
$A |
|
| |
$icon_arr |
|
plugin_getmenuitems_calendar [line 78]
void plugin_getmenuitems_calendar(
)
|
|
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>
plugin_getuseroption_calendar [line 1441]
void plugin_getuseroption_calendar(
)
|
|
plugin_ismoderator_calendar [line 316]
boolean plugin_ismoderator_calendar(
)
|
|
Checks that the current user has the rights to moderate the plugin, returns true if this is the case, false otherwise
Tags:
plugin_itemlist_calendar [line 327]
mixed plugin_itemlist_calendar(
)
|
|
Returns SQL & Language texts to moderation.php
Tags:
plugin_migrate_calendar [line 1578]
void plugin_migrate_calendar(
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_calendar [line 379]
string plugin_moderationapprove_calendar(
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_calendar [line 411]
string plugin_moderationdelete_calendar(
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 relate tasks
Tags:
Parameters
| string |
$id |
Identifying string |
plugin_moderationvalues_calendar [line 355]
array plugin_moderationvalues_calendar(
)
|
|
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_calendar [line 430]
string plugin_savesubmission_calendar(
array $A)
|
|
Check calendar submission form for missing fields and Saves a calendar submission
Tags:
Parameters
| array |
$A |
Data for that submission |
plugin_searchtypes_calendar [line 1698]
array plugin_searchtypes_calendar(
)
|
|
Geeklog is asking us to provide any items that show up in the type drop-down on search.php. Let's users search for events.
Tags:
plugin_showstats_calendar [line 1351]
void plugin_showstats_calendar(
int $showsitestats)
|
|
Shows the statistics for the Calendar 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 |
$showsitestats |
showsitestate Flag to let us know which stats to get |
plugin_statssummary_calendar [line 1393]
array(item plugin_statssummary_calendar(
)
|
|
New stats plugin API function for proper integration with the site stats
Tags:
plugin_submissioncount_calendar [line 1122]
void plugin_submissioncount_calendar(
)
|
|
Counts the items that are submitted
plugin_submit_calendar [line 687]
void plugin_submit_calendar(
[ $mode = 'master'])
|
|
Shows event submission form or diverts to event editor if admin calls in
Parameters
plugin_templatesetvars_calendar [line 1793]
void plugin_templatesetvars_calendar(
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_calendar [line 1500]
int plugin_upgrade_calendar(
)
|
|
Update the Calendar plugin
Tags:
plugin_user_delete_calendar [line 1459]
void plugin_user_delete_calendar(
uid $uid)
|
|
A user is about to be deleted. Update ownership of any events owned by that user or delete them.
Parameters
| uid |
$uid |
int User id of deleted user |
|