|
Revision 377, 1.0 KB
(checked in by fboender, 21 months ago)
|
|
Renamed to skeleton.
|
-
Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | Class skeleton extends MvBlog_plugin implements MvBlog_pluginiface { |
|---|
| 3 | |
|---|
| 4 | public $name = "skeleton"; |
|---|
| 5 | public $author = "Michiel van Baak"; |
|---|
| 6 | public $license = "GPL"; |
|---|
| 7 | public $website = "http://www.mvblog.org"; |
|---|
| 8 | public $description = "Example plugin. Replaces all occurences of the word \"mafkees\" with \"The MvBlog Projectleader\"."; |
|---|
| 9 | |
|---|
| 10 | private $_mvblog; |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | public function __construct(&$mvblog) { |
|---|
| 14 | |
|---|
| 15 | $this->addHook("text_output", "plugintest"); |
|---|
| 16 | $this->_mvblog =& $mvblog; |
|---|
| 17 | } |
|---|
| 18 | |
|---|
| 19 | public function activate() { |
|---|
| 20 | |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | public function deactivate() { |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | public function plugintest($text) { |
|---|
| 28 | $output = str_ireplace("michiel", "The MvBlog Projectleader", $text); |
|---|
| 29 | $output = str_ireplace("mafkees", "The MvBlog Projectleader", $output); |
|---|
| 30 | return $output; |
|---|
| 31 | } |
|---|
| 32 | } |
|---|
| 33 | ?> |
|---|