|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* You may not change or alter any portion of this comment or credits |
|
4
|
|
|
* of supporting developers from this source code or any supporting source code |
|
5
|
|
|
* which is considered copyrighted (c) material of the original comment or credit authors. |
|
6
|
|
|
* |
|
7
|
|
|
* This program is distributed in the hope that it will be useful, |
|
8
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
9
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* SmallWorld |
|
14
|
|
|
* |
|
15
|
|
|
* @copyright The XOOPS Project (https://xoops.org) |
|
16
|
|
|
* @copyright 2011 Culex |
|
17
|
|
|
* @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/) |
|
18
|
|
|
* @package SmallWorld |
|
19
|
|
|
* @since 1.0 |
|
20
|
|
|
* @author Michael Albertsen (http://culex.dk) <[email protected]> |
|
21
|
|
|
*/ |
|
22
|
|
|
|
|
23
|
|
|
defined('XOOPS_ROOT_PATH') || die('Restricted access'); |
|
24
|
|
|
require_once XOOPS_ROOT_PATH . '/modules/smallworld/class/class_collector.php'; |
|
25
|
|
|
require_once XOOPS_ROOT_PATH . '/modules/smallworld/include/functions.php'; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* Class SmallworldCorePreload |
|
29
|
|
|
*/ |
|
30
|
|
|
class SmallworldCorePreload extends XoopsPreloadItem |
|
31
|
|
|
{ |
|
32
|
|
|
// to add PSR-4 autoloader |
|
33
|
|
|
/** |
|
34
|
|
|
* @param $args |
|
35
|
|
|
*/ |
|
36
|
|
|
public static function eventCoreIncludeCommonEnd($args) |
|
37
|
|
|
{ |
|
38
|
|
|
include __DIR__ . '/autoloader.php'; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
public static function eventCoreHeaderAddmeta() |
|
42
|
|
|
{ |
|
43
|
|
|
global $xoTheme, $xoopsUser, $xoopsConfig; |
|
44
|
|
|
//Load language if not defined |
|
45
|
|
|
smallworld_isDefinedLanguage('_SMALLWORLD_SYSERROR', 'main.php'); |
|
46
|
|
|
|
|
47
|
|
|
//$xoTheme->addScript("http://code.jquery.com/jquery-1.9.1.js"); |
|
48
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.min.js'); |
|
49
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jqueryui.min.js'); |
|
50
|
|
|
//$xoTheme->addScript("http://code.jquery.com/ui/1.10.2/jquery-ui.js"); |
|
51
|
|
|
$xoTheme->addStylesheet(XOOPS_URL . '/modules/smallworld/assets/css/base/jquery.ui.all.css'); |
|
52
|
|
|
$xoTheme->addStylesheet(XOOPS_URL . '/modules/smallworld/assets/css/smallworld.css'); |
|
53
|
|
|
|
|
54
|
|
|
//Get variables |
|
55
|
|
|
smallworld_SetCoreScript(); |
|
56
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/apprise-1.5.full.js'); |
|
57
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.oembed.js'); |
|
58
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.colorbox.js'); |
|
59
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.validate.js'); |
|
60
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.validation.functions.js'); |
|
61
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.stepy.js'); |
|
62
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.elastic.source.js'); |
|
63
|
|
|
$xoTheme->addStylesheet(XOOPS_URL . '/modules/smallworld/assets/css/smallworld.css'); |
|
64
|
|
|
|
|
65
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/jquery.countdown.js'); |
|
66
|
|
|
|
|
67
|
|
|
if (file_exists(XOOPS_ROOT_PATH . '/modules/smallworld/language/' . $xoopsConfig['language'] . '/js/jquery.ui.datepicker-language.js')) { |
|
68
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/language/' . $xoopsConfig['language'] . '/js/jquery.ui.datepicker-language.js'); |
|
69
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/language/' . $xoopsConfig['language'] . '/js/jquery.countdown.js'); |
|
70
|
|
|
} else { |
|
71
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/language/english/js/jquery.ui.datepicker-language.js'); |
|
72
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/language/english/js/jquery.countdown.js'); |
|
73
|
|
|
} |
|
74
|
|
|
$xoTheme->addScript(XOOPS_URL . '/modules/smallworld/assets/js/smallworld.js'); |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @return bool |
|
79
|
|
|
*/ |
|
80
|
|
|
// public function isActive() |
|
81
|
|
|
// { |
|
82
|
|
|
// $moduleHandler = xoops_getHandler('module'); |
|
83
|
|
|
// $module = $moduleHandler->getByDirname('smallworld'); |
|
84
|
|
|
// |
|
85
|
|
|
// return ($module && $module->getVar('isactive')) ? true : false; |
|
86
|
|
|
// } |
|
87
|
|
|
} |
|
88
|
|
|
|