Calendar
[ class tree: Calendar ] [ index: Calendar ] [ all elements ]

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
[ Top ]



CALENDAR_deleteOld [line 979]

string CALENDAR_deleteOld( )

This function deletes the events selected in the listOld function



Tags:

return:  HTML with success or error message


[ Top ]



CALENDAR_eventTypeList [line 1868]

string CALENDAR_eventTypeList( [string $currtype = ''])

Creates a dropdown list of all the event types



Tags:

return:  <option> list of event types


Parameters

string   $currtype   current event type (to preselect in the list)
[ Top ]



CALENDAR_listevents [line 1012]

void CALENDAR_listevents( )



[ Top ]



CALENDAR_listOld [line 887]

void CALENDAR_listOld( )



[ Top ]



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
[ Top ]



calendar_templatePath [line 1656]

string calendar_templatePath( [string $path = ''])

Get path for the template files.



Tags:

return:  full path to template directory


Parameters

string   $path   subdirectory within the base template path
[ Top ]



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:

return:  HTML formatted block containing events.


Parameters

string   $help   Help file for block
string   $title   Title to be used in block header
[ Top ]



plugin_autotags_calendar [line 1140]

void plugin_autotags_calendar( $op, [ $content = ''], [ $autotag = ''])

Implements the [event:] autotag.



Parameters

   $op  
   $content  
   $autotag  
[ Top ]



plugin_autouninstall_calendar [line 1626]

array plugin_autouninstall_calendar( )

Automatic uninstall function for plugins



Tags:

return:  This code is automatically uninstalling the plugin. It passes an array to the core code function that removes tables, groups, features and php blocks from the tables. Additionally, this code can perform special actions that cannot be foreseen by the core code (interactions with other plugins for example)


[ Top ]



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




[ Top ]



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




[ Top ]



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:

return:  result object


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)
[ Top ]



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  
[ Top ]



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
[ Top ]



plugin_getadminoption_calendar [line 1426]

void plugin_getadminoption_calendar( )

returns the administrative option for this plugin



[ Top ]



plugin_getconfigtooltip_calendar [line 2070]

mixed plugin_getconfigtooltip_calendar( string $id)

Provides text for a Configuration tooltip



Tags:

return:  Text to use regular tooltip, NULL to use config tooltip hack, or empty string when not available


Parameters

string   $id   Id of config value
[ Top ]



plugin_getdocumentationurl_calendar [line 2031]

mixed plugin_getdocumentationurl_calendar( string $file)

Provide URL of a documentation file



Tags:

return:  URL or false when not available


Parameters

string   $file   documentation file being requested, e.g. 'config'
[ Top ]



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:

return:  content of the feed


Parameters

string   $feed   feed ID
string   $link   link to homepage
string   $update   list of story ids
   &$link  
   &$update  
   $feedType  
   $feedVersion  
[ Top ]



plugin_getfeednames_calendar [line 1194]

void plugin_getfeednames_calendar( )



[ Top ]



plugin_getheadercode_calendar [line 673]

void plugin_getheadercode_calendar( )



[ Top ]



plugin_geticon_calendar [line 1684]

string plugin_geticon_calendar( )

Returns the URL of the plugin's icon



Tags:

return:  URL of the icon


[ Top ]



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:

return:  string or array of strings with the information


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)
[ Top ]



plugin_getListField_calendar [line 1802]

void plugin_getListField_calendar( $fieldname, $fieldvalue, $A, $icon_arr)



Parameters

   $fieldname  
   $fieldvalue  
   $A  
   $icon_arr  
[ Top ]



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>




[ Top ]



plugin_getuseroption_calendar [line 1441]

void plugin_getuseroption_calendar( )



[ Top ]



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:

return:  Returns true if moderator


[ Top ]



plugin_itemlist_calendar [line 327]

mixed plugin_itemlist_calendar( )

Returns SQL & Language texts to moderation.php



Tags:

return:  Plugin object or void if not allowed


[ Top ]



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
[ Top ]



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:

return:  Any wanted HTML output


Parameters

string   $id   Identifying string
[ Top ]



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:

return:  Any wanted HTML output


Parameters

string   $id   Identifying string
[ Top ]



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:

return:  Returns array of useful moderation values


[ Top ]



plugin_savesubmission_calendar [line 430]

string plugin_savesubmission_calendar( array $A)

Check calendar submission form for missing fields and Saves a calendar submission



Tags:

return:  HTML redirect


Parameters

array   $A   Data for that submission
[ Top ]



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:

return:  (plugin name/entry title) pair for the dropdown


[ Top ]



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
[ Top ]



plugin_statssummary_calendar [line 1393]

array(item plugin_statssummary_calendar( )

New stats plugin API function for proper integration with the site stats



Tags:

return:  text, item count);


[ Top ]



plugin_submissioncount_calendar [line 1122]

void plugin_submissioncount_calendar( )

Counts the items that are submitted



[ Top ]



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

   $mode  
[ Top ]



plugin_templatesetvars_calendar [line 1793]

void plugin_templatesetvars_calendar( string $templatename, &$template, ref $template)

Set template variables



Tags:

return:  Note: A plugin should use its name as a prefix for the names of its template variables, e.g. 'calendar_xxx' and 'lang_calendar_xxx'. 'button_calendar' is an exception, as such a variable existed for header.thtml in Geeklog 1.4.0 and earlier, where the Calendar was an integral part of Geeklog. It is added here for backward-compatibility.


Parameters

string   $templatename   name of template, e.g. 'header'
ref   $template   reference of actual template
   &$template  
[ Top ]



plugin_upgrade_calendar [line 1500]

int plugin_upgrade_calendar( )

Update the Calendar plugin



Tags:

return:  Number of message to display (true = generic success msg)


[ Top ]



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
[ Top ]



Documentation generated on Sat, 11 Feb 2012 02:07:36 -0500 by phpDocumentor 1.4.3