]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - common.php
Update README.md
[irc/unrealircd/unrealircd-webpanel.git] / common.php
CommitLineData
e98b5a51
BM
1<?php
2define('UPATH', dirname(__FILE__));
3require_once "config.php";
55fd88eb 4require_once "Classes/class-hook.php";
c4f272ad
BM
5if (!is_dir(UPATH . "/vendor"))
6 die("The vendor/ directory is missing. Most likely the admin forgot to run 'composer install'\n");
e98b5a51
BM
7require_once UPATH . '/vendor/autoload.php';
8require_once "connection.php";
9require_once "Classes/class-log.php";
10require_once "Classes/class-message.php";
11require_once "Classes/class-rpc.php";
55fd88eb 12require_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
22Hook::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*/