/
start.php
41 lines (32 loc) · 1.26 KB
/
start.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
<?php
/**
* Prototyper UI
*
* @author Ismayil Khayredinov <info@hypejunction.com>
*/
$path = __DIR__;
if (file_exists("{$path}vendor/autoload.php")) {
require_once "{$path}vendor/autoload.php";
}
elgg_register_event_handler('init', 'system', 'prototyper_ui_init');
/**
* Init
* @return void
*/
function prototyper_ui_init() {
elgg_extend_view('css/elgg', 'css/framework/prototyper/ui/stylesheet');
if (\hypeJunction\Integration::isElggVersionBelow('1.9.0')) {
elgg_register_simplecache_view('js/framework/legacy/prototyper_ui');
elgg_register_js('prototyper_ui', elgg_get_simplecache_url('js', 'framework/legacy/prototyper_ui'), 'footer');
elgg_register_js('jquery.cropper', '/mod/hypePrototyperUI/vendors/jquery.cropper/cropper.min.js', 'footer');
elgg_register_simplecache_view('js/framework/legacy/prototyper_cropper');
elgg_register_js('prototyper_cropper', elgg_get_simplecache_url('js', 'framework/legacy/prototyper_cropper'), 'footer');
} else {
elgg_define_js('cropper', array(
'src' => '/mod/hypePrototyperUI/vendors/jquery.cropper/cropper.min.js',
'deps' => array('jquery'),
));
}
elgg_register_css('jquery.cropper', '/mod/hypePrototyperUI/vendors/jquery.cropper/cropper.min.css');
elgg_extend_view('input/file', 'prototyper/ui/cropper');
}