@@ -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 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/class/smartobject.php'; |
|
14 | +require_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 | -require_once XOOPS_ROOT_PATH . '/modules/smartobject/include/projax/projax.php'; |
|
32 | +require_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 | } |
@@ -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 | } |
@@ -35,14 +35,14 @@ |
||
35 | 35 | */ |
36 | 36 | class SmartFormSelectElement extends XoopsFormElement |
37 | 37 | { |
38 | - /** |
|
39 | - * @param bool $withtags |
|
40 | - * @return string |
|
41 | - */ |
|
42 | - public function renderValidationJS($withtags = true) |
|
43 | - { |
|
44 | - $js = ''; |
|
38 | + /** |
|
39 | + * @param bool $withtags |
|
40 | + * @return string |
|
41 | + */ |
|
42 | + public function renderValidationJS($withtags = true) |
|
43 | + { |
|
44 | + $js = ''; |
|
45 | 45 | |
46 | - return $js; |
|
47 | - } |
|
46 | + return $js; |
|
47 | + } |
|
48 | 48 | } |
@@ -11,13 +11,13 @@ |
||
11 | 11 | */ |
12 | 12 | class SmartFormDate_timeElement extends XoopsFormDateTime |
13 | 13 | { |
14 | - /** |
|
15 | - * SmartFormDate_timeElement constructor. |
|
16 | - * @param mixed $object |
|
17 | - * @param mixed $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 | + * SmartFormDate_timeElement constructor. |
|
16 | + * @param mixed $object |
|
17 | + * @param mixed $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 | } |
@@ -6,41 +6,41 @@ |
||
6 | 6 | */ |
7 | 7 | class SmartFormSectionClose 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 | - * SmartFormSectionClose 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 | + * SmartFormSectionClose 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 | } |