]>
Commit | Line | Data |
---|---|---|
e98b5a51 BM |
1 | <?php |
2 | define('UPATH', dirname(__FILE__)); | |
3 | require_once "config.php"; | |
55fd88eb | 4 | require_once "Classes/class-hook.php"; |
c4f272ad BM |
5 | if (!is_dir(UPATH . "/vendor")) |
6 | die("The vendor/ directory is missing. Most likely the admin forgot to run 'composer install'\n"); | |
e98b5a51 BM |
7 | require_once UPATH . '/vendor/autoload.php'; |
8 | require_once "connection.php"; | |
9 | require_once "Classes/class-log.php"; | |
10 | require_once "Classes/class-message.php"; | |
11 | require_once "Classes/class-rpc.php"; | |
55fd88eb | 12 | require_once "plugins.php"; |
1e6ffd06 | 13 | |
7b1ba98c | 14 | $pages = Array("Overview" => "index.php", |
55fd88eb VP |
15 | "Users" => "users.php", |
16 | "Channels" => "channels.php", | |
17 | "Server Bans" => "tkl.php", | |
18 | "Spamfilter" => "spamfilter.php", | |
19 | "News" => "news.php"); | |
90dc8f2b VP |
20 | |
21 | ||
22 | Hook::run(HOOKTYPE_NAVBAR, $pages); | |
23 | ||
24 | /* Example to add new menu item: | |
90dc8f2b VP |
25 | * |
26 | * class MyPlugin | |
27 | * { | |
28 | * | |
55fd88eb VP |
29 | * function __construct() |
30 | * { | |
31 | * Hook::func(HOOKTYPE_NAVBAR, [$this, 'add_menu']) | |
32 | * } | |
90dc8f2b | 33 | * |
55fd88eb VP |
34 | * function add_menu(&$pages) // this should pass by reference (using the & prefix) |
35 | * { | |
36 | * $page_name = "My New Page"; | |
37 | * $page_link = "link/to/page.php"; | |
38 | * $pages[$page_name] = $page_link; | |
39 | * } | |
90dc8f2b VP |
40 | * } |
41 | */ |