-
Notifications
You must be signed in to change notification settings - Fork 0
/
SocialButtons.php
51 lines (40 loc) · 1.23 KB
/
SocialButtons.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
class SocialButtonsPlugin extends MantisPlugin {
function register() {
$this->name = lang_get( 'plugin_social_title' );
$this->description = lang_get( 'plugin_social_description' );
$this->page = 'config';
$this->version = '1.0';
$this->requires = array(
'MantisCore' => '2.0.0',
);
$this->author = 'Alexis POKORSKI';
$this->contact = '';
$this->url = '';
}
/**
* Event hook declaration.
* @return array
*/
function hooks(){
return array(
"EVENT_LAYOUT_RESOURCES" => 'ressources',
"EVENT_LAYOUT_PAGE_FOOTER" => 'redirect'
);
}
function config(){
return array(
'facebook_url' => 'Your Facebook link',
'twitter_url' => 'Your Twitter link',
'linkedin_url' => 'Your Linkedin link',
'youtube_url' => 'Your Youtube link',
'website_url' => 'Your Website link'
);
}
function ressources(){
return '<link rel="stylesheet" type="text/css" href="'.plugin_file("socialStyle.css").'"/>';
}
function redirect(){
include('pages/printSocialButtons.php');
}
}