-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.php
43 lines (37 loc) · 1.29 KB
/
action.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* DokuWiki Plugin pglist (Action Component)
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Zaher Dirkey <zaherdirkey@yahoo.com>
*/
// must be run within Dokuwiki
if (!defined('DOKU_INC')) die();
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
require_once(DOKU_PLUGIN.'action.php');
class action_plugin_pglist extends DokuWiki_Action_Plugin {
function getInfo(){
return array(
'author' => 'Zaher Dirkey',
'email' => 'zaherdirkey@yahoo.com',
'date' => '2020-11-15',
'name' => 'Page List Plugin',
'desc' => 'List pages of namespace, based on nslist.',
'url' => 'http://dokuwiki.org/plugin:pglist',
);
}
function register(Doku_Event_Handler $controller) {
$controller->register_hook("TOOLBAR_DEFINE", "AFTER", $this, "insert_button", array ());
}
/**
* Inserts a toolbar button
*/
public function insert_button(&$event, $param) {
$event->data[] = array (
'type' => 'insert',
'title' => 'PGList Plugin',
'icon' => '../../plugins/pglist/images/pglist.png',
'insert' => '{{pglist>selected_namespace files dirs me nostart fsort dsort}}'
);
}
}