root/trunk/plugins/skeleton.php

Revision 377, 1.0 KB (checked in by fboender, 21 months ago)

Renamed to skeleton.

  • Property svn:keywords set to Id
Line 
1<?php
2Class skeleton extends MvBlog_plugin implements MvBlog_pluginiface {
3    /* variables */
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    /* methods */
13    public function __construct(&$mvblog) {
14        // FB: 20070304: Renamed from 'test' to 'plugintest' to avoid name collision with constructor.
15        $this->addHook("text_output", "plugintest");
16        $this->_mvblog =& $mvblog;
17    }
18
19    public function activate() {
20        /* get data, do whatever is needed on plugin activation */
21    }
22
23    public function deactivate() {
24    }
25
26    // FB: 20070304: Renamed from 'test' to 'plugintest' to avoid name collision with constructor.
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?>
Note: See TracBrowser for help on using the browser.