@@ -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 | } |
@@ -26,82 +26,82 @@ |
||
26 | 26 | $op = isset($_POST['op']) ? $_POST['op'] : ''; |
27 | 27 | |
28 | 28 | switch ($op) { |
29 | - case 'sendlink': |
|
30 | - |
|
31 | - include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
32 | - $controller = new SmartObjectController($smartobjectLinkHandler); |
|
33 | - |
|
34 | - $linkObj = $controller->storeSmartObject(); |
|
35 | - if ($linkObj->hasError()) { |
|
36 | - /** |
|
37 | - * @todo inform user and propose to close the window if a problem occured when saving the link |
|
38 | - */ |
|
39 | - } |
|
40 | - |
|
41 | - $xoopsMailer =& getMailer(); |
|
42 | - $xoopsMailer->useMail(); |
|
43 | - $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template'); |
|
44 | - |
|
45 | - $xoopsMailer->setTemplate('sendlink.tpl'); |
|
46 | - $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']); |
|
47 | - $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name')); |
|
48 | - $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name')); |
|
49 | - $xoopsMailer->assign('SITEURL', XOOPS_URL . '/'); |
|
50 | - $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']); |
|
51 | - $xoopsMailer->assign('MESSAGE', $_POST['body']); |
|
52 | - $xoopsMailer->setToEmails($linkObj->getVar('to_email')); |
|
53 | - $xoopsMailer->setFromEmail($linkObj->getVar('from_email')); |
|
54 | - $xoopsMailer->setFromName($xoopsConfig['sitename']); |
|
55 | - $xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename']))); |
|
56 | - |
|
57 | - if (!$xoopsMailer->send(true)) { |
|
58 | - $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br />' . $xoopsMailer->getErrors(true)); |
|
59 | - } else { |
|
60 | - $xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS); |
|
61 | - } |
|
62 | - |
|
63 | - break; |
|
64 | - |
|
65 | - default: |
|
66 | - if (isset($_GET['mid'])) { |
|
67 | - $mid = $_GET['mid']; |
|
68 | - } else { |
|
69 | - /** |
|
70 | - * @todo close the window if no mid is passed as GET |
|
71 | - */ |
|
72 | - } |
|
73 | - |
|
74 | - $hModule = xoops_getHandler('module'); |
|
75 | - $module = $hModule->get($mid); |
|
76 | - $linkObj->setVar('mid', $module->getVar('mid')); |
|
77 | - $linkObj->setVar('mid_name', $module->getVar('name')); |
|
78 | - |
|
79 | - if (isset($_GET['link'])) { |
|
80 | - $link = $_GET['link']; |
|
81 | - } else { |
|
82 | - /** |
|
83 | - * @todo close the window if no link is passed as GET |
|
84 | - */ |
|
85 | - } |
|
86 | - $linkObj->setVar('link', $link); |
|
87 | - |
|
88 | - if (is_object($xoopsUser)) { |
|
89 | - $linkObj->setVar('from_uid', $xoopsUser->getVar('uid')); |
|
90 | - $linkObj->setVar('from_name', $xoopsUser->getVar('name') != '' ? $xoopsUser->getVar('name') : $xoopsUser->getVar('uname')); |
|
91 | - $linkObj->setVar('from_email', $xoopsUser->getVar('email')); |
|
92 | - } |
|
93 | - |
|
94 | - $linkObj->setVar('subject', sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $xoopsConfig['sitename'])); |
|
95 | - $linkObj->setVar('body', sprintf(_CO_SOBJECT_BODY_DEFAULT, $xoopsConfig['sitename'], $link)); |
|
96 | - $linkObj->setVar('date', time()); |
|
97 | - $linkObj->hideFieldFromForm(array('from_uid', 'to_uid', 'link', 'mid', 'mid_name')); |
|
98 | - |
|
99 | - $form = $linkObj->getForm(_CO_SOBJECT_SEND_LINK_FORM, 'sendlink', false, _SEND, 'javascript:window.close();'); |
|
100 | - |
|
101 | - $form->assign($xoopsTpl); |
|
102 | - |
|
103 | - $xoopsTpl->assign('showform', true); |
|
104 | - break; |
|
29 | + case 'sendlink': |
|
30 | + |
|
31 | + include_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobjectcontroller.php'; |
|
32 | + $controller = new SmartObjectController($smartobjectLinkHandler); |
|
33 | + |
|
34 | + $linkObj = $controller->storeSmartObject(); |
|
35 | + if ($linkObj->hasError()) { |
|
36 | + /** |
|
37 | + * @todo inform user and propose to close the window if a problem occured when saving the link |
|
38 | + */ |
|
39 | + } |
|
40 | + |
|
41 | + $xoopsMailer =& getMailer(); |
|
42 | + $xoopsMailer->useMail(); |
|
43 | + $xoopsMailer->setTemplateDir('language/' . $xoopsConfig['language'] . '/mail_template'); |
|
44 | + |
|
45 | + $xoopsMailer->setTemplate('sendlink.tpl'); |
|
46 | + $xoopsMailer->assign('X_SITENAME', $xoopsConfig['sitename']); |
|
47 | + $xoopsMailer->assign('TO_NAME', $linkObj->getVar('to_name')); |
|
48 | + $xoopsMailer->assign('FROM_NAME', $linkObj->getVar('from_name')); |
|
49 | + $xoopsMailer->assign('SITEURL', XOOPS_URL . '/'); |
|
50 | + $xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']); |
|
51 | + $xoopsMailer->assign('MESSAGE', $_POST['body']); |
|
52 | + $xoopsMailer->setToEmails($linkObj->getVar('to_email')); |
|
53 | + $xoopsMailer->setFromEmail($linkObj->getVar('from_email')); |
|
54 | + $xoopsMailer->setFromName($xoopsConfig['sitename']); |
|
55 | + $xoopsMailer->setSubject(sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $myts->oopsStripSlashesGPC($xoopsConfig['sitename']))); |
|
56 | + |
|
57 | + if (!$xoopsMailer->send(true)) { |
|
58 | + $xoopsTpl->assign('send_error', sprintf(_CO_SOBJECT_SEND_ERROR, $xoopsConfig['adminmail']) . '<br />' . $xoopsMailer->getErrors(true)); |
|
59 | + } else { |
|
60 | + $xoopsTpl->assign('send_success', _CO_SOBJECT_SEND_SUCCESS); |
|
61 | + } |
|
62 | + |
|
63 | + break; |
|
64 | + |
|
65 | + default: |
|
66 | + if (isset($_GET['mid'])) { |
|
67 | + $mid = $_GET['mid']; |
|
68 | + } else { |
|
69 | + /** |
|
70 | + * @todo close the window if no mid is passed as GET |
|
71 | + */ |
|
72 | + } |
|
73 | + |
|
74 | + $hModule = xoops_getHandler('module'); |
|
75 | + $module = $hModule->get($mid); |
|
76 | + $linkObj->setVar('mid', $module->getVar('mid')); |
|
77 | + $linkObj->setVar('mid_name', $module->getVar('name')); |
|
78 | + |
|
79 | + if (isset($_GET['link'])) { |
|
80 | + $link = $_GET['link']; |
|
81 | + } else { |
|
82 | + /** |
|
83 | + * @todo close the window if no link is passed as GET |
|
84 | + */ |
|
85 | + } |
|
86 | + $linkObj->setVar('link', $link); |
|
87 | + |
|
88 | + if (is_object($xoopsUser)) { |
|
89 | + $linkObj->setVar('from_uid', $xoopsUser->getVar('uid')); |
|
90 | + $linkObj->setVar('from_name', $xoopsUser->getVar('name') != '' ? $xoopsUser->getVar('name') : $xoopsUser->getVar('uname')); |
|
91 | + $linkObj->setVar('from_email', $xoopsUser->getVar('email')); |
|
92 | + } |
|
93 | + |
|
94 | + $linkObj->setVar('subject', sprintf(_CO_SOBJECT_SUBJECT_DEFAULT, $xoopsConfig['sitename'])); |
|
95 | + $linkObj->setVar('body', sprintf(_CO_SOBJECT_BODY_DEFAULT, $xoopsConfig['sitename'], $link)); |
|
96 | + $linkObj->setVar('date', time()); |
|
97 | + $linkObj->hideFieldFromForm(array('from_uid', 'to_uid', 'link', 'mid', 'mid_name')); |
|
98 | + |
|
99 | + $form = $linkObj->getForm(_CO_SOBJECT_SEND_LINK_FORM, 'sendlink', false, _SEND, 'javascript:window.close();'); |
|
100 | + |
|
101 | + $form->assign($xoopsTpl); |
|
102 | + |
|
103 | + $xoopsTpl->assign('showform', true); |
|
104 | + break; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | $xoopsTpl->display('db:smartobject_sendlink.html'); |
@@ -8,12 +8,12 @@ discard block |
||
8 | 8 | */ |
9 | 9 | function smartobject_addto_show($options) |
10 | 10 | { |
11 | - include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'); |
|
12 | - include_once(SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php'); |
|
13 | - $smartaddto = new SmartAddTo($options[0]); |
|
14 | - $block = $smartaddto->renderForBlock(); |
|
11 | + include_once(XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php'); |
|
12 | + include_once(SMARTOBJECT_ROOT_PATH . 'class/smartaddto.php'); |
|
13 | + $smartaddto = new SmartAddTo($options[0]); |
|
14 | + $block = $smartaddto->renderForBlock(); |
|
15 | 15 | |
16 | - return $block; |
|
16 | + return $block; |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | /** |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | */ |
23 | 23 | function smartobject_addto_edit($options) |
24 | 24 | { |
25 | - include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
25 | + include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; |
|
26 | 26 | |
27 | - $form = ''; |
|
27 | + $form = ''; |
|
28 | 28 | |
29 | - $layout_select = new XoopsFormSelect(_MB_SOBJECT_BLOCKS_ADDTO_LAYOUT, 'options[]', $options[0]); |
|
30 | - $layout_select->addOption(0, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION0); |
|
31 | - $layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1); |
|
32 | - $layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2); |
|
33 | - $layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3); |
|
34 | - $form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br />'; |
|
29 | + $layout_select = new XoopsFormSelect(_MB_SOBJECT_BLOCKS_ADDTO_LAYOUT, 'options[]', $options[0]); |
|
30 | + $layout_select->addOption(0, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION0); |
|
31 | + $layout_select->addOption(1, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION1); |
|
32 | + $layout_select->addOption(2, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION2); |
|
33 | + $layout_select->addOption(3, _MB_SOBJECT_BLOCKS_ADDTO_LAYOUT_OPTION3); |
|
34 | + $form .= $layout_select->getCaption() . ' ' . $layout_select->render() . '<br />'; |
|
35 | 35 | |
36 | - return $form; |
|
36 | + return $form; |
|
37 | 37 | } |
@@ -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 | /** |