-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathclass.themehooks.php
More file actions
90 lines (84 loc) · 2.08 KB
/
class.themehooks.php
File metadata and controls
90 lines (84 loc) · 2.08 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php if (!defined('APPLICATION')) exit();
/**
* Bootstrap theme for Vanilla Forums
*
* @package Bootstrap
* @version 1.0.0
* @author Kasper K. Isager
* @copyright Copyright 2013 © Kasper K. Isager
* @license http://opensource.org/licenses/MIT MIT
*/
class BootstrapThemehooks implements Gdn_IPlugin
{
/**
* Set translation strings
*
* @package Bootstrap
* @since 1.0.0
* @access public
*/
public function Gdn_Dispatcher_BeforeDispatch_Handler($Sender)
{
// Breadcrumbs separator
Gdn::Locale()->SetTranslation('Breadcrumbs Crumb', '/');
// Pager buttons
Gdn::Locale()->SetTranslation('«', '«');
Gdn::Locale()->SetTranslation('»', '»');
}
/**
* Register stylesheets
*
* @package Bootstrap
* @since 1.0.0
* @access public
*/
public function AssetModel_StyleCss_Handler($Sender)
{
$Sender->AddCssFile('bootstrap.css');
}
/**
* Add Javascript
*
* @package Bootstrap
* @since 1.0.0
* @access public
*/
public function Base_Render_Before($Sender)
{
if (InSection('Dashboard')) return;
$Sender->AddJsFile('bootstrap-transition.js');
$Sender->AddJsFile('bootstrap-alert.js');
$Sender->AddJsFile('bootstrap-button.js');
$Sender->AddJsFile('bootstrap-carousel.js');
$Sender->AddJsFile('bootstrap-collapse.js');
$Sender->AddJsFile('bootstrap-dropdown.js');
$Sender->AddJsFile('bootstrap-modal.js');
$Sender->AddJsFile('bootstrap-tooltip.js');
$Sender->AddJsFile('bootstrap-popover.js');
$Sender->AddJsFile('bootstrap-scrollspy.js');
$Sender->AddJsFile('bootstrap-tab.js');
$Sender->AddJsFile('bootstrap-typeahead.js');
}
/**
* No setup required
*
* @package Bootstrap
* @since 1.0.0
* @access public
*/
public function Setup()
{
return TRUE;
}
/**
* No cleanup required
*
* @package Bootstrap
* @since 1.0.0
* @access public
*/
public function OnDisable()
{
return TRUE;
}
}