1 |
efrain |
1 |
<?php
|
|
|
2 |
// This file is part of Moodle - http://moodle.org/
|
|
|
3 |
//
|
|
|
4 |
// Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
// it under the terms of the GNU General Public License as published by
|
|
|
6 |
// the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
// (at your option) any later version.
|
|
|
8 |
//
|
|
|
9 |
// Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
// GNU General Public License for more details.
|
|
|
13 |
//
|
|
|
14 |
// You should have received a copy of the GNU General Public License
|
|
|
15 |
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
|
|
|
17 |
/**
|
|
|
18 |
*
|
|
|
19 |
* @package theme_universe
|
|
|
20 |
* @copyright 2023 Marcin Czaja (https://rosea.io)
|
|
|
21 |
* @license Commercial https://themeforest.net/licenses
|
|
|
22 |
*
|
|
|
23 |
*/
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
defined('MOODLE_INTERNAL') || die();
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
$page = new admin_settingpage('theme_universe_settingsfooter', get_string( 'settingsfooter', 'theme_universe'));
|
|
|
30 |
|
|
|
31 |
$name = 'theme_universe/footerfw';
|
|
|
32 |
$title = get_string('footerfw', 'theme_universe');
|
|
|
33 |
$description = get_string('footerfw_desc', 'theme_universe');
|
|
|
34 |
$default = 0;
|
|
|
35 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
36 |
$page->add($setting);
|
|
|
37 |
|
|
|
38 |
$name = 'theme_universe/showfooterbuttons';
|
|
|
39 |
$title = get_string('showfooterbuttons', 'theme_universe');
|
|
|
40 |
$description = get_string('showfooterbuttons_desc', 'theme_universe');
|
|
|
41 |
$default = 1;
|
|
|
42 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
43 |
$page->add($setting);
|
|
|
44 |
|
|
|
45 |
$name = 'theme_universe/hfooterblocks';
|
|
|
46 |
$heading = get_string('hfooterblocks', 'theme_universe');
|
|
|
47 |
$title = get_string('hfooterblocks_desc', 'theme_universe');
|
|
|
48 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
|
|
49 |
$page->add($setting);
|
|
|
50 |
|
|
|
51 |
$name = 'theme_universe/footerblock1';
|
|
|
52 |
$title = get_string('footerblock1', 'theme_universe');
|
|
|
53 |
$description = get_string('footerblock1_desc', 'theme_universe');
|
|
|
54 |
$default = '<div class="row no-gutters text-sm-center text-md-left">
|
|
|
55 |
<div class="col-12 col-lg-5 pr-lg-5 mr-lg-5 my-sm-2 my-md-0">
|
|
|
56 |
<div class="d-flex justify-content-center justify-content-md-start">
|
|
|
57 |
<img src="https://assets.rosea.io/universe/demo/universe-logo-white.svg" width="66" height="40" class="img-fluid"/>
|
|
|
58 |
</div>
|
|
|
59 |
<h5 class="rui-footer-nav-title mt-3">universe</h5>
|
|
|
60 |
<p class="text-size-xs">
|
|
|
61 |
Powerful, fully responsive, and easy-to-use Moodle Theme.
|
|
|
62 |
Works with Moodle 4.1, 4.0.<br>
|
|
|
63 |
<a href="#" target="_blank" title="Documentation - Footer Customization">Theme Documentation</a>
|
|
|
64 |
</p>
|
|
|
65 |
<p class="text-size-xs">
|
|
|
66 |
Made in Poland
|
|
|
67 |
</p>
|
|
|
68 |
</div>
|
|
|
69 |
<div class="col-12 col-lg my-sm-2 my-md-0">
|
|
|
70 |
<h5 class="rui-footer-nav-title">Course</h5>
|
|
|
71 |
<ul class="rui-footer-nav-items list-unstyled mb-0">
|
|
|
72 |
<li> <a href="#" target="_blank" title="Standard Course View">Standard Layout</a> </li>
|
|
|
73 |
<li> <a href="#" target="_blank" title="Tab Layout">Tab Layout</a>
|
|
|
74 |
<span class="badge-xs badge-primary ml-2">Demo</span> </li>
|
|
|
75 |
<li> <a href="#" target="_blank">Format Plugins</a> </li>
|
|
|
76 |
<li> <a href="#">Paid Course (PayPal, etc.)</a> </li>
|
|
|
77 |
|
|
|
78 |
</ul>
|
|
|
79 |
</div>
|
|
|
80 |
<div class="col-12 col-lg mt-sm-4 mt-lg-0">
|
|
|
81 |
<h5 class="rui-footer-nav-title">UI Elements</h5>
|
|
|
82 |
<ul class="rui-footer-nav-items list-unstyled mb-0">
|
|
|
83 |
<li> <a href="#">Front Page Blocks</a> </li>
|
|
|
84 |
<li> <a href="#">Blocks - Header</a> </li>
|
|
|
85 |
<li> <a href="#">Blocks - Footer</a> </li>
|
|
|
86 |
<li> <a href="#">Grid Content</a> </li>
|
|
|
87 |
<li> <a href="#">List</a> </li>
|
|
|
88 |
<li> <a href="#">Team</a> </li>
|
|
|
89 |
<li> <a href="#">Stats</a> </li>
|
|
|
90 |
<li> <a href="#">FAQ</a> </li>
|
|
|
91 |
</ul>
|
|
|
92 |
</div>
|
|
|
93 |
<div class="col-12 col-lg mt-sm-4 mt-lg-0">
|
|
|
94 |
<h5 class="rui-footer-nav-title">More</h5>
|
|
|
95 |
<ul class="rui-footer-nav-items list-unstyled mb-0">
|
|
|
96 |
<li> <a href="#">Icons</a> </li>
|
|
|
97 |
<li> <a href="#">Plugins support</a> </li>
|
|
|
98 |
<li> <a href="https://rosea.gitbook.io/universe/" target="_blank" title="Theme Doc">Theme Doc</a> </li>
|
|
|
99 |
</ul>
|
|
|
100 |
</div>
|
|
|
101 |
</div>
|
|
|
102 |
<br />To edit this block go to: Site administration - Appearance - universe - Footer - Footer Block #1';
|
|
|
103 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
104 |
$page->add($setting);
|
|
|
105 |
|
|
|
106 |
$name = 'theme_universe/footerblock1hr';
|
|
|
107 |
$title = get_string('footerblock1hr', 'theme_universe');
|
|
|
108 |
$description = get_string('footerblock1hr_desc', 'theme_universe');
|
|
|
109 |
$default = '1';
|
|
|
110 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
111 |
$page->add($setting);
|
|
|
112 |
|
|
|
113 |
$name = 'theme_universe/footerblock2';
|
|
|
114 |
$title = get_string('footerblock2', 'theme_universe');
|
|
|
115 |
$description = get_string('footerblock2_desc', 'theme_universe');
|
|
|
116 |
$default = '';
|
|
|
117 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
118 |
$page->add($setting);
|
|
|
119 |
|
|
|
120 |
$name = 'theme_universe/footerblock2hr';
|
|
|
121 |
$title = get_string('footerblock2hr', 'theme_universe');
|
|
|
122 |
$description = get_string('footerblock2hr_desc', 'theme_universe');
|
|
|
123 |
$default = '1';
|
|
|
124 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
125 |
$page->add($setting);
|
|
|
126 |
|
|
|
127 |
$name = 'theme_universe/footerblock3';
|
|
|
128 |
$title = get_string('footerblock3', 'theme_universe');
|
|
|
129 |
$description = get_string('footerblock3_desc', 'theme_universe');
|
|
|
130 |
$default = 'To edit this block go to: Site administration - Appearance - universe - Footer - Footer Block #3
|
|
|
131 |
<small>Get this theme exclusively on ThemeForest. Check all available Moodle themes
|
|
|
132 |
<a href="https://rosea.io" class="underline--anim">rosea.io</a></small>';
|
|
|
133 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
134 |
$page->add($setting);
|
|
|
135 |
|
|
|
136 |
$name = 'theme_universe/footercopy';
|
|
|
137 |
$title = get_string('footercopy', 'theme_universe');
|
|
|
138 |
$description = get_string('footercopy_desc', 'theme_universe');
|
|
|
139 |
$default = '© <strong>2023</strong>
|
|
|
140 |
<br />To edit this block go to: Site administration - Appearance - universe - Footer - Footer Copy';
|
|
|
141 |
$setting = new universe_setting_confightmleditor($name, $title, $description, $default);
|
|
|
142 |
$page->add($setting);
|
|
|
143 |
|
|
|
144 |
$name = 'theme_universe/hfootercolors';
|
|
|
145 |
$heading = get_string('hfootercolors', 'theme_universe');
|
|
|
146 |
$title = get_string('hfootercolors_desc', 'theme_universe');
|
|
|
147 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
|
|
148 |
$page->add($setting);
|
|
|
149 |
|
|
|
150 |
$name = 'theme_universe/colorfooterbg';
|
|
|
151 |
$title = get_string('colorfooterbg', 'theme_universe');
|
|
|
152 |
$description = get_string('color_desc', 'theme_universe');
|
|
|
153 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
|
|
154 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
155 |
$page->add($setting);
|
|
|
156 |
|
|
|
157 |
$name = 'theme_universe/colorfooterborder';
|
|
|
158 |
$title = get_string('colorfooterborder', 'theme_universe');
|
|
|
159 |
$description = get_string('color_desc', 'theme_universe');
|
|
|
160 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
|
|
161 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
162 |
$page->add($setting);
|
|
|
163 |
|
|
|
164 |
$name = 'theme_universe/colorfootertext';
|
|
|
165 |
$title = get_string('colorfootertext', 'theme_universe');
|
|
|
166 |
$description = get_string('color_desc', 'theme_universe');
|
|
|
167 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
|
|
168 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
169 |
$page->add($setting);
|
|
|
170 |
|
|
|
171 |
$name = 'theme_universe/colorfooterlink';
|
|
|
172 |
$title = get_string('colorfooterlink', 'theme_universe');
|
|
|
173 |
$description = get_string('color_desc', 'theme_universe');
|
|
|
174 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
|
|
175 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
176 |
$page->add($setting);
|
|
|
177 |
|
|
|
178 |
$name = 'theme_universe/colorfooterlinkhover';
|
|
|
179 |
$title = get_string('colorfooterlinkhover', 'theme_universe');
|
|
|
180 |
$description = get_string('color_desc', 'theme_universe');
|
|
|
181 |
$setting = new admin_setting_configcolourpicker($name, $title, $description, '');
|
|
|
182 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
183 |
$page->add($setting);
|
|
|
184 |
|
|
|
185 |
$fileid = 'footerbgimg';
|
|
|
186 |
$name = 'theme_universe/footerbgimg';
|
|
|
187 |
$title = get_string('footerbgimg', 'theme_universe');
|
|
|
188 |
$description = get_string('footerbgimg_desc', 'theme_universe');
|
|
|
189 |
$opts = array('accepted_types' => array('.png', '.jpg', '.gif', '.webp', '.tiff', '.svg'), 'maxfiles' => 1);
|
|
|
190 |
$setting = new admin_setting_configstoredfile($name, $title, $description, $fileid, 0, $opts);
|
|
|
191 |
$setting->set_updatedcallback('theme_reset_all_caches');
|
|
|
192 |
$page->add($setting);
|
|
|
193 |
|
|
|
194 |
$name = 'theme_universe/footercustomcss';
|
|
|
195 |
$title = get_string('footercustomcss', 'theme_universe');
|
|
|
196 |
$description = get_string('blockcustomcss_desc', 'theme_universe');
|
|
|
197 |
$default = '';
|
|
|
198 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
199 |
$page->add($setting);
|
|
|
200 |
|
|
|
201 |
|
|
|
202 |
$name = 'theme_universe/hfootersocial';
|
|
|
203 |
$heading = get_string('hfootersocial', 'theme_universe');
|
|
|
204 |
$title = get_string('hfootersocial_desc', 'theme_universe');
|
|
|
205 |
$setting = new admin_setting_heading($name, $heading, format_text($title, FORMAT_MARKDOWN));
|
|
|
206 |
$page->add($setting);
|
|
|
207 |
|
|
|
208 |
$name = 'theme_universe/showbasicinfolist';
|
|
|
209 |
$title = get_string('showbasicinfolist', 'theme_universe');
|
|
|
210 |
$description = get_string('showbasicinfolist_desc', 'theme_universe');
|
|
|
211 |
$default = '0';
|
|
|
212 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
213 |
$page->add($setting);
|
|
|
214 |
|
|
|
215 |
// Website.
|
|
|
216 |
$name = 'theme_universe/website';
|
|
|
217 |
$title = get_string('website', 'theme_universe');
|
|
|
218 |
$description = get_string('website_desc', 'theme_universe');
|
|
|
219 |
$default = 'Moodle Themes';
|
|
|
220 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
221 |
$page->add($setting);
|
|
|
222 |
|
|
|
223 |
// Website.
|
|
|
224 |
$name = 'theme_universe/cwebsiteurl';
|
|
|
225 |
$title = get_string('cwebsiteurl', 'theme_universe');
|
|
|
226 |
$description = get_string('cwebsiteurl_desc', 'theme_universe');
|
|
|
227 |
$default = 'https://rosea.io';
|
|
|
228 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
229 |
$page->add($setting);
|
|
|
230 |
|
|
|
231 |
// Mobile.
|
|
|
232 |
$name = 'theme_universe/mobile';
|
|
|
233 |
$title = get_string('mobile', 'theme_universe');
|
|
|
234 |
$description = get_string('mobile_desc', 'theme_universe');
|
|
|
235 |
$default = 'Mobile : +12 (34) 00123-45678';
|
|
|
236 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
237 |
$page->add($setting);
|
|
|
238 |
|
|
|
239 |
// Mail.
|
|
|
240 |
$name = 'theme_universe/mail';
|
|
|
241 |
$title = get_string('mail', 'theme_universe');
|
|
|
242 |
$description = get_string('mail_desc', 'theme_universe');
|
|
|
243 |
$default = 'sample@mail.com';
|
|
|
244 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
245 |
$page->add($setting);
|
|
|
246 |
|
|
|
247 |
$name = 'theme_universe/showsociallist';
|
|
|
248 |
$title = get_string('showsociallist', 'theme_universe');
|
|
|
249 |
$description = get_string('showsociallist_desc', 'theme_universe');
|
|
|
250 |
$default = '0';
|
|
|
251 |
$setting = new admin_setting_configcheckbox($name, $title, $description, $default);
|
|
|
252 |
$page->add($setting);
|
|
|
253 |
|
|
|
254 |
// Facebook url setting.
|
|
|
255 |
$name = 'theme_universe/facebook';
|
|
|
256 |
$title = get_string('facebook', 'theme_universe');
|
|
|
257 |
$description = get_string('facebook_desc', 'theme_universe');
|
|
|
258 |
$default = '';
|
|
|
259 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
260 |
$page->add($setting);
|
|
|
261 |
|
|
|
262 |
// Twitter url setting.
|
|
|
263 |
$name = 'theme_universe/twitter';
|
|
|
264 |
$title = get_string('twitter', 'theme_universe');
|
|
|
265 |
$description = get_string('twitter_desc', 'theme_universe');
|
|
|
266 |
$default = '';
|
|
|
267 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
268 |
$page->add($setting);
|
|
|
269 |
|
|
|
270 |
// Linkdin url setting.
|
|
|
271 |
$name = 'theme_universe/linkedin';
|
|
|
272 |
$title = get_string('linkedin', 'theme_universe');
|
|
|
273 |
$description = get_string('linkedin_desc', 'theme_universe');
|
|
|
274 |
$default = '';
|
|
|
275 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
276 |
$page->add($setting);
|
|
|
277 |
|
|
|
278 |
// Youtube url setting.
|
|
|
279 |
$name = 'theme_universe/youtube';
|
|
|
280 |
$title = get_string('youtube', 'theme_universe');
|
|
|
281 |
$description = get_string('youtube_desc', 'theme_universe');
|
|
|
282 |
$default = '';
|
|
|
283 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
284 |
$page->add($setting);
|
|
|
285 |
|
|
|
286 |
// Instagram url setting.
|
|
|
287 |
$name = 'theme_universe/instagram';
|
|
|
288 |
$title = get_string('instagram', 'theme_universe');
|
|
|
289 |
$description = get_string('instagram_desc', 'theme_universe');
|
|
|
290 |
$default = '';
|
|
|
291 |
$setting = new admin_setting_configtext($name, $title, $description, $default);
|
|
|
292 |
$page->add($setting);
|
|
|
293 |
|
|
|
294 |
// Cutsom icons setting.
|
|
|
295 |
$name = 'theme_universe/customsocialicon';
|
|
|
296 |
$title = get_string('customsocialicon', 'theme_universe');
|
|
|
297 |
$description = get_string('customsocialicon_desc', 'theme_universe');
|
|
|
298 |
$default = '';
|
|
|
299 |
$setting = new admin_setting_configtextarea($name, $title, $description, $default);
|
|
|
300 |
$page->add($setting);
|
|
|
301 |
|
|
|
302 |
// Must add the page after definiting all the settings!
|
|
|
303 |
$settings->add($page);
|