[geeklog-devel] Re: Geeklog 2 Module API
Vincent Furia
vmf at abtech.org
Mon Oct 20 02:29:41 EDT 2003
OK, here is a first go at the module/plugin API to get things started.
I thought that I would start by recommending that plugins "register"
themselves during install with geeklog, including whether they use the
different plugin APIs (moderation, comments, ratings, search, etc) so as
to eliminate the "doesXXXX" type functions that may be needed otherwise
(should also make things more efficient when calling functions for
multiple plugins).
In any case, please make lots of recommendations. This doesn't really
add much to what a plugin can do in GL 1.3.x, any new ideas would be
very much appreciated.
-Vinny
<?php
interface glPlugin {
/* installation functions */
function install(); /* install the plugin */
function uninstall(); /* uninstall the plugin */
function upgrade(); /* upgrade the plugin from a
previous version */
function getVersion(); /* return plugin name and version
(author(s)?, website?)*/
/* user modifications */
function onNewUser(); /* process new user */
function onDeleteUser(); /* process user deletion */
/* moderation */
function getSubmissionForm(); /* return the form for plugin
submission */
function getModerationList(); /* return list of items for
moderation */
function onApproveSubmission(); /* process a submission approval */
function onDeleteSubmission(); /* delete a submission */
function onEditSubmission(); /* return the form to edit a
submission */
function getSubmissionCount(); /* return count of current
submissions */
/* search functions */
function getSearchResults(); /* search items for keywords */
function getSearchTypes(); /* return plugin search options */
/* comment functions */
function onCommentAction(); /* plugin action on comment
submit, delete, etc */
function getCommentParent(); /* for display of the parent above
comments */
/* ratings functions */
function onRatingAction(); /* plugin action on ratings
actions (submit rating) */
/* menu/display items */
function getMenuItems(); /* return menu items related to the
plugin */
function getUserMenu(); /* return user menu options */
function getAdminMenu(); /* return admin menu options */
function getControlMenu(); /* return control menu options */
function getCenterBlock(); /* return centerblock */
/* profile */
function getProfileBlock(); /* display plugin block profile
values */
function getEditProfileBlock(); /* return form to edit block
profile values */
function getProfileVar(); /* display plugin variable profile
values */
function getEditProfileVar(); /* return form to edit variable
profile values */
function saveProfileOptions(); /* save plugin profile options */
/* export files (rdf feeds, ical files, etc) */
function getExportNames(); /* return export file names the
plugin uses */
function getExportContent(); /* return export file content */
function getExportCurrent(); /* return if exports are current */
/* other */
function getHeaderCode(); /* return plugin JS or Meta Data */
function getStats(); /* return plugin stats information */
}
More information about the geeklog-devel
mailing list