1<?php
2/**
3 * Template Functions
4 *
5 * This file provides template specific custom functions that are
6 * not provided by the DokuWiki core.
7 * It is common practice to start each function with an underscore
8 * to make sure it won't interfere with future core functions.
9 */
10
11// must be run from within DokuWiki
12if (!defined('DOKU_INC')) die();
13
14function _tpl_usertools() {
15    /* the optional second parameter of tpl_action() switches between a link and a button,
16     e.g. a button inside a <li> would be: tpl_action('edit', 0, 'li') */
17    tpl_toolsevent('usertools', array(
18        'admin'     => tpl_action('admin', 1, 'li', 1),
19        'profile'   => tpl_action('profile', 1, 'li', 1),
20        'register'  => tpl_action('register', 1, 'li', 1),
21        'login'     => tpl_action('login', 1, 'li', 1),
22    ));
23}
24
25function _tpl_sitetools() {
26    tpl_toolsevent('sitetools', array(
27        'recent'    => tpl_action('recent', 1, 'li', 1),
28        'media'     => tpl_action('media', 1, 'li', 1),
29        'index'     => tpl_action('index', 1, 'li', 1),
30    ));
31}
32
33function _tpl_pagetools() {
34    tpl_toolsevent('pagetools', array(
35        'edit'      => tpl_action('edit', 1, 'li', 1),
36        'revisions' => tpl_action('revisions', 1, 'li', 1),
37        'backlink'  => tpl_action('backlink', 1, 'li', 1),
38        'subscribe' => tpl_action('subscribe', 1, 'li', 1),
39        'revert'    => tpl_action('revert', 1, 'li', 1),
40        'top'       => tpl_action('top', 1, 'li', 1),
41    ));
42}
43
44function _tpl_detailtools() {
45    echo tpl_action('mediaManager', 1, 'li', 1);
46    echo tpl_action('img_backto', 1, 'li', 1);
47}
48