Documenation
Dashboard
/_plugins/dashboard.php
The dashboard provides easy access to administrative pages and displays details about your Swiftlet installation.
The dashboard can be accessed at /admin/dashboard/.
This plugin comes with an additional hook for other plugins to hook into.
Example
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
if ( !isset($model) ) die('Direct access to this file is not allowed');
switch ( $hook )
{
case 'info':
$info = array(
'name' => 'example',
'version' => '1.0.0',
'compatible' => array('from' => '1.2.0', 'to' => '1.2.*'),
'hooks' => array('dashboard' => 1)
);
break;
case 'dashboard':
$params[] = array(
'name' => 'Example',
'description' => 'Example page',
'group' => 'Examples',
'path' => 'admin/example/',
'perm' => 'admin example access'
);
break;
}
?>
To add a link to the dashboard, use the dashboard hook with the following parameters:
-
name
The name of link as shown on the dashboard. -
description
A brief description of the link, ideally not more than a few words. -
group
Links using the same group name a grouped together. -
path
Path of the link, relative to the root of the website. -
perm
Links will only be shown if the user has the right permission.