Zota_Zotabox - Version 1.0.1

Version Notes

Release Zotabox magento extension

Download this release

Release Info

Developer zotabox
Extension Zota_Zotabox
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Zota/Zotabox/Block/Adminhtml/Source/System/Config/Connectbutton.php CHANGED
@@ -14,6 +14,9 @@ class Zota_Zotabox_Block_Adminhtml_Source_System_Config_Connectbutton extends Ma
14
  . "&token=" . $this->_tokenKey
15
  . "&customer=" . $this->_getCustomerId()
16
  . "&access=" . $accessKey
 
 
 
17
  ;
18
  $buttonBlock = $this->getLayout()->createBlock('zotabox/adminhtml_widget_button')
19
  ->setId('connect-to-zotabox')
14
  . "&token=" . $this->_tokenKey
15
  . "&customer=" . $this->_getCustomerId()
16
  . "&access=" . $accessKey
17
+ . "&utm_source=" . Mage::helper("core/url")->getHomeUrl()
18
+ . "&utm_medium=" . "magento plugin"
19
+ . "&utm_campaign=" . "ecommerce plugins"
20
  ;
21
  $buttonBlock = $this->getLayout()->createBlock('zotabox/adminhtml_widget_button')
22
  ->setId('connect-to-zotabox')
app/code/community/Zota/Zotabox/Block/Adminhtml/Widget/Button.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php
2
-
3
- class Zota_Zotabox_Block_Adminhtml_Widget_Button extends Mage_Adminhtml_Block_Widget
4
- {
5
- public function __construct()
6
- {
7
- parent::__construct();
8
- }
9
-
10
- public function getHref() {
11
- return ($href=$this->getData('href')) ? $href : 'javascript:void(0);';
12
- }
13
-
14
- public function getTarget() {
15
- return ($target=$this->getData('target')) ? $target : '_blank';
16
- }
17
-
18
- public function getOnClick()
19
- {
20
- if (!$this->getData('on_click')) {
21
- return $this->getData('onclick');
22
- }
23
- return $this->getData('on_click');
24
- }
25
-
26
- protected function _toHtml()
27
- {
28
- $html = $this->getBeforeHtml().'<a '
29
- . ($this->getId()?' id="'.$this->getId() . '"':'')
30
- . ($this->getElementName()?' name="'.$this->getElementName() . '"':'')
31
- . ' href="'.$this->getHref() .'"'
32
- . ' title="'
33
- . $this->quoteEscape($this->getTitle() ? $this->getTitle() : $this->getLabel())
34
- . '"'
35
- . ' class="scalable ' . $this->getClass() . ($this->getDisabled() ? ' disabled' : '') . '"'
36
- . ' onclick="'.$this->getOnClick().'"'
37
- . ' style="'.$this->getStyle() .'"'
38
- . ' target="'.$this->getTarget() .'"'
39
- . ($this->getValue()?' value="'.$this->getValue() . '"':'')
40
- . ($this->getDisabled() ? ' disabled="disabled"' : '')
41
- . '><span><span><span>' .$this->getLabel().'</span></span></span></a>'.$this->getAfterHtml();
42
-
43
- return $html;
44
- }
45
-
46
- /**
47
- * Escape quotes inside html attributes
48
- * Use $addSlashes = false for escaping js that inside html attribute (onClick, onSubmit etc)
49
- *
50
- * @param string $data
51
- * @param bool $addSlashes
52
- * @return string
53
- */
54
- public function quoteEscape($data, $addSlashes = false)
55
- {
56
- if ($addSlashes === true) {
57
- $data = addslashes($data);
58
- }
59
- return htmlspecialchars($data, ENT_QUOTES, null, false);
60
- }
61
- }
1
+ <?php
2
+
3
+ class Zota_Zotabox_Block_Adminhtml_Widget_Button extends Mage_Adminhtml_Block_Widget
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ }
9
+
10
+ public function getHref() {
11
+ return ($href=$this->getData('href')) ? $href : 'javascript:void(0);';
12
+ }
13
+
14
+ public function getTarget() {
15
+ return ($target=$this->getData('target')) ? $target : '_blank';
16
+ }
17
+
18
+ public function getOnClick()
19
+ {
20
+ if (!$this->getData('on_click')) {
21
+ return $this->getData('onclick');
22
+ }
23
+ return $this->getData('on_click');
24
+ }
25
+
26
+ protected function _toHtml()
27
+ {
28
+ $html = $this->getBeforeHtml().'<a '
29
+ . ($this->getId()?' id="'.$this->getId() . '"':'')
30
+ . ($this->getElementName()?' name="'.$this->getElementName() . '"':'')
31
+ . ' href="'.$this->getHref() .'"'
32
+ . ' title="'
33
+ . $this->quoteEscape($this->getTitle() ? $this->getTitle() : $this->getLabel())
34
+ . '"'
35
+ . ' class="scalable ' . $this->getClass() . ($this->getDisabled() ? ' disabled' : '') . '"'
36
+ . ' onclick="'.$this->getOnClick().'"'
37
+ . ' style="'.$this->getStyle() .'"'
38
+ . ' target="'.$this->getTarget() .'"'
39
+ . ($this->getValue()?' value="'.$this->getValue() . '"':'')
40
+ . ($this->getDisabled() ? ' disabled="disabled"' : '')
41
+ . '><span><span><span>' .$this->getLabel().'</span></span></span></a>'.$this->getAfterHtml();
42
+
43
+ return $html;
44
+ }
45
+
46
+ /**
47
+ * Escape quotes inside html attributes
48
+ * Use $addSlashes = false for escaping js that inside html attribute (onClick, onSubmit etc)
49
+ *
50
+ * @param string $data
51
+ * @param bool $addSlashes
52
+ * @return string
53
+ */
54
+ public function quoteEscape($data, $addSlashes = false)
55
+ {
56
+ if ($addSlashes === true) {
57
+ $data = addslashes($data);
58
+ }
59
+ return htmlspecialchars($data, ENT_QUOTES, null, false);
60
+ }
61
+ }
app/code/community/Zota/Zotabox/Helper/Data.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  class Zota_Zotabox_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
- const ZOTABOX_DOMAIN_URL = 'zotabox.com';
5
 
6
  public function getDomainUrl($subDomain = 'widgets', $protocol = 'http') {
7
  return "{$protocol}://{$subDomain}." . self::ZOTABOX_DOMAIN_URL;
1
  <?php
2
  class Zota_Zotabox_Helper_Data extends Mage_Core_Helper_Abstract
3
  {
4
+ const ZOTABOX_DOMAIN_URL = 'zotabox.local';
5
 
6
  public function getDomainUrl($subDomain = 'widgets', $protocol = 'http') {
7
  return "{$protocol}://{$subDomain}." . self::ZOTABOX_DOMAIN_URL;
app/design/adminhtml/default/default/template/zotabox/asset.phtml CHANGED
@@ -1,6 +1,6 @@
1
  <script type="text/javascript">
2
  $('config_edit_form').insert({
3
- before: '<a href="http://zotabox.com" target="_zotabox"><img id="zotabox_brand" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) ?>zotabox/logo-zotabox.png" alt="zotabox" title="Zotabox"></a>'
4
  });
5
 
6
  document.observe("dom:loaded", function() {
1
  <script type="text/javascript">
2
  $('config_edit_form').insert({
3
+ before: '<a href="http://zotabox.com?utm_source=<?php echo Mage::helper("core/url")->getHomeUrl() ?>&utm_medium=magento plugin&utm_campaign=ecommerce plugins" target="_zotabox"><img id="zotabox_brand" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN) ?>zotabox/logo-zotabox.png" alt="zotabox" title="Zotabox"></a>'
4
  });
5
 
6
  document.observe("dom:loaded", function() {
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Zota_Zotabox</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
@@ -12,9 +12,9 @@ with These FREE Customizable Tools for Your Website</summary>
12
  with These FREE Customizable Tools for Your Website</description>
13
  <notes>Release Zotabox magento extension</notes>
14
  <authors><author><name>zotabox</name><user>zotabox</user><email>support@zotabox.com</email></author></authors>
15
- <date>2015-06-01</date>
16
- <time>10:14:12</time>
17
- <contents><target name="mageskin"><dir name="zotabox"><file name="bg_body.png" hash="9c80e8c1efae9f432416ebc9a3731b50"/><file name="check.png" hash="8923586db9a3ee5d3239e3ede52d3d33"/><file name="icon.png" hash="091df18a2b6722b22ad88ec3ea19999d"/><file name="logo-zotabox.png" hash="7b1aa437adce08c6debe088b2859141b"/></dir></target><target name="magecommunity"><dir name="Zota"><dir name="Zotabox"><dir name="Block"><dir name="Adminhtml"><dir name="Source"><dir name="System"><dir name="Config"><file name="Connectbutton.php" hash="5c1a292f98a0478eec66a235b36e1aed"/><file name="Disconnectbutton.php" hash="a9dea7b8c5e350dbc47949a60fbeec94"/><file name="SaveEmbedCodeButton.php" hash="38e598c6c81553af83c68c5564ac0ac5"/><file name="ShowEmbedCodeButton.php" hash="a89b7d3e7dbbe070571c0ede3ab709a6"/></dir></dir></dir><dir name="Widget"><file name="Asset.php" hash="78ce9a5edcded3e553c846d79ce74108"/><file name="Button.php" hash="3c54d3ee3ae3a40a496a1168f4be10d8"/></dir></dir><file name="Script.php" hash="65c38311cd379ed186836478322d2fae"/></dir><dir name="Helper"><file name="Data.php" hash="2e6c4643a982023089a30f1fe2be777c"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ZotaboxController.php" hash="42ef274439d6540fc0b559413e4645de"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="fae757ddf69c715a3f46d72bf583b6d2"/><file name="config.xml" hash="1de51c8659324c564ca4834e46f8de28"/><file name="system.xml" hash="235e6ee3df67a6ce07f1894e4067cd23"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="zotabox"><file name="asset.phtml" hash="bd9db9e96097ddf997ba7a91f8834f7e"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="zotabox"><file name="script.phtml" hash="90e5b756ddf5433a317c21aacc2bc855"/></dir></dir><dir name="layout"><file name="zotabox.xml" hash="512208f8d451ecb29215196dfa9f14ab"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zota_Zotabox.xml" hash="830f655a238f4c63c9f05d7dad099324"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>4.0.0</min><max>7.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Zota_Zotabox</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
7
  <channel>community</channel>
12
  with These FREE Customizable Tools for Your Website</description>
13
  <notes>Release Zotabox magento extension</notes>
14
  <authors><author><name>zotabox</name><user>zotabox</user><email>support@zotabox.com</email></author></authors>
15
+ <date>2015-09-01</date>
16
+ <time>07:42:40</time>
17
+ <contents><target name="mageskin"><dir name="zotabox"><file name="bg_body.png" hash="9c80e8c1efae9f432416ebc9a3731b50"/><file name="check.png" hash="8923586db9a3ee5d3239e3ede52d3d33"/><file name="icon.png" hash="091df18a2b6722b22ad88ec3ea19999d"/><file name="logo-zotabox.png" hash="7b1aa437adce08c6debe088b2859141b"/></dir></target><target name="magecommunity"><dir name="Zota"><dir name="Zotabox"><dir name="Block"><dir name="Adminhtml"><dir name="Source"><dir name="System"><dir name="Config"><file name="Connectbutton.php" hash="df55e8ad97bbfe845b824ae1e4e77629"/><file name="Disconnectbutton.php" hash="a9dea7b8c5e350dbc47949a60fbeec94"/><file name="SaveEmbedCodeButton.php" hash="38e598c6c81553af83c68c5564ac0ac5"/><file name="ShowEmbedCodeButton.php" hash="a89b7d3e7dbbe070571c0ede3ab709a6"/></dir></dir></dir><dir name="Widget"><file name="Asset.php" hash="78ce9a5edcded3e553c846d79ce74108"/><file name="Button.php" hash="3c7f4b47b827cef0f783f24177672574"/></dir></dir><file name="Script.php" hash="65c38311cd379ed186836478322d2fae"/></dir><dir name="Helper"><file name="Data.php" hash="7a4d6850d9cab98f6e0599376edd872e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ZotaboxController.php" hash="42ef274439d6540fc0b559413e4645de"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="fae757ddf69c715a3f46d72bf583b6d2"/><file name="config.xml" hash="1de51c8659324c564ca4834e46f8de28"/><file name="system.xml" hash="235e6ee3df67a6ce07f1894e4067cd23"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="zotabox"><file name="asset.phtml" hash="8777bbe5c003d7c50967e3008a5f0279"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="zotabox"><file name="script.phtml" hash="90e5b756ddf5433a317c21aacc2bc855"/></dir></dir><dir name="layout"><file name="zotabox.xml" hash="512208f8d451ecb29215196dfa9f14ab"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Zota_Zotabox.xml" hash="830f655a238f4c63c9f05d7dad099324"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>4.0.0</min><max>7.0.0</max></php></required></dependencies>
20
  </package>