-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCDNPickrrr.module.php
133 lines (111 loc) · 3.7 KB
/
CDNPickrrr.module.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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
#-------------------------------------------------------------------------
# Module: CDNPickrrr
# Version: 0.1 Goran Ilic
#
#-------------------------------------------------------------------------
# CMS - CMS Made Simple is (c) 2010 by Ted Kulp ([email protected])
# This project's homepage is: http://www.cmsmadesimple.org
# The module's homepage is: https://github.com/uniqu3/CDNPickrrr & http://dev.cmsmadesimple.org/projects/cdnpickrrr
#
#-------------------------------------------------------------------------
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Or read it online: http://www.gnu.org/licenses/licenses.html#GPL
#
#-------------------------------------------------------------------------
/**
* @author Goran Ilic
* @since 0.1
* @version 0.1
* @license GPL
**/
class CDNPickrrr extends CMSModule {
function GetName() {
return 'CDNPickrrr';
}
function GetFriendlyName() {
return $this->Lang('friendlyname');
}
function GetVersion() {
return '0.2';
}
function GetHelp() {
$this->smarty->assign('help_text', $this->Lang('help_text'));
return $this->ProcessTemplate('help.tpl');
}
function GetAuthor() {
return 'Goran Ilic';
}
function GetAuthorEmail() {
return '[email protected]';
}
function GetChangeLog() {
return $this->Lang('changelog');
}
function IsPluginModule() {
return false;
}
function HasAdmin() {
return true;
}
function GetAdminSection() {
return 'layout';
}
function GetAdminDescription() {
return $this->Lang('moddescription');
}
public function CheckAccess() {
return $this->CheckPermission('Use CDNPickrrr') || $this->CheckPermission('Modify Templates');
}
function VisibleToAdminUser() {
return $this->CheckAccess();
}
function GetDependencies() {
return array();
}
function MinimumCMSVersion() {
return "1.9";
}
function MaximumCMSVersion() {
return "1.11.9";
}
public function SetParameters() {
if (version_compare(CMS_VERSION, '1.10') < 0) {
$this->InitializeFrontend();
$this->InitializeAdmin();
}
}
public function GetHeaderHTML() {
$header = '
<link rel="stylesheet" type="text/css" href="' . $this->GetModuleURLPath() . '/lib/style/style.css" />
<script src="' . $this->GetModuleURLPath() . '/lib/scripts/ZeroClipboard.js" type="text/javascript" charset="utf-8"></script>
<script src="' . $this->GetModuleURLPath() . '/lib/scripts/functions.js" type="text/javascript" charset="utf-8"></script>
';
return $header;
}
public function LazyLoadAdmin() {
return true;
}
function InstallPostMessage() {
return $this->Lang('postinstall');
}
function UninstallPostMessage() {
return $this->Lang('postuninstall');
}
function UninstallPreMessage() {
return $this->Lang('really_uninstall');
}
} //end class
?>