mantisbt:plugins_sample
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mantisbt:plugins_sample [2007/11/04 16:30] – Fixed a comment. vboctor | mantisbt:plugins_sample [2013/06/21 09:54] (current) – atrol | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Sample Plugins ====== | ====== Sample Plugins ====== | ||
+ | |||
===== Super Cow Powers ===== | ===== Super Cow Powers ===== | ||
Line 9: | Line 10: | ||
mantis/ | mantis/ | ||
plugins/ | plugins/ | ||
- | | + | |
- | | + | |
- | events.php | + | |
</ | </ | ||
- | **'' | + | **'' |
<code php> | <code php> | ||
<?php | <?php | ||
- | /** | + | class SupercowPlugin extends MantisPlugin |
- | * Return plugin details to the API. | + | |
- | * @return array Plugin details | + | |
- | */ | + | |
- | function plugin_callback_supercow_info() | + | |
- | return array( | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ); | + | |
- | } | + | |
- | /** | + | |
- | * Intitialize the plugin. | + | |
- | */ | + | $this-> |
- | function | + | |
- | | + | |
- | } | + | |
- | </ | + | |
- | **'' | + | $this-> |
- | <code php> | + | $this-> |
- | <?php | + | ' |
+ | ); | ||
+ | |||
+ | $this-> | ||
+ | $this-> | ||
+ | $this-> | ||
+ | } | ||
+ | |||
+ | function init() { | ||
+ | plugin_event_hook( | ||
+ | } | ||
+ | |||
+ | /** | ||
+ | * Handle the EVENT_PLUGIN_INIT callback. | ||
+ | */ | ||
+ | function header() { | ||
+ | header( ' | ||
+ | } | ||
- | /** | ||
- | * Handle the EVENT_PLUGIN_INIT callback. | ||
- | */ | ||
- | function plugin_event_supercow_header() { | ||
- | header( ' | ||
} | } | ||
</ | </ | ||
Line 111: | Line 104: | ||
} | } | ||
</ | </ | ||
+ | |||
+ |
mantisbt/plugins_sample.1194211818.txt.gz · Last modified: 2008/10/29 04:31 (external edit)