Public Member Functions | |
getName () | |
getAuthor () | |
getURL () | |
getVersion () | |
getDescription () | |
getMinNucleusVersion () | |
getMinNucleusPatchLevel () | |
getEventList () | |
getTableList () | |
hasAdminArea () | |
install () | |
unInstall () | |
init () | |
doSkinVar ($skinType) | |
doTemplateVar (&$item) | |
doTemplateCommentsVar (&$item, &$comment) | |
doAction ($type) | |
doIf ($key, $value) | |
doItemVar () | |
supportsFeature ($feature) | |
getPluginDep () | |
createOption ($name, $desc, $type, $defValue= '', $typeExtras= '') | |
createBlogOption ($name, $desc, $type, $defValue= '', $typeExtras= '') | |
createMemberOption ($name, $desc, $type, $defValue= '', $typeExtras= '') | |
createCategoryOption ($name, $desc, $type, $defValue= '', $typeExtras= '') | |
createItemOption ($name, $desc, $type, $defValue= '', $typeExtras= '') | |
deleteOption ($name) | |
deleteBlogOption ($name) | |
deleteMemberOption ($name) | |
deleteCategoryOption ($name) | |
deleteItemOption ($name) | |
setOption ($name, $value) | |
setBlogOption ($blogid, $name, $value) | |
setMemberOption ($memberid, $name, $value) | |
setCategoryOption ($catid, $name, $value) | |
setItemOption ($itemid, $name, $value) | |
getOption ($name) | |
getBlogOption ($blogid, $name) | |
getMemberOption ($memberid, $name) | |
getCategoryOption ($catid, $name) | |
getItemOption ($itemid, $name) | |
getAllBlogOptions ($name) | |
getAllMemberOptions ($name) | |
getAllCategoryOptions ($name) | |
getAllItemOptions ($name) | |
getBlogOptionTop ($name, $amount=10, $sort= 'desc') | |
getMemberOptionTop ($name, $amount=10, $sort= 'desc') | |
getCategoryOptionTop ($name, $amount=10, $sort= 'desc') | |
getItemOptionTop ($name, $amount=10, $sort= 'desc') | |
_getOptionTop ($context, $name, $amount=10, $sort= 'desc') | |
getID () | |
getAdminURL () | |
getDirectory () | |
getShortName () | |
NucleusPlugin () | |
clearOptionValueCache () | |
_createOption ($context, $name, $desc, $type, $defValue, $typeExtras= '') | |
_deleteOption ($context, $name) | |
_setOption ($context, $contextid, $name, $value) | |
_getOption ($context, $contextid, $name) | |
_getAllOptions ($context, $name) | |
_getOID ($context, $name) | |
_getDefVal ($context, $name) | |
_deleteOptionValues ($context, $contextid) | |
getOptionSelectValues ($typeExtra) | |
subscribtionListIsUptodate () | |
Static Public Member Functions | |
getOptionMeta ($typeExtra) | |
_applyPluginOptions (&$aOptions, $newContextid=0) | |
Public Attributes | |
$_aOptionValues | |
$_aOptionToInfo | |
$plugin_options | |
$plugid |
for more information on plugins and how to write your own, see the plugins.html file that is included with the Nucleus documenation
http://nucleuscms.org/license.txt GNU General Public License Copyright (C) 2002-2007 The Nucleus Group
Definition at line 23 of file PLUGIN.php.
NucleusPlugin::getName | ( | ) |
NucleusPlugin::getAuthor | ( | ) |
NucleusPlugin::getURL | ( | ) |
NucleusPlugin::getVersion | ( | ) |
NucleusPlugin::getDescription | ( | ) |
NucleusPlugin::getMinNucleusVersion | ( | ) |
NucleusPlugin::getMinNucleusPatchLevel | ( | ) |
Definition at line 36 of file PLUGIN.php.
NucleusPlugin::getEventList | ( | ) |
Reimplemented in NP_Ping, and NP_SkinFiles.
Definition at line 37 of file PLUGIN.php.
Referenced by subscribtionListIsUptodate().
NucleusPlugin::getTableList | ( | ) |
Definition at line 38 of file PLUGIN.php.
NucleusPlugin::hasAdminArea | ( | ) |
NucleusPlugin::install | ( | ) |
NucleusPlugin::unInstall | ( | ) |
NucleusPlugin::init | ( | ) |
NucleusPlugin::doSkinVar | ( | $ | skinType | ) |
Definition at line 46 of file PLUGIN.php.
NucleusPlugin::doTemplateVar | ( | &$ | item | ) |
Definition at line 47 of file PLUGIN.php.
NucleusPlugin::doTemplateCommentsVar | ( | &$ | item, | |
&$ | comment | |||
) |
Definition at line 53 of file PLUGIN.php.
NucleusPlugin::doAction | ( | $ | type | ) |
Definition at line 60 of file PLUGIN.php.
NucleusPlugin::doIf | ( | $ | key, | |
$ | value | |||
) |
Definition at line 61 of file PLUGIN.php.
NucleusPlugin::doItemVar | ( | ) |
Definition at line 62 of file PLUGIN.php.
NucleusPlugin::supportsFeature | ( | $ | feature | ) |
Checks if a plugin supports a certain feature.
$feature | Name of the feature. See plugin documentation for more info 'SqlTablePrefix' -> if the plugin uses the sql_table() method to get table names 'HelpPage' -> if the plugin provides a helppage |
Reimplemented in NP_Ping, and NP_SkinFiles.
Definition at line 73 of file PLUGIN.php.
NucleusPlugin::getPluginDep | ( | ) |
Report a list of plugin that is required to function
Definition at line 82 of file PLUGIN.php.
NucleusPlugin::createOption | ( | $ | name, | |
$ | desc, | |||
$ | type, | |||
$ | defValue = '' , |
|||
$ | typeExtras = '' | |||
) |
Creates a new option for this plugin
name | A string uniquely identifying your option. (max. length is 20 characters) | |
description | A description that will show up in the nucleus admin area (max. length: 255 characters) | |
type | Either 'text', 'yesno' or 'password' This info is used when showing 'edit plugin options' screens | |
value | Initial value for the option (max. value length is 128 characters) |
Definition at line 99 of file PLUGIN.php.
References _createOption().
Referenced by NP_Ping::install().
NucleusPlugin::createBlogOption | ( | $ | name, | |
$ | desc, | |||
$ | type, | |||
$ | defValue = '' , |
|||
$ | typeExtras = '' | |||
) |
NucleusPlugin::createMemberOption | ( | $ | name, | |
$ | desc, | |||
$ | type, | |||
$ | defValue = '' , |
|||
$ | typeExtras = '' | |||
) |
NucleusPlugin::createCategoryOption | ( | $ | name, | |
$ | desc, | |||
$ | type, | |||
$ | defValue = '' , |
|||
$ | typeExtras = '' | |||
) |
NucleusPlugin::createItemOption | ( | $ | name, | |
$ | desc, | |||
$ | type, | |||
$ | defValue = '' , |
|||
$ | typeExtras = '' | |||
) |
NucleusPlugin::deleteOption | ( | $ | name | ) |
Removes the option from the database
Note: Options get erased automatically on plugin uninstall
Definition at line 120 of file PLUGIN.php.
References _deleteOption().
NucleusPlugin::deleteBlogOption | ( | $ | name | ) |
NucleusPlugin::deleteMemberOption | ( | $ | name | ) |
NucleusPlugin::deleteCategoryOption | ( | $ | name | ) |
NucleusPlugin::deleteItemOption | ( | $ | name | ) |
NucleusPlugin::setOption | ( | $ | name, | |
$ | value | |||
) |
Sets the value of an option to something new
Definition at line 139 of file PLUGIN.php.
References _setOption().
NucleusPlugin::setBlogOption | ( | $ | blogid, | |
$ | name, | |||
$ | value | |||
) |
NucleusPlugin::setMemberOption | ( | $ | memberid, | |
$ | name, | |||
$ | value | |||
) |
NucleusPlugin::setCategoryOption | ( | $ | catid, | |
$ | name, | |||
$ | value | |||
) |
NucleusPlugin::setItemOption | ( | $ | itemid, | |
$ | name, | |||
$ | value | |||
) |
NucleusPlugin::getOption | ( | $ | name | ) |
Retrieves the current value for an option
Definition at line 158 of file PLUGIN.php.
References $query, _getOption(), getID(), mysql_fetch_object(), sql_query(), and sql_table().
Referenced by NP_Ping::event_JustPosted(), and NP_Ping::sendPings().
NucleusPlugin::getBlogOption | ( | $ | blogid, | |
$ | name | |||
) |
NucleusPlugin::getMemberOption | ( | $ | memberid, | |
$ | name | |||
) |
NucleusPlugin::getCategoryOption | ( | $ | catid, | |
$ | name | |||
) |
NucleusPlugin::getItemOption | ( | $ | itemid, | |
$ | name | |||
) |
NucleusPlugin::getAllBlogOptions | ( | $ | name | ) |
Retrieves an associative array with the option value for each context id
Definition at line 198 of file PLUGIN.php.
References _getAllOptions().
NucleusPlugin::getAllMemberOptions | ( | $ | name | ) |
NucleusPlugin::getAllCategoryOptions | ( | $ | name | ) |
NucleusPlugin::getAllItemOptions | ( | $ | name | ) |
NucleusPlugin::getBlogOptionTop | ( | $ | name, | |
$ | amount = 10 , |
|||
$ | sort = 'desc' | |||
) |
Retrieves an indexed array with the top (or bottom) of an option (delegates to _getOptionTop())
Definition at line 215 of file PLUGIN.php.
References $amount, and _getOptionTop().
NucleusPlugin::getMemberOptionTop | ( | $ | name, | |
$ | amount = 10 , |
|||
$ | sort = 'desc' | |||
) |
NucleusPlugin::getCategoryOptionTop | ( | $ | name, | |
$ | amount = 10 , |
|||
$ | sort = 'desc' | |||
) |
NucleusPlugin::getItemOptionTop | ( | $ | name, | |
$ | amount = 10 , |
|||
$ | sort = 'desc' | |||
) |
NucleusPlugin::_getOptionTop | ( | $ | context, | |
$ | name, | |||
$ | amount = 10 , |
|||
$ | sort = 'desc' | |||
) |
Retrieves an array of the top (or bottom) of an option from a plugin.
string | $context the context for the option: item, blog, member,... | |
string | $name the name of the option | |
int | $amount how many rows must be returned | |
string | $sort desc or asc |
Definition at line 238 of file PLUGIN.php.
References $amount, $query, _getOID(), mysql_fetch_array(), and sql_query().
Referenced by getBlogOptionTop(), getCategoryOptionTop(), getItemOptionTop(), and getMemberOptionTop().
NucleusPlugin::getID | ( | ) |
Returns the plugin ID
Definition at line 273 of file PLUGIN.php.
Referenced by getOption(), and subscribtionListIsUptodate().
NucleusPlugin::getAdminURL | ( | ) |
returns the URL of the admin area for this plugin (in case there's no such area, the returned information is invalid)
Definition at line 281 of file PLUGIN.php.
References $CONF, and getShortName().
Referenced by NP_SkinFiles::event_QuickMenu().
NucleusPlugin::getDirectory | ( | ) |
Returns the directory where the admin directory is located and where the plugin can maintain his extra files
Definition at line 290 of file PLUGIN.php.
References $DIR_PLUGINS, and getShortName().
Referenced by NP_SkinFiles::init(), and NP_Ping::init().
NucleusPlugin::getShortName | ( | ) |
Derives the short name for the plugin from the classname (all lowercase)
Definition at line 298 of file PLUGIN.php.
Referenced by getAdminURL(), and getDirectory().
NucleusPlugin::NucleusPlugin | ( | ) |
Definition at line 309 of file PLUGIN.php.
NucleusPlugin::clearOptionValueCache | ( | ) |
Definition at line 315 of file PLUGIN.php.
NucleusPlugin::_createOption | ( | $ | context, | |
$ | name, | |||
$ | desc, | |||
$ | type, | |||
$ | defValue, | |||
$ | typeExtras = '' | |||
) |
Definition at line 320 of file PLUGIN.php.
References $query, and sql_table().
Referenced by createBlogOption(), createCategoryOption(), createItemOption(), createMemberOption(), and createOption().
NucleusPlugin::_deleteOption | ( | $ | context, | |
$ | name | |||
) |
Definition at line 341 of file PLUGIN.php.
Referenced by deleteBlogOption(), deleteCategoryOption(), deleteItemOption(), deleteMemberOption(), and deleteOption().
NucleusPlugin::_setOption | ( | $ | context, | |
$ | contextid, | |||
$ | name, | |||
$ | value | |||
) |
private returns: 1 on success, 0 on failure
Definition at line 361 of file PLUGIN.php.
Referenced by setBlogOption(), setCategoryOption(), setItemOption(), setMemberOption(), and setOption().
NucleusPlugin::_getOption | ( | $ | context, | |
$ | contextid, | |||
$ | name | |||
) |
Definition at line 398 of file PLUGIN.php.
Referenced by getBlogOption(), getCategoryOption(), getItemOption(), getMemberOption(), and getOption().
NucleusPlugin::_getAllOptions | ( | $ | context, | |
$ | name | |||
) |
Returns assoc array with all values for a given option (one option per possible context id)
Definition at line 432 of file PLUGIN.php.
Referenced by getAllBlogOptions(), getAllCategoryOptions(), getAllItemOptions(), and getAllMemberOptions().
NucleusPlugin::_getOID | ( | $ | context, | |
$ | name | |||
) |
Gets the 'option identifier' that corresponds to a given option name. When this method is called for the first time, all the OIDs for the plugin are loaded into memory, to avoid re-doing the same query all over.
Definition at line 469 of file PLUGIN.php.
Referenced by _getOptionTop().
NucleusPlugin::_getDefVal | ( | $ | context, | |
$ | name | |||
) |
Definition at line 486 of file PLUGIN.php.
NucleusPlugin::_deleteOptionValues | ( | $ | context, | |
$ | contextid | |||
) |
Deletes all option values for a given context and contextid (used when e.g. a blog, member or category is deleted)
(static method)
Definition at line 499 of file PLUGIN.php.
Referenced by ADMIN::action_deleteblogconfirm(), ITEM::delete(), ADMIN::deleteOneCategory(), and ADMIN::deleteOneMember().
NucleusPlugin::getOptionMeta | ( | $ | typeExtra | ) | [static] |
splits the option's typeextra field (at ;'s) to split the meta collection
string | $typeExtra the value of the typeExtra field of an option |
Definition at line 522 of file PLUGIN.php.
Referenced by _applyPluginOptions(), getOptionSelectValues(), and listplug_plugOptionRow().
NucleusPlugin::getOptionSelectValues | ( | $ | typeExtra | ) |
filters the selectlists out of the meta collection
string | $typeExtra the value of the typeExtra field of an option |
Definition at line 543 of file PLUGIN.php.
References getOptionMeta().
Referenced by listplug_plugOptionRow().
NucleusPlugin::subscribtionListIsUptodate | ( | ) |
checks if the eventlist in the database is up-to-date
Definition at line 554 of file PLUGIN.php.
References $a, getEventList(), getID(), mysql_fetch_array(), sql_query(), and sql_table().
NucleusPlugin::_applyPluginOptions | ( | &$ | aOptions, | |
$ | newContextid = 0 | |||
) | [static] |
$aOptions,: | array ( 'oid' => array( 'contextid' => 'value')) (taken from request using requestVar()) | |
$newContextid,: | integer (accepts a contextid when it is for a new contextid there was no id available at the moment of writing the formcontrols into the page (by ex: itemOptions for new item) |
Definition at line 579 of file PLUGIN.php.
References $manager, $query, getOptionMeta(), mysql_fetch_object(), sql_query(), sql_table(), and undoMagic().
Referenced by ADMIN::action_blogsettingsupdate(), ADMIN::action_changemembersettings(), ADMIN::action_pluginoptionsupdate(), ITEM::createFromRequest(), and ITEM::update().
NucleusPlugin::$_aOptionValues |
Definition at line 302 of file PLUGIN.php.
NucleusPlugin::$_aOptionToInfo |
Definition at line 303 of file PLUGIN.php.
NucleusPlugin::$plugin_options |
Definition at line 304 of file PLUGIN.php.
NucleusPlugin::$plugid |
Definition at line 305 of file PLUGIN.php.