Pubble_io - Version 1.1.2

Version Notes

Removes Observer approach to adding the Pubble javascript and adds the script and html via layout XML instead.

Download this release

Release Info

Developer StudioForty9
Extension Pubble_io
Version 1.1.2
Comparing to
See all releases


Code changes from version 1.1.1 to 1.1.2

app/code/community/Pubble/Messenger/Block/Script.php CHANGED
@@ -6,7 +6,7 @@
6
  * @package Pubble_Messenger
7
  * @author Pubble <ross@pubble.io>
8
  * @copyright 2016 Pubble (http://www.pubble.io)
9
- * @version 1.1.0
10
  */
11
 
12
  /**
@@ -31,6 +31,10 @@ class Pubble_Messenger_Block_Script extends Mage_Core_Block_Template
31
  */
32
  public function render()
33
  {
 
 
 
 
34
  $appId = $this->_getHelper()->getAppId();
35
  $identifier = $this->_getHelper()->getIdentifier();
36
 
6
  * @package Pubble_Messenger
7
  * @author Pubble <ross@pubble.io>
8
  * @copyright 2016 Pubble (http://www.pubble.io)
9
+ * @version 1.1.2
10
  */
11
 
12
  /**
31
  */
32
  public function render()
33
  {
34
+ /*if (! $this->_getHelper()->isEnabled()) {
35
+ return false;
36
+ }*/
37
+
38
  $appId = $this->_getHelper()->getAppId();
39
  $identifier = $this->_getHelper()->getIdentifier();
40
 
app/code/community/Pubble/Messenger/Helper/Data.php CHANGED
@@ -6,7 +6,7 @@
6
  * @package Pubble_Messenger
7
  * @author Pubble <ross@pubble.io>
8
  * @copyright 2016 Pubble (http://www.pubble.io)
9
- * @version 1.1.0
10
  */
11
 
12
  /**
6
  * @package Pubble_Messenger
7
  * @author Pubble <ross@pubble.io>
8
  * @copyright 2016 Pubble (http://www.pubble.io)
9
+ * @version 1.1.2
10
  */
11
 
12
  /**
app/code/community/Pubble/Messenger/Model/Observer.php CHANGED
@@ -6,7 +6,7 @@
6
  * @package Pubble_Messenger
7
  * @author Pubble <ross@pubble.io>
8
  * @copyright 2016 Pubble (http://www.pubble.io)
9
- * @version 1.1.0
10
  */
11
 
12
  /**
@@ -48,13 +48,15 @@ class Pubble_Messenger_Model_Observer
48
  /** @var Mage_Core_Model_Layout $layout */
49
  /** @var Pubble_Messenger_Block_Script $pubble */
50
  $layout = Mage::app()->getLayout();
51
- if ($layout && !Mage::app()->getRequest()->isPost()) {
 
52
  $pubble = $layout->createBlock(self::BLOCK_NAME, self::BLOCK_ALIAS);
53
  $pubble->setTemplate(self::BLOCK_TEMPLATE);
54
  $layout->getBlock(self::BLOCK_TARGET)->append($pubble);
55
-
56
- return $pubble;
57
  }
 
 
 
58
  } catch (Exception $e) {
59
  Mage::logException($e);
60
  return false;
6
  * @package Pubble_Messenger
7
  * @author Pubble <ross@pubble.io>
8
  * @copyright 2016 Pubble (http://www.pubble.io)
9
+ * @version 1.1.2
10
  */
11
 
12
  /**
48
  /** @var Mage_Core_Model_Layout $layout */
49
  /** @var Pubble_Messenger_Block_Script $pubble */
50
  $layout = Mage::app()->getLayout();
51
+
52
+ if ($layout) {
53
  $pubble = $layout->createBlock(self::BLOCK_NAME, self::BLOCK_ALIAS);
54
  $pubble->setTemplate(self::BLOCK_TEMPLATE);
55
  $layout->getBlock(self::BLOCK_TARGET)->append($pubble);
 
 
56
  }
57
+
58
+ return $pubble;
59
+
60
  } catch (Exception $e) {
61
  Mage::logException($e);
62
  return false;
app/code/community/Pubble/Messenger/etc/config.xml CHANGED
@@ -7,13 +7,13 @@
7
  * @package Pubble_Messenger
8
  * @author Pubble <ross@pubble.io>
9
  * @copyright 2016 Pubble (http://www.pubble.io)
10
- * @version 1.1.0
11
  */
12
  -->
13
  <config>
14
  <modules>
15
  <Pubble_Messenger>
16
- <version>1.1.0</version>
17
  </Pubble_Messenger>
18
  </modules>
19
  <global>
@@ -41,17 +41,13 @@
41
  </resources>
42
  </global>
43
  <frontend>
44
- <events>
45
- <controller_action_layout_generate_blocks_after>
46
- <observers>
47
- <pubble_messenger>
48
- <type>singleton</type>
49
- <class>Pubble_Messenger_Model_Observer</class>
50
- <method>addPubbleBeforeBodyEnd</method>
51
- </pubble_messenger>
52
- </observers>
53
- </controller_action_layout_generate_blocks_after>
54
- </events>
55
  </frontend>
56
  <adminhtml>
57
  <acl>
7
  * @package Pubble_Messenger
8
  * @author Pubble <ross@pubble.io>
9
  * @copyright 2016 Pubble (http://www.pubble.io)
10
+ * @version 1.1.2
11
  */
12
  -->
13
  <config>
14
  <modules>
15
  <Pubble_Messenger>
16
+ <version>1.1.2</version>
17
  </Pubble_Messenger>
18
  </modules>
19
  <global>
41
  </resources>
42
  </global>
43
  <frontend>
44
+ <layout>
45
+ <updates>
46
+ <pubble_messenger>
47
+ <file>pubble_messenger.xml</file>
48
+ </pubble_messenger>
49
+ </updates>
50
+ </layout>
 
 
 
 
51
  </frontend>
52
  <adminhtml>
53
  <acl>
app/code/community/Pubble/Messenger/etc/system.xml CHANGED
@@ -7,7 +7,7 @@
7
  * @package Pubble_Messenger
8
  * @author Pubble <ross@pubble.io>
9
  * @copyright 2016 Pubble (http://www.pubble.io)
10
- * @version 1.1.0
11
  */
12
  -->
13
  <config>
7
  * @package Pubble_Messenger
8
  * @author Pubble <ross@pubble.io>
9
  * @copyright 2016 Pubble (http://www.pubble.io)
10
+ * @version 1.1.2
11
  */
12
  -->
13
  <config>
app/design/frontend/base/default/layout/pubble_messenger.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ /**
4
+ * Pubble_Messenger
5
+ *
6
+ * @category Pubble
7
+ * @package Pubble_Messenger
8
+ * @author Pubble <ross@pubble.io>
9
+ * @copyright 2016 Pubble (http://www.pubble.io)
10
+ * @version 1.1.2
11
+ */
12
+ -->
13
+ <layout version="0.1.0">
14
+ <default>
15
+ <reference name="before_body_end">
16
+ <block type="pubble_messenger/script" name="pubble.messenger.script" after="-" template="pubble/messenger/script.phtml"/>
17
+ </reference>
18
+ </default>
19
+ </layout>
app/etc/modules/Pubble_Messenger.xml CHANGED
@@ -7,7 +7,7 @@
7
  * @package Pubble_Messenger
8
  * @author Pubble <ross@pubble.io>
9
  * @copyright 2016 Pubble (http://www.pubble.io)
10
- * @version 1.1.0
11
  */
12
  -->
13
  <config>
7
  * @package Pubble_Messenger
8
  * @author Pubble <ross@pubble.io>
9
  * @copyright 2016 Pubble (http://www.pubble.io)
10
+ * @version 1.1.2
11
  */
12
  -->
13
  <config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pubble_io</name>
4
- <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/BSD-3-Clause">BSDL</license>
7
  <channel>community</channel>
@@ -9,11 +9,11 @@
9
  <summary>Easily install your Pubble messenger code on Magento via the admin configuration panel.</summary>
10
  <description>&lt;p&gt;Supports enabling/disabling the extension.&lt;/p&gt;&#xD;
11
  &lt;p&gt;Supports adding the messenger widget to your site by adding in the App ID and Identifier fields.&lt;/p&gt;</description>
12
- <notes>Bug fix release to coincide with updates to loader.js</notes>
13
  <authors><author><name>StudioForty9</name><user>SF9</user><email>info@studioforty9.com</email></author><author><name>Eoghan O'Brien</name><user>eoghanobrien</user><email>eoghan@eoghanobrien.com</email></author><author><name>Pubble</name><user>soleary</user><email>shane@pubble.co</email></author></authors>
14
- <date>2016-05-26</date>
15
- <time>22:41:46</time>
16
- <contents><target name="magecommunity"><dir name="Pubble"><dir name="Messenger"><dir name="Block"><file name="Script.php" hash="a9e10c0429e4dd8727deb2896f5bd156"/></dir><dir name="Helper"><file name="Data.php" hash="f9f8e5fd410049d31d5b29313213e768"/></dir><dir name="Model"><file name="Observer.php" hash="be4de0a8f94e0567c7f905a659445138"/></dir><dir name="data"><dir name="pubble_messenger_setup"><file name="data-install-1.0.0.php" hash="fc5613da1937dd4047c05e6aced07583"/><file name="data-upgrade-1.0.0-1.1.0.php" hash="1f9b0d9f43fa30f6a03567cc775aaf85"/></dir></dir><dir name="etc"><file name="config.xml" hash="cced71628d9ccb4ebc85d7dda743a662"/><file name="system.xml" hash="148a3011f62260f83be52fe1a3818b3c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="pubble"><file name="messenger" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pubble_Messenger.xml" hash="b4ad026649e3c24dc6059d70241e07e0"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.00.00</min><max>7.99.99</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pubble_io</name>
4
+ <version>1.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/BSD-3-Clause">BSDL</license>
7
  <channel>community</channel>
9
  <summary>Easily install your Pubble messenger code on Magento via the admin configuration panel.</summary>
10
  <description>&lt;p&gt;Supports enabling/disabling the extension.&lt;/p&gt;&#xD;
11
  &lt;p&gt;Supports adding the messenger widget to your site by adding in the App ID and Identifier fields.&lt;/p&gt;</description>
12
+ <notes>Removes Observer approach to adding the Pubble javascript and adds the script and html via layout XML instead.</notes>
13
  <authors><author><name>StudioForty9</name><user>SF9</user><email>info@studioforty9.com</email></author><author><name>Eoghan O'Brien</name><user>eoghanobrien</user><email>eoghan@eoghanobrien.com</email></author><author><name>Pubble</name><user>soleary</user><email>shane@pubble.co</email></author></authors>
14
+ <date>2016-05-27</date>
15
+ <time>00:24:45</time>
16
+ <contents><target name="magecommunity"><dir name="Pubble"><dir name="Messenger"><dir name="Block"><file name="Script.php" hash="ab6dab6741ce53d1bbc37f037014635e"/></dir><dir name="Helper"><file name="Data.php" hash="6b87aecab0f870936473b32f8839800b"/></dir><dir name="Model"><file name="Observer.php" hash="4f1f43c4dbfe3c438c45ede5652ca927"/></dir><dir name="data"><dir name="pubble_messenger_setup"><file name="data-install-1.0.0.php" hash="fc5613da1937dd4047c05e6aced07583"/><file name="data-upgrade-1.0.0-1.1.0.php" hash="1f9b0d9f43fa30f6a03567cc775aaf85"/></dir></dir><dir name="etc"><file name="config.xml" hash="2b1f4d1b30e43754debc8d4788da0e9f"/><file name="system.xml" hash="9492af746d38ab3f7e59907d97f60985"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="pubble"><file name="messenger" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir><dir name="layout"><file name="pubble_messenger.xml" hash="9210dde82a585466e81be10940ed5f86"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pubble_Messenger.xml" hash="c45ad34b9b9717399a0ac60da3b233b4"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.00.00</min><max>7.99.99</max></php></required></dependencies>
19
  </package>