-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPluginXmas.class.php
50 lines (39 loc) · 1.39 KB
/
PluginXmas.class.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
<?php
/*---------------------------------------------------------------------------
* @Project: Alto CMS
* @Project URI: http://altocms.com
* @Description: Advanced Community Engine
* @Copyright: Alto CMS Team
* @License: GNU GPL v2 & MIT
*----------------------------------------------------------------------------
*/
//Запрещаем напрямую обращение к этому файлу
if (!class_exists('Plugin')) {
die('');
}
class PluginXmas extends Plugin {
// Активация плагина
public function Activate() {
return true;
}
// Деактивация плагина
public function Deactivate() {
return true;
}
public function Init() {
$aParams = array(
'dir_from' => Plugin::GetTemplateDir(__CLASS__) . 'assets/',
);
$this->Viewer_AppendStyle(Plugin::GetTemplateDir(__CLASS__) . 'assets/css/xmas.css', $aParams);
$this->Viewer_AppendScript(Plugin::GetTemplateDir(__CLASS__) . 'assets/js/snowfall.jquery.js', $aParams);
$aParams = array(
'dir_from' => Plugin::GetTemplateDir(__CLASS__) . 'assets/',
'prepare' => true,
'compress' => false,
'merge' => false,
'name' => 'xmas.js',
);
$this->Viewer_AppendScript(Plugin::GetTemplateDir(__CLASS__) . 'assets/js/xmas.js', $aParams);
}
}
// EOF