Register action & hook for HelloPlugin only when $conf['hello'] is set.
[viewgit.git] / plugins / hello / main.php
blobf5b482404616ae05e266832f5bfbc0cde759479b
1 <?php
3 class HelloPlugin extends VGPlugin
5 function __construct() {
6 global $conf;
7 if (isset($conf['hello'])) {
8 $this->register_action('hello');
9 $this->register_hook('pagenav');
13 function action($action) {
14 $this->output("Hello world!");
17 function hook($type) {
18 if ($type == 'pagenav') {
19 $this->output(" | <a href=\"". makelink(array('a' => 'hello')) ."\">Hello</a> ");