]>
Commit | Line | Data |
---|---|---|
92a62e1d VP |
1 | <?php |
2 | ||
3 | /** | |
4 | @title Live Map | |
5 | @author Valware | |
6 | @description View a world map showing how many connections you have from each country | |
7 | @contact valerie@valware.co.uk | |
8 | @version 1.0 | |
9 | @tested 0.9 | |
10 | @minver 0.9 | |
11 | @maxver * | |
12 | @license GPLv3 | |
13 | @icon https://cdn-icons-png.flaticon.com/512/235/235861.png | |
8b6570af | 14 | @screenshot https://i.ibb.co/0qXDNHv/image.png |
92a62e1d VP |
15 | */ |
16 | ||
17 | class live_map | |
18 | { | |
19 | /* You must specify these here for internal use | |
20 | * All of these are mandatory or your plugin will not work. | |
21 | */ | |
22 | public $name = "live_map"; // Name of your plugin | |
23 | public $author = "Valware"; // Name or handle of your lovely self | |
2eddbb7b | 24 | public $version = "1.1"; // Version of this plugin |
92a62e1d VP |
25 | public $description = "View a list of users who are live_mapd (requires third/live_map)"; // Description of your beautiful plugin |
26 | public $email = "v.a.pond@outlook.com"; // An email people can contact you with in case of problems | |
27 | ||
28 | /** This is run on plugin load. You can add hooks and initialize whatever databases | |
29 | * that you think you might need. | |
30 | */ | |
31 | function __construct() | |
32 | { | |
33 | /**The hook for the navigation bar. | |
34 | * The first argument is the HOOKTYPE we're using. In this case | |
35 | * we're using NAVBAR to add our page to the navigation bar. | |
36 | * For a full list of hooks, see this page: | |
37 | * https://github.com/unrealircd/unrealircd-webpanel/blob/main/Classes/class-hook.php | |
38 | * | |
39 | * The second argument references the function you want to include | |
40 | * in your hooked function. In this example we are referencing a | |
41 | * method (function) in this class (live_map) | |
42 | */ | |
43 | Hook::func(HOOKTYPE_NAVBAR, 'live_map::add_navbar'); | |
44 | } | |
45 | ||
46 | /** This is the method (function) that we have hooked. | |
47 | * Now we can do things. Make sure to check the relevant hooks | |
48 | * for the right variables to use. | |
49 | * We use variable reference (&) on this hook | |
50 | */ | |
51 | public static function add_navbar(&$pages) | |
52 | { | |
53 | $page_name = "Live Map"; | |
54 | $page_link = "plugins/live_map"; | |
0ba1efd3 | 55 | $pages["Tools"][$page_name] = ["script" => $page_link, "no_irc_server_required" => false]; |
92a62e1d VP |
56 | } |
57 | } |