@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $pathLanguage = $path . $pathModuleAdmin; |
20 | 20 | |
21 | 21 | if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { |
22 | - $fileinc = $pathLanguage . '/language/english/main.php'; |
|
22 | + $fileinc = $pathLanguage . '/language/english/main.php'; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | include_once $fileinc; |
@@ -60,43 +60,43 @@ discard block |
||
60 | 60 | //--------------------------------- |
61 | 61 | |
62 | 62 | if (!defined('SMARTOBJECT_ROOT_PATH')) { |
63 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
|
63 | + include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | $smartobjectConfig = smart_getModuleConfig('smartobject'); |
67 | 67 | |
68 | 68 | if (isset($smartobjectConfig['enable_currencyman']) && $smartobjectConfig['enable_currencyman'] == true) { |
69 | - ++$i; |
|
70 | - $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES; |
|
71 | - $adminmenu[$i]['link'] = 'admin/currency.php'; |
|
72 | - $adminmenu[$i]['icon'] = $pathIcon32 . '/cash_stack.png'; |
|
69 | + ++$i; |
|
70 | + $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES; |
|
71 | + $adminmenu[$i]['link'] = 'admin/currency.php'; |
|
72 | + $adminmenu[$i]['icon'] = $pathIcon32 . '/cash_stack.png'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | global $xoopsModule; |
76 | 76 | if (isset($xoopsModule)) { |
77 | - // $i = -1; |
|
78 | - |
|
79 | - // --- for XCL --- |
|
80 | - // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
|
81 | - $mid = $xoopsModule->getVar('mid'); |
|
82 | - if (defined('XOOPS_CUBE_LEGACY')) { |
|
83 | - $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
84 | - } else { |
|
85 | - $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
86 | - } |
|
87 | - $headermenu[$i]['link'] = $link_pref; |
|
88 | - // ----- |
|
89 | - |
|
90 | - // --- for XCL --- |
|
91 | - // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
|
92 | - $dirname = $xoopsModule->getVar('dirname'); |
|
93 | - if (defined('XOOPS_CUBE_LEGACY')) { |
|
94 | - $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
95 | - } else { |
|
96 | - $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
97 | - } |
|
98 | - $headermenu[$i]['link'] = $link_module; |
|
99 | - // ----- |
|
100 | - |
|
101 | - ++$i; |
|
77 | + // $i = -1; |
|
78 | + |
|
79 | + // --- for XCL --- |
|
80 | + // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
|
81 | + $mid = $xoopsModule->getVar('mid'); |
|
82 | + if (defined('XOOPS_CUBE_LEGACY')) { |
|
83 | + $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
84 | + } else { |
|
85 | + $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
86 | + } |
|
87 | + $headermenu[$i]['link'] = $link_pref; |
|
88 | + // ----- |
|
89 | + |
|
90 | + // --- for XCL --- |
|
91 | + // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
|
92 | + $dirname = $xoopsModule->getVar('dirname'); |
|
93 | + if (defined('XOOPS_CUBE_LEGACY')) { |
|
94 | + $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
95 | + } else { |
|
96 | + $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
97 | + } |
|
98 | + $headermenu[$i]['link'] = $link_module; |
|
99 | + // ----- |
|
100 | + |
|
101 | + ++$i; |
|
102 | 102 | } |
@@ -9,17 +9,17 @@ discard block |
||
9 | 9 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
10 | 10 | |
11 | 11 | $path = dirname(dirname(dirname(__DIR__))); |
12 | -include_once $path . '/mainfile.php'; |
|
12 | +include_once $path.'/mainfile.php'; |
|
13 | 13 | |
14 | 14 | $dirname = basename(dirname(__DIR__)); |
15 | 15 | $moduleHandler = xoops_getHandler('module'); |
16 | 16 | $module = $moduleHandler->getByDirname($dirname); |
17 | 17 | $pathIcon32 = $module->getInfo('icons32'); |
18 | 18 | $pathModuleAdmin = $module->getInfo('dirmoduleadmin'); |
19 | -$pathLanguage = $path . $pathModuleAdmin; |
|
19 | +$pathLanguage = $path.$pathModuleAdmin; |
|
20 | 20 | |
21 | -if (!file_exists($fileinc = $pathLanguage . '/language/' . $GLOBALS['xoopsConfig']['language'] . '/' . 'main.php')) { |
|
22 | - $fileinc = $pathLanguage . '/language/english/main.php'; |
|
21 | +if (!file_exists($fileinc = $pathLanguage.'/language/'.$GLOBALS['xoopsConfig']['language'].'/'.'main.php')) { |
|
22 | + $fileinc = $pathLanguage.'/language/english/main.php'; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | include_once $fileinc; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $i = 0; |
29 | 29 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME; |
30 | 30 | $adminmenu[$i]['link'] = 'admin/index.php'; |
31 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/home.png'; |
|
31 | +$adminmenu[$i]['icon'] = $pathIcon32.'/home.png'; |
|
32 | 32 | //++$i; |
33 | 33 | //$adminmenu[$i]['title'] = _MI_SOBJECT_INDEX; |
34 | 34 | //$adminmenu[$i]['link'] = "admin/main.php"; |
@@ -37,30 +37,30 @@ discard block |
||
37 | 37 | ++$i; |
38 | 38 | $adminmenu[$i]['title'] = _MI_SOBJECT_SENT_LINKS; |
39 | 39 | $adminmenu[$i]['link'] = 'admin/link.php'; |
40 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/addlink.png'; |
|
40 | +$adminmenu[$i]['icon'] = $pathIcon32.'/addlink.png'; |
|
41 | 41 | |
42 | 42 | ++$i; |
43 | 43 | $adminmenu[$i]['title'] = _MI_SOBJECT_TAGS; |
44 | 44 | $adminmenu[$i]['link'] = 'admin/customtag.php'; |
45 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/identity.png'; |
|
45 | +$adminmenu[$i]['icon'] = $pathIcon32.'/identity.png'; |
|
46 | 46 | |
47 | 47 | ++$i; |
48 | 48 | $adminmenu[$i]['title'] = _MI_SOBJECT_ADSENSES; |
49 | 49 | $adminmenu[$i]['link'] = 'admin/adsense.php'; |
50 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/alert.png'; |
|
50 | +$adminmenu[$i]['icon'] = $pathIcon32.'/alert.png'; |
|
51 | 51 | ++$i; |
52 | 52 | $adminmenu[$i]['title'] = _MI_SOBJECT_RATINGS; |
53 | 53 | $adminmenu[$i]['link'] = 'admin/rating.php'; |
54 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/stats.png'; |
|
54 | +$adminmenu[$i]['icon'] = $pathIcon32.'/stats.png'; |
|
55 | 55 | |
56 | 56 | ++$i; |
57 | 57 | $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT; |
58 | 58 | $adminmenu[$i]['link'] = 'admin/about.php'; |
59 | -$adminmenu[$i]['icon'] = $pathIcon32 . '/about.png'; |
|
59 | +$adminmenu[$i]['icon'] = $pathIcon32.'/about.png'; |
|
60 | 60 | //--------------------------------- |
61 | 61 | |
62 | 62 | if (!defined('SMARTOBJECT_ROOT_PATH')) { |
63 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
|
63 | + include_once XOOPS_ROOT_PATH.'/modules/smartobject/include/functions.php'; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | $smartobjectConfig = smart_getModuleConfig('smartobject'); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ++$i; |
70 | 70 | $adminmenu[$i]['title'] = _MI_SOBJECT_CURRENCIES; |
71 | 71 | $adminmenu[$i]['link'] = 'admin/currency.php'; |
72 | - $adminmenu[$i]['icon'] = $pathIcon32 . '/cash_stack.png'; |
|
72 | + $adminmenu[$i]['icon'] = $pathIcon32.'/cash_stack.png'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | global $xoopsModule; |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | // $headermenu[$i]['link'] = '../../system/admin.php?fct=preferences&op=showmod&mod=' . $xoopsModule->getVar('mid'); |
81 | 81 | $mid = $xoopsModule->getVar('mid'); |
82 | 82 | if (defined('XOOPS_CUBE_LEGACY')) { |
83 | - $link_pref = XOOPS_URL . '/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id=' . $mid; |
|
83 | + $link_pref = XOOPS_URL.'/modules/legacy/admin/index.php?action=PreferenceEdit&confmod_id='.$mid; |
|
84 | 84 | } else { |
85 | - $link_pref = XOOPS_URL . '/modules/system/admin.php?fct=preferences&op=showmod&mod=' . $mid; |
|
85 | + $link_pref = XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$mid; |
|
86 | 86 | } |
87 | 87 | $headermenu[$i]['link'] = $link_pref; |
88 | 88 | // ----- |
@@ -91,9 +91,9 @@ discard block |
||
91 | 91 | // $headermenu[$i]['link'] = XOOPS_URL . "/modules/system/admin.php?fct=modulesadmin&op=update&module=" . $xoopsModule->getVar('dirname'); |
92 | 92 | $dirname = $xoopsModule->getVar('dirname'); |
93 | 93 | if (defined('XOOPS_CUBE_LEGACY')) { |
94 | - $link_module = XOOPS_URL . '/modules/legacy/admin/index.php?action=ModuleUpdate&dirname=' . $dirname; |
|
94 | + $link_module = XOOPS_URL.'/modules/legacy/admin/index.php?action=ModuleUpdate&dirname='.$dirname; |
|
95 | 95 | } else { |
96 | - $link_module = XOOPS_URL . '/modules/system/admin.php?fct=modulesadmin&op=update&module=' . $dirname; |
|
96 | + $link_module = XOOPS_URL.'/modules/system/admin.php?fct=modulesadmin&op=update&module='.$dirname; |
|
97 | 97 | } |
98 | 98 | $headermenu[$i]['link'] = $link_module; |
99 | 99 | // ----- |
@@ -9,66 +9,66 @@ |
||
9 | 9 | |
10 | 10 | class SmartAddto |
11 | 11 | { |
12 | - public $_layout; |
|
13 | - public $_method; |
|
12 | + public $_layout; |
|
13 | + public $_method; |
|
14 | 14 | |
15 | - /** |
|
16 | - * Constructor of SmartAddTo |
|
17 | - * |
|
18 | - * @param int $layout 0=Horizontal 1 row, 1=Horizontal 2 rows, 2=Vertical with icons, 3=Vertical no icons |
|
19 | - * @param int $method 0=directpage, 1=popup |
|
20 | - */ |
|
21 | - public function __construct($layout = 0, $method = 1) |
|
22 | - { |
|
23 | - $layout = (int)$layout; |
|
24 | - if ($layout < 0 || $layout > 3) { |
|
25 | - $layout = 0; |
|
26 | - } |
|
27 | - $this->_layout = $layout; |
|
15 | + /** |
|
16 | + * Constructor of SmartAddTo |
|
17 | + * |
|
18 | + * @param int $layout 0=Horizontal 1 row, 1=Horizontal 2 rows, 2=Vertical with icons, 3=Vertical no icons |
|
19 | + * @param int $method 0=directpage, 1=popup |
|
20 | + */ |
|
21 | + public function __construct($layout = 0, $method = 1) |
|
22 | + { |
|
23 | + $layout = (int)$layout; |
|
24 | + if ($layout < 0 || $layout > 3) { |
|
25 | + $layout = 0; |
|
26 | + } |
|
27 | + $this->_layout = $layout; |
|
28 | 28 | |
29 | - $method = (int)$method; |
|
30 | - if ($method < 0 || $method > 1) { |
|
31 | - $method = 1; |
|
32 | - } |
|
33 | - $this->_method = $method; |
|
34 | - } |
|
29 | + $method = (int)$method; |
|
30 | + if ($method < 0 || $method > 1) { |
|
31 | + $method = 1; |
|
32 | + } |
|
33 | + $this->_method = $method; |
|
34 | + } |
|
35 | 35 | |
36 | - /** |
|
37 | - * @param bool $fetchOnly |
|
38 | - * @return mixed|string|void |
|
39 | - */ |
|
40 | - public function render($fetchOnly = false) |
|
41 | - { |
|
42 | - global $xoTheme, $xoopsTpl; |
|
36 | + /** |
|
37 | + * @param bool $fetchOnly |
|
38 | + * @return mixed|string|void |
|
39 | + */ |
|
40 | + public function render($fetchOnly = false) |
|
41 | + { |
|
42 | + global $xoTheme, $xoopsTpl; |
|
43 | 43 | |
44 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
44 | + $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
45 | 45 | |
46 | - $xoopsTpl->assign('smartobject_addto_method', $this->_method); |
|
47 | - $xoopsTpl->assign('smartobject_addto_layout', $this->_layout); |
|
46 | + $xoopsTpl->assign('smartobject_addto_method', $this->_method); |
|
47 | + $xoopsTpl->assign('smartobject_addto_layout', $this->_layout); |
|
48 | 48 | |
49 | - $xoopsTpl->assign('smartobject_addto_url', SMARTOBJECT_URL . 'include/addto/'); |
|
49 | + $xoopsTpl->assign('smartobject_addto_url', SMARTOBJECT_URL . 'include/addto/'); |
|
50 | 50 | |
51 | - if ($fetchOnly) { |
|
52 | - return $xoopsTpl->fetch('db:smartobject_addto.tpl'); |
|
53 | - } else { |
|
54 | - $xoopsTpl->display('db:smartobject_addto.tpl'); |
|
55 | - } |
|
56 | - } |
|
51 | + if ($fetchOnly) { |
|
52 | + return $xoopsTpl->fetch('db:smartobject_addto.tpl'); |
|
53 | + } else { |
|
54 | + $xoopsTpl->display('db:smartobject_addto.tpl'); |
|
55 | + } |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * @return array |
|
60 | - */ |
|
61 | - public function renderForBlock() |
|
62 | - { |
|
63 | - global $xoTheme; |
|
58 | + /** |
|
59 | + * @return array |
|
60 | + */ |
|
61 | + public function renderForBlock() |
|
62 | + { |
|
63 | + global $xoTheme; |
|
64 | 64 | |
65 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
65 | + $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
66 | 66 | |
67 | - $block = array(); |
|
68 | - $block['smartobject_addto_method'] = $this->_method; |
|
69 | - $block['smartobject_addto_layout'] = $this->_layout; |
|
70 | - $block['smartobject_addto_url'] = SMARTOBJECT_URL . 'include/addto/'; |
|
67 | + $block = array(); |
|
68 | + $block['smartobject_addto_method'] = $this->_method; |
|
69 | + $block['smartobject_addto_layout'] = $this->_layout; |
|
70 | + $block['smartobject_addto_url'] = SMARTOBJECT_URL . 'include/addto/'; |
|
71 | 71 | |
72 | - return $block; |
|
73 | - } |
|
72 | + return $block; |
|
73 | + } |
|
74 | 74 | } |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function __construct($layout = 0, $method = 1) |
22 | 22 | { |
23 | - $layout = (int)$layout; |
|
23 | + $layout = (int) $layout; |
|
24 | 24 | if ($layout < 0 || $layout > 3) { |
25 | 25 | $layout = 0; |
26 | 26 | } |
27 | 27 | $this->_layout = $layout; |
28 | 28 | |
29 | - $method = (int)$method; |
|
29 | + $method = (int) $method; |
|
30 | 30 | if ($method < 0 || $method > 1) { |
31 | 31 | $method = 1; |
32 | 32 | } |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | { |
42 | 42 | global $xoTheme, $xoopsTpl; |
43 | 43 | |
44 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
44 | + $xoTheme->addStylesheet(SMARTOBJECT_URL.'include/addto/addto.css'); |
|
45 | 45 | |
46 | 46 | $xoopsTpl->assign('smartobject_addto_method', $this->_method); |
47 | 47 | $xoopsTpl->assign('smartobject_addto_layout', $this->_layout); |
48 | 48 | |
49 | - $xoopsTpl->assign('smartobject_addto_url', SMARTOBJECT_URL . 'include/addto/'); |
|
49 | + $xoopsTpl->assign('smartobject_addto_url', SMARTOBJECT_URL.'include/addto/'); |
|
50 | 50 | |
51 | 51 | if ($fetchOnly) { |
52 | 52 | return $xoopsTpl->fetch('db:smartobject_addto.tpl'); |
@@ -62,12 +62,12 @@ discard block |
||
62 | 62 | { |
63 | 63 | global $xoTheme; |
64 | 64 | |
65 | - $xoTheme->addStylesheet(SMARTOBJECT_URL . 'include/addto/addto.css'); |
|
65 | + $xoTheme->addStylesheet(SMARTOBJECT_URL.'include/addto/addto.css'); |
|
66 | 66 | |
67 | 67 | $block = array(); |
68 | 68 | $block['smartobject_addto_method'] = $this->_method; |
69 | 69 | $block['smartobject_addto_layout'] = $this->_layout; |
70 | - $block['smartobject_addto_url'] = SMARTOBJECT_URL . 'include/addto/'; |
|
70 | + $block['smartobject_addto_url'] = SMARTOBJECT_URL.'include/addto/'; |
|
71 | 71 | |
72 | 72 | return $block; |
73 | 73 | } |
@@ -10,45 +10,45 @@ |
||
10 | 10 | |
11 | 11 | class SmartTip |
12 | 12 | { |
13 | - public $id; |
|
14 | - public $caption; |
|
15 | - public $message; |
|
16 | - public $visible; |
|
17 | - public $_tpl; |
|
13 | + public $id; |
|
14 | + public $caption; |
|
15 | + public $message; |
|
16 | + public $visible; |
|
17 | + public $_tpl; |
|
18 | 18 | |
19 | - /** |
|
20 | - * SmartTip constructor. |
|
21 | - * @param $id |
|
22 | - * @param $caption |
|
23 | - * @param $message |
|
24 | - * @param bool $visible |
|
25 | - */ |
|
26 | - public function __construct($id, $caption, $message, $visible = false) |
|
27 | - { |
|
28 | - $this->id = $id; |
|
29 | - $this->caption = $caption; |
|
30 | - $this->message = $message; |
|
31 | - $this->visible = $visible; |
|
32 | - $this->_tpl = new XoopsTpl(); |
|
33 | - } |
|
19 | + /** |
|
20 | + * SmartTip constructor. |
|
21 | + * @param $id |
|
22 | + * @param $caption |
|
23 | + * @param $message |
|
24 | + * @param bool $visible |
|
25 | + */ |
|
26 | + public function __construct($id, $caption, $message, $visible = false) |
|
27 | + { |
|
28 | + $this->id = $id; |
|
29 | + $this->caption = $caption; |
|
30 | + $this->message = $message; |
|
31 | + $this->visible = $visible; |
|
32 | + $this->_tpl = new XoopsTpl(); |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * @param bool $outputNow |
|
37 | - * @return mixed|string|void |
|
38 | - */ |
|
39 | - public function render($outputNow = true) |
|
40 | - { |
|
41 | - $aTip = array( |
|
42 | - 'id' => $this->id, |
|
43 | - 'caption' => $this->caption, |
|
44 | - 'message' => $this->message, |
|
45 | - 'visible' => $this->visible ? 'block' : 'none' |
|
46 | - ); |
|
47 | - $this->_tpl->assign('tip', $aTip); |
|
48 | - if ($outputNow) { |
|
49 | - $this->_tpl->display('db:smartobject_tip.tpl'); |
|
50 | - } else { |
|
51 | - return $this->_tpl->fetch('db:smartobject_tip.tpl'); |
|
52 | - } |
|
53 | - } |
|
35 | + /** |
|
36 | + * @param bool $outputNow |
|
37 | + * @return mixed|string|void |
|
38 | + */ |
|
39 | + public function render($outputNow = true) |
|
40 | + { |
|
41 | + $aTip = array( |
|
42 | + 'id' => $this->id, |
|
43 | + 'caption' => $this->caption, |
|
44 | + 'message' => $this->message, |
|
45 | + 'visible' => $this->visible ? 'block' : 'none' |
|
46 | + ); |
|
47 | + $this->_tpl->assign('tip', $aTip); |
|
48 | + if ($outputNow) { |
|
49 | + $this->_tpl->display('db:smartobject_tip.tpl'); |
|
50 | + } else { |
|
51 | + return $this->_tpl->fetch('db:smartobject_tip.tpl'); |
|
52 | + } |
|
53 | + } |
|
54 | 54 | } |
@@ -9,17 +9,17 @@ |
||
9 | 9 | */ |
10 | 10 | class SmartObjectTree extends XoopsObjectTree |
11 | 11 | { |
12 | - public function _initialize() |
|
13 | - { |
|
14 | - foreach (array_keys($this->_objects) as $i) { |
|
15 | - $key1 = $this->_objects[$i]->getVar($this->_myId); |
|
16 | - $this->_tree[$key1]['obj'] = $this->_objects[$i]; |
|
17 | - $key2 = $this->_objects[$i]->getVar($this->_parentId, 'e'); |
|
18 | - $this->_tree[$key1]['parent'] = $key2; |
|
19 | - $this->_tree[$key2]['child'][] = $key1; |
|
20 | - if (isset($this->_rootId)) { |
|
21 | - $this->_tree[$key1]['root'] = $this->_objects[$i]->getVar($this->_rootId); |
|
22 | - } |
|
23 | - } |
|
24 | - } |
|
12 | + public function _initialize() |
|
13 | + { |
|
14 | + foreach (array_keys($this->_objects) as $i) { |
|
15 | + $key1 = $this->_objects[$i]->getVar($this->_myId); |
|
16 | + $this->_tree[$key1]['obj'] = $this->_objects[$i]; |
|
17 | + $key2 = $this->_objects[$i]->getVar($this->_parentId, 'e'); |
|
18 | + $this->_tree[$key1]['parent'] = $key2; |
|
19 | + $this->_tree[$key2]['child'][] = $key1; |
|
20 | + if (isset($this->_rootId)) { |
|
21 | + $this->_tree[$key1]['root'] = $this->_objects[$i]->getVar($this->_rootId); |
|
22 | + } |
|
23 | + } |
|
24 | + } |
|
25 | 25 | } |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
4 | 4 | |
5 | -include_once XOOPS_ROOT_PATH . '/class/tree.php'; |
|
5 | +include_once XOOPS_ROOT_PATH.'/class/tree.php'; |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * Class smartobjecttree |
@@ -24,44 +24,44 @@ |
||
24 | 24 | */ |
25 | 25 | class SmartSeoObject extends SmartObject |
26 | 26 | { |
27 | - /** |
|
28 | - * SmartSeoObject constructor. |
|
29 | - */ |
|
30 | - public function __construct() |
|
31 | - { |
|
32 | - $this->initCommonVar('meta_keywords'); |
|
33 | - $this->initCommonVar('meta_description'); |
|
34 | - $this->initCommonVar('short_url'); |
|
35 | - $this->seoEnabled = true; |
|
36 | - } |
|
27 | + /** |
|
28 | + * SmartSeoObject constructor. |
|
29 | + */ |
|
30 | + public function __construct() |
|
31 | + { |
|
32 | + $this->initCommonVar('meta_keywords'); |
|
33 | + $this->initCommonVar('meta_description'); |
|
34 | + $this->initCommonVar('short_url'); |
|
35 | + $this->seoEnabled = true; |
|
36 | + } |
|
37 | 37 | |
38 | - /** |
|
39 | - * Return the value of the short_url field of this object |
|
40 | - * |
|
41 | - * @return string |
|
42 | - */ |
|
43 | - public function short_url() |
|
44 | - { |
|
45 | - return $this->getVar('short_url'); |
|
46 | - } |
|
38 | + /** |
|
39 | + * Return the value of the short_url field of this object |
|
40 | + * |
|
41 | + * @return string |
|
42 | + */ |
|
43 | + public function short_url() |
|
44 | + { |
|
45 | + return $this->getVar('short_url'); |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * Return the value of the meta_keywords field of this object |
|
50 | - * |
|
51 | - * @return string |
|
52 | - */ |
|
53 | - public function meta_keywords() |
|
54 | - { |
|
55 | - return $this->getVar('meta_keywords'); |
|
56 | - } |
|
48 | + /** |
|
49 | + * Return the value of the meta_keywords field of this object |
|
50 | + * |
|
51 | + * @return string |
|
52 | + */ |
|
53 | + public function meta_keywords() |
|
54 | + { |
|
55 | + return $this->getVar('meta_keywords'); |
|
56 | + } |
|
57 | 57 | |
58 | - /** |
|
59 | - * Return the value of the meta_description field of this object |
|
60 | - * |
|
61 | - * @return string |
|
62 | - */ |
|
63 | - public function meta_description() |
|
64 | - { |
|
65 | - return $this->getVar('meta_description'); |
|
66 | - } |
|
58 | + /** |
|
59 | + * Return the value of the meta_description field of this object |
|
60 | + * |
|
61 | + * @return string |
|
62 | + */ |
|
63 | + public function meta_description() |
|
64 | + { |
|
65 | + return $this->getVar('meta_description'); |
|
66 | + } |
|
67 | 67 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
14 | -include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
14 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/class/smartobject.php'; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * SmartObject base SEO-enabled class |
@@ -36,10 +36,10 @@ |
||
36 | 36 | */ |
37 | 37 | class SmartJax extends Projax |
38 | 38 | { |
39 | - public function initiateFromUserside() |
|
40 | - { |
|
41 | - global $xoTheme; |
|
42 | - $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/prototype.js'); |
|
43 | - $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/scriptaculous.js'); |
|
44 | - } |
|
39 | + public function initiateFromUserside() |
|
40 | + { |
|
41 | + global $xoTheme; |
|
42 | + $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/prototype.js'); |
|
43 | + $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/scriptaculous.js'); |
|
44 | + } |
|
45 | 45 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); |
31 | 31 | |
32 | -include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/projax/projax.php'; |
|
32 | +include_once XOOPS_ROOT_PATH.'/modules/smartobject/include/projax/projax.php'; |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Class SmartJax |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function initiateFromUserside() |
40 | 40 | { |
41 | 41 | global $xoTheme; |
42 | - $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/prototype.js'); |
|
43 | - $xoTheme->addScript(SMARTOBJECT_URL . 'include/projax/js/scriptaculous.js'); |
|
42 | + $xoTheme->addScript(SMARTOBJECT_URL.'include/projax/js/prototype.js'); |
|
43 | + $xoTheme->addScript(SMARTOBJECT_URL.'include/projax/js/scriptaculous.js'); |
|
44 | 44 | } |
45 | 45 | } |
@@ -11,24 +11,24 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormTextElement extends XoopsFormText |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormTextElement constructor. |
|
16 | - * @param string $object |
|
17 | - * @param string $key |
|
18 | - */ |
|
19 | - public function __construct($object, $key) |
|
20 | - { |
|
21 | - $var = $object->vars[$key]; |
|
14 | + /** |
|
15 | + * SmartFormTextElement constructor. |
|
16 | + * @param string $object |
|
17 | + * @param string $key |
|
18 | + */ |
|
19 | + public function __construct($object, $key) |
|
20 | + { |
|
21 | + $var = $object->vars[$key]; |
|
22 | 22 | |
23 | - if (isset($object->controls[$key])) { |
|
24 | - $control = $object->controls[$key]; |
|
25 | - $form_maxlength = isset($control['maxlength']) ? $control['maxlength'] : (isset($var['maxlength']) ? $var['maxlength'] : 255); |
|
26 | - $form_size = isset($control['size']) ? $control['size'] : 50; |
|
27 | - } else { |
|
28 | - $form_maxlength = 255; |
|
29 | - $form_size = 50; |
|
30 | - } |
|
23 | + if (isset($object->controls[$key])) { |
|
24 | + $control = $object->controls[$key]; |
|
25 | + $form_maxlength = isset($control['maxlength']) ? $control['maxlength'] : (isset($var['maxlength']) ? $var['maxlength'] : 255); |
|
26 | + $form_size = isset($control['size']) ? $control['size'] : 50; |
|
27 | + } else { |
|
28 | + $form_maxlength = 255; |
|
29 | + $form_size = 50; |
|
30 | + } |
|
31 | 31 | |
32 | - parent::__construct($var['form_caption'], $key, $form_size, $form_maxlength, $object->getVar($key, 'e')); |
|
33 | - } |
|
32 | + parent::__construct($var['form_caption'], $key, $form_size, $form_maxlength, $object->getVar($key, 'e')); |
|
33 | + } |
|
34 | 34 | } |
@@ -11,13 +11,13 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormDateElement extends XoopsFormTextDateSelect |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormDateElement constructor. |
|
16 | - * @param $object |
|
17 | - * @param $key |
|
18 | - */ |
|
19 | - public function __construct($object, $key) |
|
20 | - { |
|
21 | - parent::__construct($object->vars[$key]['form_caption'], $key, 15, $object->getVar($key, 'e')); |
|
22 | - } |
|
14 | + /** |
|
15 | + * SmartFormDateElement constructor. |
|
16 | + * @param $object |
|
17 | + * @param $key |
|
18 | + */ |
|
19 | + public function __construct($object, $key) |
|
20 | + { |
|
21 | + parent::__construct($object->vars[$key]['form_caption'], $key, 15, $object->getVar($key, 'e')); |
|
22 | + } |
|
23 | 23 | } |
@@ -16,27 +16,27 @@ |
||
16 | 16 | */ |
17 | 17 | class SmartFormFileUploadElement extends SmartFormUploadElement |
18 | 18 | { |
19 | - /** |
|
20 | - * SmartFormFileUploadElement constructor. |
|
21 | - * @param string $object |
|
22 | - * @param string $key |
|
23 | - */ |
|
24 | - public function __construct($object, $key) |
|
25 | - { |
|
26 | - $this->SmartFormFileElement($object, $key); |
|
27 | - // Override name for upload purposes |
|
28 | - $this->setName('upload_' . $key); |
|
29 | - } |
|
19 | + /** |
|
20 | + * SmartFormFileUploadElement constructor. |
|
21 | + * @param string $object |
|
22 | + * @param string $key |
|
23 | + */ |
|
24 | + public function __construct($object, $key) |
|
25 | + { |
|
26 | + $this->SmartFormFileElement($object, $key); |
|
27 | + // Override name for upload purposes |
|
28 | + $this->setName('upload_' . $key); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * prepare HTML for output |
|
33 | - * |
|
34 | - * @return string HTML |
|
35 | - */ |
|
36 | - public function render() |
|
37 | - { |
|
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
31 | + /** |
|
32 | + * prepare HTML for output |
|
33 | + * |
|
34 | + * @return string HTML |
|
35 | + */ |
|
36 | + public function render() |
|
37 | + { |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
39 | 39 | <input type='file' name='upload_" . $this->getName() . "' id='upload_" . $this->getName() . "'" . $this->getExtra() . " /> |
40 | 40 | <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "' />"; |
41 | - } |
|
41 | + } |
|
42 | 42 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @package SmartObject |
10 | 10 | * @subpackage SmartObjectForm |
11 | 11 | */ |
12 | -include_once SMARTOBJECT_ROOT_PATH . 'class/form/elements/smartformuploadelement.php'; |
|
12 | +include_once SMARTOBJECT_ROOT_PATH.'class/form/elements/smartformuploadelement.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Class SmartFormFileUploadElement |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $this->SmartFormFileElement($object, $key); |
27 | 27 | // Override name for upload purposes |
28 | - $this->setName('upload_' . $key); |
|
28 | + $this->setName('upload_'.$key); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function render() |
37 | 37 | { |
38 | - return "<input type='hidden' name='MAX_FILE_SIZE' value='" . $this->getMaxFileSize() . "' /> |
|
39 | - <input type='file' name='upload_" . $this->getName() . "' id='upload_" . $this->getName() . "'" . $this->getExtra() . " /> |
|
40 | - <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName() . "' />"; |
|
38 | + return "<input type='hidden' name='MAX_FILE_SIZE' value='".$this->getMaxFileSize()."' /> |
|
39 | + <input type='file' name='upload_" . $this->getName()."' id='upload_".$this->getName()."'".$this->getExtra()." /> |
|
40 | + <input type='hidden' name='smart_upload_file[]' id='smart_upload_file[]' value='" . $this->getName()."' />"; |
|
41 | 41 | } |
42 | 42 | } |