@@ -9,15 +9,15 @@ |
||
9 | 9 | |
10 | 10 | function smartobject_plugin_smartpartner() |
11 | 11 | { |
12 | - $pluginInfo = array(); |
|
12 | + $pluginInfo = array(); |
|
13 | 13 | |
14 | - $pluginInfo['items']['partner']['caption'] = 'Partner'; |
|
15 | - $pluginInfo['items']['partner']['url'] = 'partner.php?partnerid=%u'; |
|
16 | - $pluginInfo['items']['partner']['request'] = 'partnerid'; |
|
14 | + $pluginInfo['items']['partner']['caption'] = 'Partner'; |
|
15 | + $pluginInfo['items']['partner']['url'] = 'partner.php?partnerid=%u'; |
|
16 | + $pluginInfo['items']['partner']['request'] = 'partnerid'; |
|
17 | 17 | |
18 | - $pluginInfo['items']['category']['caption'] = 'Category'; |
|
19 | - $pluginInfo['items']['category']['url'] = 'index.php?view_category_id=%u'; |
|
20 | - $pluginInfo['items']['category']['request'] = 'view_category_id'; |
|
18 | + $pluginInfo['items']['category']['caption'] = 'Category'; |
|
19 | + $pluginInfo['items']['category']['url'] = 'index.php?view_category_id=%u'; |
|
20 | + $pluginInfo['items']['category']['request'] = 'view_category_id'; |
|
21 | 21 | |
22 | - return $pluginInfo; |
|
22 | + return $pluginInfo; |
|
23 | 23 | } |
@@ -9,15 +9,15 @@ |
||
9 | 9 | |
10 | 10 | function smartobject_plugin_smartsection() |
11 | 11 | { |
12 | - $pluginInfo = array(); |
|
12 | + $pluginInfo = array(); |
|
13 | 13 | |
14 | - $pluginInfo['items']['item']['caption'] = 'Article'; |
|
15 | - $pluginInfo['items']['item']['url'] = 'item.php?itemid=%u'; |
|
16 | - $pluginInfo['items']['item']['request'] = 'itemid'; |
|
14 | + $pluginInfo['items']['item']['caption'] = 'Article'; |
|
15 | + $pluginInfo['items']['item']['url'] = 'item.php?itemid=%u'; |
|
16 | + $pluginInfo['items']['item']['request'] = 'itemid'; |
|
17 | 17 | |
18 | - $pluginInfo['items']['category']['caption'] = 'Category'; |
|
19 | - $pluginInfo['items']['category']['url'] = 'category.php?categoryid=%u'; |
|
20 | - $pluginInfo['items']['category']['request'] = 'categoryid'; |
|
18 | + $pluginInfo['items']['category']['caption'] = 'Category'; |
|
19 | + $pluginInfo['items']['category']['url'] = 'category.php?categoryid=%u'; |
|
20 | + $pluginInfo['items']['category']['request'] = 'categoryid'; |
|
21 | 21 | |
22 | - return $pluginInfo; |
|
22 | + return $pluginInfo; |
|
23 | 23 | } |
@@ -9,12 +9,12 @@ |
||
9 | 9 | |
10 | 10 | function smartobject_plugin_xcgal() |
11 | 11 | { |
12 | - global $xoopsConfig; |
|
12 | + global $xoopsConfig; |
|
13 | 13 | |
14 | - $pluginInfo = array(); |
|
15 | - $pluginInfo['items']['album']['caption'] = 'Album'; |
|
16 | - $pluginInfo['items']['item']['url'] = 'thumbnails.php?album=%u'; |
|
17 | - $pluginInfo['items']['item']['request'] = 'album'; |
|
14 | + $pluginInfo = array(); |
|
15 | + $pluginInfo['items']['album']['caption'] = 'Album'; |
|
16 | + $pluginInfo['items']['item']['url'] = 'thumbnails.php?album=%u'; |
|
17 | + $pluginInfo['items']['item']['request'] = 'album'; |
|
18 | 18 | |
19 | - return $pluginInfo; |
|
19 | + return $pluginInfo; |
|
20 | 20 | } |
@@ -9,15 +9,15 @@ |
||
9 | 9 | |
10 | 10 | function smartobject_plugin_smartshop() |
11 | 11 | { |
12 | - $pluginInfo = array(); |
|
12 | + $pluginInfo = array(); |
|
13 | 13 | |
14 | - $pluginInfo['items']['item']['caption'] = 'Item'; |
|
15 | - $pluginInfo['items']['item']['url'] = 'item.php?itemid=%u'; |
|
16 | - $pluginInfo['items']['item']['request'] = 'itemid'; |
|
14 | + $pluginInfo['items']['item']['caption'] = 'Item'; |
|
15 | + $pluginInfo['items']['item']['url'] = 'item.php?itemid=%u'; |
|
16 | + $pluginInfo['items']['item']['request'] = 'itemid'; |
|
17 | 17 | |
18 | - $pluginInfo['items']['category']['caption'] = 'Category'; |
|
19 | - $pluginInfo['items']['category']['url'] = 'category.php?categoryid=%u'; |
|
20 | - $pluginInfo['items']['category']['request'] = 'categoryid'; |
|
18 | + $pluginInfo['items']['category']['caption'] = 'Category'; |
|
19 | + $pluginInfo['items']['category']['url'] = 'category.php?categoryid=%u'; |
|
20 | + $pluginInfo['items']['category']['request'] = 'categoryid'; |
|
21 | 21 | |
22 | - return $pluginInfo; |
|
22 | + return $pluginInfo; |
|
23 | 23 | } |
@@ -9,17 +9,17 @@ |
||
9 | 9 | |
10 | 10 | function smartobject_plugin_smartband() |
11 | 11 | { |
12 | - global $xoopsConfig; |
|
13 | - include_once(XOOPS_ROOT_PATH . '/modules/smartband/language/' . $xoopsConfig['language'] . '/main.php'); |
|
12 | + global $xoopsConfig; |
|
13 | + include_once(XOOPS_ROOT_PATH . '/modules/smartband/language/' . $xoopsConfig['language'] . '/main.php'); |
|
14 | 14 | |
15 | - $pluginInfo = array(); |
|
16 | - $pluginInfo['items']['item']['caption'] = _MD_ARTALBUM_ITEM_CAP; |
|
17 | - $pluginInfo['items']['item']['url'] = 'item.php?itemid=%u'; |
|
18 | - $pluginInfo['items']['item']['request'] = 'itemid'; |
|
15 | + $pluginInfo = array(); |
|
16 | + $pluginInfo['items']['item']['caption'] = _MD_ARTALBUM_ITEM_CAP; |
|
17 | + $pluginInfo['items']['item']['url'] = 'item.php?itemid=%u'; |
|
18 | + $pluginInfo['items']['item']['request'] = 'itemid'; |
|
19 | 19 | |
20 | - $pluginInfo['items']['category']['caption'] = _MD_ARTALBUM_CATEGORY; |
|
21 | - $pluginInfo['items']['category']['url'] = 'category.php?categoryid=%u'; |
|
22 | - $pluginInfo['items']['category']['request'] = 'categoryid'; |
|
20 | + $pluginInfo['items']['category']['caption'] = _MD_ARTALBUM_CATEGORY; |
|
21 | + $pluginInfo['items']['category']['url'] = 'category.php?categoryid=%u'; |
|
22 | + $pluginInfo['items']['category']['request'] = 'categoryid'; |
|
23 | 23 | |
24 | - return $pluginInfo; |
|
24 | + return $pluginInfo; |
|
25 | 25 | } |
@@ -2,5 +2,5 @@ |
||
2 | 2 | |
3 | 3 | function smarthook_footer_start() |
4 | 4 | { |
5 | - // code... |
|
5 | + // code... |
|
6 | 6 | } |
@@ -14,22 +14,22 @@ |
||
14 | 14 | * SmartObject library path |
15 | 15 | */ |
16 | 16 | if (!defined('SMARTOBJECT_URL')) { |
17 | - define('SMARTOBJECT_URL', XOOPS_URL . '/modules/smartobject/'); |
|
17 | + define('SMARTOBJECT_URL', XOOPS_URL . '/modules/smartobject/'); |
|
18 | 18 | } |
19 | 19 | if (!defined('SMARTOBJECT_ROOT_PATH')) { |
20 | - define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/smartobject/'); |
|
20 | + define('SMARTOBJECT_ROOT_PATH', XOOPS_ROOT_PATH . '/modules/smartobject/'); |
|
21 | 21 | } |
22 | 22 | if (!defined('SMARTOBJECT_IMAGES_URL')) { |
23 | - define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL . 'assets/images/'); |
|
23 | + define('SMARTOBJECT_IMAGES_URL', SMARTOBJECT_URL . 'assets/images/'); |
|
24 | 24 | } |
25 | 25 | if (!defined('SMARTOBJECT_IMAGES_ROOT_PATH')) { |
26 | - define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/'); |
|
26 | + define('SMARTOBJECT_IMAGES_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/'); |
|
27 | 27 | } |
28 | 28 | if (!defined('SMARTOBJECT_IMAGES_ACTIONS_URL')) { |
29 | - define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL . 'assets/images/actions/'); |
|
29 | + define('SMARTOBJECT_IMAGES_ACTIONS_URL', SMARTOBJECT_URL . 'assets/images/actions/'); |
|
30 | 30 | } |
31 | 31 | if (!defined('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH')) { |
32 | - define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/actions/'); |
|
32 | + define('SMARTOBJECT_IMAGES_ACTIONS_ROOT_PATH', SMARTOBJECT_ROOT_PATH . 'assets/images/actions/'); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -10,16 +10,16 @@ |
||
10 | 10 | |
11 | 11 | function smart_adsense_initiate_smartytags() |
12 | 12 | { |
13 | - global $xoopsTpl, $smartobjectAdsenseHandler; |
|
14 | - if (is_object($xoopsTpl)) { |
|
15 | - foreach ($smartobjectAdsenseHandler->objects as $k => $v) { |
|
16 | - $xoopsTpl->assign('adsense_' . $k, $v->render()); |
|
17 | - } |
|
18 | - } |
|
13 | + global $xoopsTpl, $smartobjectAdsenseHandler; |
|
14 | + if (is_object($xoopsTpl)) { |
|
15 | + foreach ($smartobjectAdsenseHandler->objects as $k => $v) { |
|
16 | + $xoopsTpl->assign('adsense_' . $k, $v->render()); |
|
17 | + } |
|
18 | + } |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | if (!defined('SMARTOBJECT_URL')) { |
22 | - include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'); |
|
22 | + include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/functions.php'; |
@@ -15,90 +15,90 @@ |
||
15 | 15 | */ |
16 | 16 | class JavaScript |
17 | 17 | { |
18 | - /** |
|
19 | - * @param $name |
|
20 | - * @param null $function |
|
21 | - * @return string |
|
22 | - */ |
|
23 | - public function button_to_function($name, $function = null) |
|
24 | - { |
|
25 | - return '<input type="button" value="' . $name . '" onclick="' . $function . '" />'; |
|
26 | - } |
|
18 | + /** |
|
19 | + * @param $name |
|
20 | + * @param null $function |
|
21 | + * @return string |
|
22 | + */ |
|
23 | + public function button_to_function($name, $function = null) |
|
24 | + { |
|
25 | + return '<input type="button" value="' . $name . '" onclick="' . $function . '" />'; |
|
26 | + } |
|
27 | 27 | |
28 | - /** |
|
29 | - * @param $javascript |
|
30 | - * @return mixed|string |
|
31 | - */ |
|
32 | - public function escape($javascript) |
|
33 | - { |
|
34 | - $javascript = addslashes($javascript); |
|
35 | - $javascript = str_replace(array("\r\n", "\n", "\r"), array("\n"), $javascript); |
|
28 | + /** |
|
29 | + * @param $javascript |
|
30 | + * @return mixed|string |
|
31 | + */ |
|
32 | + public function escape($javascript) |
|
33 | + { |
|
34 | + $javascript = addslashes($javascript); |
|
35 | + $javascript = str_replace(array("\r\n", "\n", "\r"), array("\n"), $javascript); |
|
36 | 36 | |
37 | - return $javascript; |
|
38 | - } |
|
37 | + return $javascript; |
|
38 | + } |
|
39 | 39 | |
40 | - /** |
|
41 | - * @param $content |
|
42 | - * @return string |
|
43 | - */ |
|
44 | - public function tag($content) |
|
45 | - { |
|
46 | - return '<script type="text/javascript">' . $content . '</script>'; |
|
47 | - } |
|
40 | + /** |
|
41 | + * @param $content |
|
42 | + * @return string |
|
43 | + */ |
|
44 | + public function tag($content) |
|
45 | + { |
|
46 | + return '<script type="text/javascript">' . $content . '</script>'; |
|
47 | + } |
|
48 | 48 | |
49 | - /** |
|
50 | - * @param $name |
|
51 | - * @param $function |
|
52 | - * @param null $html_options |
|
53 | - * @return string |
|
54 | - */ |
|
55 | - public function link_to_function($name, $function, $html_options = null) |
|
56 | - { |
|
57 | - return '<a href="' . (isset($html_options['href']) ? $html_options['href'] : '#') . '" onclick="' . (isset($html_options['onclick']) ? $html_options['onclick'] . ';' : '') . $function . '; return false;" />' . $name . '</a>'; |
|
58 | - } |
|
49 | + /** |
|
50 | + * @param $name |
|
51 | + * @param $function |
|
52 | + * @param null $html_options |
|
53 | + * @return string |
|
54 | + */ |
|
55 | + public function link_to_function($name, $function, $html_options = null) |
|
56 | + { |
|
57 | + return '<a href="' . (isset($html_options['href']) ? $html_options['href'] : '#') . '" onclick="' . (isset($html_options['onclick']) ? $html_options['onclick'] . ';' : '') . $function . '; return false;" />' . $name . '</a>'; |
|
58 | + } |
|
59 | 59 | |
60 | - ///////////////////////////////////////////////////////////////////////////////////// |
|
61 | - // Private functions |
|
62 | - ///////////////////////////////////////////////////////////////////////////////////// |
|
60 | + ///////////////////////////////////////////////////////////////////////////////////// |
|
61 | + // Private functions |
|
62 | + ///////////////////////////////////////////////////////////////////////////////////// |
|
63 | 63 | |
64 | - /** |
|
65 | - * @param $option |
|
66 | - * @return string |
|
67 | - */ |
|
68 | - public function _array_or_string_for_javascript($option) |
|
69 | - { |
|
70 | - $return_val = ''; |
|
71 | - if (is_array($option)) { |
|
72 | - foreach ($option as $value) { |
|
73 | - if (!empty($return_val)) { |
|
74 | - $ret_val .= ', '; |
|
75 | - } |
|
76 | - $return_val .= $value; |
|
77 | - } |
|
64 | + /** |
|
65 | + * @param $option |
|
66 | + * @return string |
|
67 | + */ |
|
68 | + public function _array_or_string_for_javascript($option) |
|
69 | + { |
|
70 | + $return_val = ''; |
|
71 | + if (is_array($option)) { |
|
72 | + foreach ($option as $value) { |
|
73 | + if (!empty($return_val)) { |
|
74 | + $ret_val .= ', '; |
|
75 | + } |
|
76 | + $return_val .= $value; |
|
77 | + } |
|
78 | 78 | |
79 | - return '[' . $return_val . ']'; |
|
80 | - } |
|
79 | + return '[' . $return_val . ']'; |
|
80 | + } |
|
81 | 81 | |
82 | - return "'$option'"; |
|
83 | - } |
|
82 | + return "'$option'"; |
|
83 | + } |
|
84 | 84 | |
85 | - /** |
|
86 | - * @param $options |
|
87 | - * @return string |
|
88 | - */ |
|
89 | - public function _options_for_javascript($options) |
|
90 | - { |
|
91 | - $return_val = ''; |
|
85 | + /** |
|
86 | + * @param $options |
|
87 | + * @return string |
|
88 | + */ |
|
89 | + public function _options_for_javascript($options) |
|
90 | + { |
|
91 | + $return_val = ''; |
|
92 | 92 | |
93 | - if (is_array($options)) { |
|
94 | - foreach ($options as $var => $val) { |
|
95 | - if (!empty($return_val)) { |
|
96 | - $return_val .= ', '; |
|
97 | - } |
|
98 | - $return_val .= "$var:$val"; |
|
99 | - } |
|
100 | - } |
|
93 | + if (is_array($options)) { |
|
94 | + foreach ($options as $var => $val) { |
|
95 | + if (!empty($return_val)) { |
|
96 | + $return_val .= ', '; |
|
97 | + } |
|
98 | + $return_val .= "$var:$val"; |
|
99 | + } |
|
100 | + } |
|
101 | 101 | |
102 | - return '{' . $return_val . '}'; |
|
103 | - } |
|
102 | + return '{' . $return_val . '}'; |
|
103 | + } |
|
104 | 104 | } |