@@ -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 | /** |
@@ -17,13 +17,13 @@ |
||
| 17 | 17 | $smartobjectCurrencyHandler = xoops_getModuleHandler('currency', 'smartobject'); |
| 18 | 18 | |
| 19 | 19 | if (!$smartobjectCurrenciesObj) { |
| 20 | - $smartobjectCurrenciesObj = $smartobjectCurrencyHandler->getCurrencies(); |
|
| 20 | + $smartobjectCurrenciesObj = $smartobjectCurrencyHandler->getCurrencies(); |
|
| 21 | 21 | } |
| 22 | 22 | if (!$smartobjectCurrenciesArray) { |
| 23 | - foreach ($smartobjectCurrenciesObj as $currencyid => $currencyObj) { |
|
| 24 | - if ($currencyObj->getVar('default_currency', 'e')) { |
|
| 25 | - $smartobjectDefaultCurrency = $currencyObj; |
|
| 26 | - } |
|
| 27 | - $smartobjectCurrenciesArray[$currencyid] = $currencyObj->getCode(); |
|
| 28 | - } |
|
| 23 | + foreach ($smartobjectCurrenciesObj as $currencyid => $currencyObj) { |
|
| 24 | + if ($currencyObj->getVar('default_currency', 'e')) { |
|
| 25 | + $smartobjectDefaultCurrency = $currencyObj; |
|
| 26 | + } |
|
| 27 | + $smartobjectCurrenciesArray[$currencyid] = $currencyObj->getCode(); |
|
| 28 | + } |
|
| 29 | 29 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -11,20 +11,20 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class SmartFormLanguageElement extends XoopsFormSelectLang |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * SmartFormLanguageElement constructor. |
|
| 16 | - * @param string $object |
|
| 17 | - * @param string $key |
|
| 18 | - */ |
|
| 19 | - public function __construct($object, $key) |
|
| 20 | - { |
|
| 21 | - $var = $object->vars[$key]; |
|
| 22 | - $control = $object->controls[$key]; |
|
| 23 | - $all = isset($control['all']) ? true : false; |
|
| 14 | + /** |
|
| 15 | + * SmartFormLanguageElement constructor. |
|
| 16 | + * @param string $object |
|
| 17 | + * @param string $key |
|
| 18 | + */ |
|
| 19 | + public function __construct($object, $key) |
|
| 20 | + { |
|
| 21 | + $var = $object->vars[$key]; |
|
| 22 | + $control = $object->controls[$key]; |
|
| 23 | + $all = isset($control['all']) ? true : false; |
|
| 24 | 24 | |
| 25 | - parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
| 26 | - if ($all) { |
|
| 27 | - $this->addOption('all', _ALL); |
|
| 28 | - } |
|
| 29 | - } |
|
| 25 | + parent::__construct($var['form_caption'], $key, $object->getVar($key, 'e')); |
|
| 26 | + if ($all) { |
|
| 27 | + $this->addOption('all', _ALL); |
|
| 28 | + } |
|
| 29 | + } |
|
| 30 | 30 | } |
@@ -6,41 +6,41 @@ |
||
| 6 | 6 | */ |
| 7 | 7 | class SmartFormSection extends XoopsFormElement |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Text |
|
| 11 | - * @var string |
|
| 12 | - * @access private |
|
| 13 | - */ |
|
| 14 | - public $_value; |
|
| 9 | + /** |
|
| 10 | + * Text |
|
| 11 | + * @var string |
|
| 12 | + * @access private |
|
| 13 | + */ |
|
| 14 | + public $_value; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * SmartFormSection constructor. |
|
| 18 | - * @param $sectionname |
|
| 19 | - * @param bool $value |
|
| 20 | - */ |
|
| 21 | - public function __construct($sectionname, $value = false) |
|
| 22 | - { |
|
| 23 | - $this->setName($sectionname); |
|
| 24 | - $this->_value = $value; |
|
| 25 | - } |
|
| 16 | + /** |
|
| 17 | + * SmartFormSection constructor. |
|
| 18 | + * @param $sectionname |
|
| 19 | + * @param bool $value |
|
| 20 | + */ |
|
| 21 | + public function __construct($sectionname, $value = false) |
|
| 22 | + { |
|
| 23 | + $this->setName($sectionname); |
|
| 24 | + $this->_value = $value; |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Get the text |
|
| 29 | - * |
|
| 30 | - * @return string |
|
| 31 | - */ |
|
| 32 | - public function getValue() |
|
| 33 | - { |
|
| 34 | - return $this->_value; |
|
| 35 | - } |
|
| 27 | + /** |
|
| 28 | + * Get the text |
|
| 29 | + * |
|
| 30 | + * @return string |
|
| 31 | + */ |
|
| 32 | + public function getValue() |
|
| 33 | + { |
|
| 34 | + return $this->_value; |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * Prepare HTML for output |
|
| 39 | - * |
|
| 40 | - * @return string |
|
| 41 | - */ |
|
| 42 | - public function render() |
|
| 43 | - { |
|
| 44 | - return $this->getValue(); |
|
| 45 | - } |
|
| 37 | + /** |
|
| 38 | + * Prepare HTML for output |
|
| 39 | + * |
|
| 40 | + * @return string |
|
| 41 | + */ |
|
| 42 | + public function render() |
|
| 43 | + { |
|
| 44 | + return $this->getValue(); |
|
| 45 | + } |
|
| 46 | 46 | } |