addthis_sharingtool - Version 2.0.2

Version Notes

* Fixed issues in product review page
* Fixed issues with magento version 1.6

Download this release

Release Info

Developer AddThis
Extension addthis_sharingtool
Version 2.0.2
Comparing to
See all releases


Code changes from version 2.0.1 to 2.0.2

app/code/community/AddThis/PluginsGeneral/etc/system.xml CHANGED
@@ -18,6 +18,28 @@
18
  <groups>
19
  <general translate="label" module="pluginsgeneral">
20
  <label>General</label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  <sort_order>800</sort_order>
22
  <show_in_default>1</show_in_default>
23
  <show_in_website>1</show_in_website>
18
  <groups>
19
  <general translate="label" module="pluginsgeneral">
20
  <label>General</label>
21
+ <comment><![CDATA[<label id="at-messages"></label>
22
+ <script>
23
+ Event.observe(window, "load", function(){
24
+ window.checkProUser = function (arg) {
25
+ if (JSON.stringify(arg) == '{}'){
26
+ document.getElementById('at-messages').innerHTML = "AddThis Pro now available - start your trial at <a href='http://www.addthis.com' target='_blank' >www.addthis.com</a> and get premium widgets, personalized content recommendations, advanced customization options and priority support.";
27
+ }else{
28
+ document.getElementById('at-messages').innerHTML = "Since You are an AddThis Pro user, your SmartLayers configuration options will be overwritten by those in your AddThis Pro <a href='https://www.addthis.com/dashboard#gallery' target='_blank'>Tool Gallery</a>.";
29
+ }
30
+ };
31
+ var AtProConfig = function () {
32
+ var at_json = document.createElement('script');
33
+ var at_pub = document.getElementById('plugins_general_general_pubid').value;
34
+ at_pub = (at_pub!="")? at_pub:"Your-Profile-ID";
35
+ at_json.src = decodeURIComponent('http://q.addthis.com/feeds/1.0/config.json?pubid='+at_pub+'%26callback=window.checkProUser');
36
+ document.body.appendChild(at_json);
37
+ }
38
+ AtProConfig();
39
+ document.getElementById('plugins_general_general_pubid').onblur = AtProConfig;
40
+ });
41
+ </script>
42
+ ]]></comment>
43
  <sort_order>800</sort_order>
44
  <show_in_default>1</show_in_default>
45
  <show_in_website>1</show_in_website>
app/code/community/AddThis/SharingTool/Model/Observer.php CHANGED
@@ -20,21 +20,19 @@
20
  class AddThis_SharingTool_Model_Observer
21
  {
22
  public function addButtonsHtml($observer){
23
- if(version_compare(Mage::getVersion(), "1.6") != 1){
24
- $block = $observer->getBlock();
25
- $transport = $observer->getTransport();
26
-
27
- if ($block->getNameInLayout()=='product_review_list.count') {
28
-
29
- $plugin_enabled = Mage::getStoreConfig('sharing_tool/general/enabled');
30
-
31
- if($plugin_enabled!=0){
32
- $html = $transport->getHtml();
33
- $buttons = Mage::app()->getLayout()->createBlock('sharingtool/share', 'addthis', array('template'=>'addthis/sharingtool/share.phtml'));
34
- $html .= $buttons->toHtml();
35
- $transport->setHtml($html);
36
- }
37
- }
38
- }
39
  }
40
  }
20
  class AddThis_SharingTool_Model_Observer
21
  {
22
  public function addButtonsHtml($observer){
23
+ $block = $observer->getBlock();
24
+ $transport = $observer->getTransport();
25
+
26
+ if ($block->getNameInLayout()=='product_review_list.count' && is_object($transport)) {
27
+
28
+ $plugin_enabled = Mage::getStoreConfig('sharing_tool/general/enabled');
29
+
30
+ if($plugin_enabled!=0){
31
+ $html = $transport->getHtml();
32
+ $buttons = Mage::app()->getLayout()->createBlock('sharingtool/share', 'addthis', array('template'=>'addthis/sharingtool/share.phtml'));
33
+ $html .= $buttons->toHtml();
34
+ $transport->setHtml($html);
35
+ }
36
+ }
 
 
37
  }
38
  }
app/code/community/AddThis/SmartLayers/Model/Observer.php DELETED
@@ -1,39 +0,0 @@
1
- <?php
2
- /*
3
- * Copyright (C) 2012 Clearspring Technologies, Inc.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- ?>
18
- <?php
19
-
20
- class AddThis_SmartLayers_Model_Observer
21
- {
22
- public function addButtonsHtml($observer)
23
- {
24
- $block = $observer->getBlock();
25
- $transport = $observer->getTransport();
26
-
27
- if ($block->getNameInLayout()=='product_review_list.count') {
28
-
29
- $plugin_enabled = Mage::getStoreConfig('sharing_tool/general/enabled');
30
-
31
- if($plugin_enabled!=0){
32
- $html = $transport->getHtml();
33
- $buttons = Mage::app()->getLayout()->createBlock('sharingtool/share', 'addthis', array('template'=>'addthis/sharingtool/share.phtml'));
34
- $html .= $buttons->toHtml();
35
- $transport->setHtml($html);
36
- }
37
- }
38
- }
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/AddThis/SmartLayers/etc/config.xml CHANGED
@@ -84,17 +84,6 @@
84
  </smartlayers>
85
  </updates>
86
  </layout>
87
- <events>
88
- <core_block_abstract_to_html_after>
89
- <observers>
90
- <smartlayers>
91
- <type>singleton</type>
92
- <class>smartlayers/observer</class>
93
- <method>addButtonsHtml</method>
94
- </smartlayers>
95
- </observers>
96
- </core_block_abstract_to_html_after>
97
- </events>
98
  </frontend>
99
  <adminhtml>
100
  <acl>
84
  </smartlayers>
85
  </updates>
86
  </layout>
 
 
 
 
 
 
 
 
 
 
 
87
  </frontend>
88
  <adminhtml>
89
  <acl>
package.xml CHANGED
@@ -1,20 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>addthis_sharingtool</name>
4
- <version>2.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0">Apache</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>AddThis makes it easy for any visitor to share your content to over 350 services. Developed by AddThis.</summary>
10
  <description>Get more traffic back to your site by installing the AddThis Magento Extension! With AddThis, your users can promote your content by sharing to 350 of the most popular social networking and bookmarking sites (like Facebook, Twitter, Google +1, Pinterest and LinkedIn). AddThis is used on over 12 million domains, seen by over 1.2 billion users a month, quick to load and recognized all over the web. Optionally, sign up for a free AddThis.com account to see how your visitors are sharing your content: which services they're using for sharing (including their browser address bar), which content is shared the most, what text of interest they're copying from your site, and more. Analytics are available in real time. Developed in-house by AddThis.com.&#xD;
11
- Now we have also incorporated SmartLayers in this extension to make your site smarter. Increase traffic, engagement and revenue by instantly showing the right social tools and content to every visitor. It's one piece of code, mobile-ready and free! </description>
12
- <notes>* Implemented SmartLayers&#xD;
13
- * Added new section for managing Profile ID</notes>
14
  <authors><author><name>AddThis</name><user>plugins_addthis</user><email>plugins@addthis.com</email></author></authors>
15
- <date>2013-11-11</date>
16
- <time>13:44:13</time>
17
- <contents><target name="mageetc"><dir name="modules"><file name="AddThis_Sharingtool.xml" hash="07328e21767411eac7403ccc78bb2710"/></dir></target><target name="magecommunity"><dir name="AddThis"><dir name="PluginsGeneral"><dir name="Helper"><file name="Data.php" hash="c2229d706cafec9f49fd9c88f1b73759"/></dir><dir name="etc"><file name="config.xml" hash="ae6e1db765bc79317cf707e158da2a40"/><file name="system.xml" hash="1912ba67e3b0847ff479aa0006dd0a68"/></dir></dir><dir name="SharingTool"><dir name="Block"><file name="Share.php" hash="010ceb12934ef3ae39b348495f29c966"/></dir><dir name="Helper"><file name="Data.php" hash="d78c69dd706b97e39ef4c856c3c9d938"/></dir><dir name="Model"><file name="Observer.php" hash="9a322fef544361af90a8cf5d944f67ac"/><dir name="Source"><file name="Buttons.php" hash="36747ed838586886dd8d7c5412db6183"/><file name="Languages.php" hash="c2527e95cfc81de57230fc41413da30e"/><file name="Menuhover.php" hash="403712eca479672709c8d400c3e8fb71"/><file name="Menuversions.php" hash="7c68a011a001b44f202f5774c32880ba"/><file name="Uihover.php" hash="619d9e5d96f15da367af4096ab448f5a"/></dir></dir><dir name="etc"><file name="config.xml" hash="0229919cfd8c17bf9ca572d449d58d81"/><file name="system.xml" hash="4a91cc8f41a1fca85269f9aad31c77de"/></dir></dir><dir name="SmartLayers"><dir name="Block"><file name="Layer.php" hash="ff9c97fee5c9d729da2a251a776f1cc6"/></dir><dir name="Helper"><file name="Data.php" hash="5e7c2293a8b4211614284c73bd67b982"/></dir><dir name="Model"><file name="Observer.php" hash="77a1a1a8b90401f70b0a7f3cd7b44c3a"/><dir name="Source"><file name="Sharebuttoncount.php" hash="bc069484c899b8a6d7ce7aa2ac190825"/><file name="Shareposition.php" hash="5423eb0a41d7ffa37ddc7731527f1787"/><file name="Theme.php" hash="7dbedb75131d4f2166a5f967c607b877"/></dir></dir><dir name="etc"><file name="config.xml" hash="85d64e8cb9c612492ff6199b3d05b286"/><file name="system.xml" hash="84ea3c15dfccedb192688dd8936d2fab"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="smartlayers.xml" hash="d7446606b33be1dc05f26ee960615044"/><file name="sharingtool.xml" hash="c3408376e653249f8c26c64a65190877"/></dir><dir name="template"><dir name="addthis"><dir name="sharingtool"><file name="share.phtml" hash="9bb3dda42fae0b71b366d0eaa33fb1c7"/></dir><dir name="smartlayers"><file name="smartlayers.phtml" hash="b743cd2866a700b6c4ec6e96969389eb"/></dir></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>addthis_sharingtool</name>
4
+ <version>2.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0">Apache</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>AddThis makes it easy for any visitor to share your content to over 350 services. Developed by AddThis.</summary>
10
  <description>Get more traffic back to your site by installing the AddThis Magento Extension! With AddThis, your users can promote your content by sharing to 350 of the most popular social networking and bookmarking sites (like Facebook, Twitter, Google +1, Pinterest and LinkedIn). AddThis is used on over 12 million domains, seen by over 1.2 billion users a month, quick to load and recognized all over the web. Optionally, sign up for a free AddThis.com account to see how your visitors are sharing your content: which services they're using for sharing (including their browser address bar), which content is shared the most, what text of interest they're copying from your site, and more. Analytics are available in real time. Developed in-house by AddThis.com.&#xD;
11
+ Now we have also incorporated SmartLayers in this extension to make your site smarter. Increase traffic, engagement and revenue by instantly showing the right social tools and content to every visitor. It's one piece of code, mobile-ready and free!</description>
12
+ <notes>* Fixed issues in product review page&#xD;
13
+ * Fixed issues with magento version 1.6</notes>
14
  <authors><author><name>AddThis</name><user>plugins_addthis</user><email>plugins@addthis.com</email></author></authors>
15
+ <date>2014-02-11</date>
16
+ <time>10:46:23</time>
17
+ <contents><target name="mageetc"><dir name="modules"><file name="AddThis_Sharingtool.xml" hash="07328e21767411eac7403ccc78bb2710"/></dir></target><target name="magecommunity"><dir name="AddThis"><dir name="PluginsGeneral"><dir name="Helper"><file name="Data.php" hash="c2229d706cafec9f49fd9c88f1b73759"/></dir><dir name="etc"><file name="config.xml" hash="ae6e1db765bc79317cf707e158da2a40"/><file name="system.xml" hash="a99bfb7938abc312e734d36bbfc862f5"/></dir></dir><dir name="SharingTool"><dir name="Block"><file name="Share.php" hash="010ceb12934ef3ae39b348495f29c966"/></dir><dir name="Helper"><file name="Data.php" hash="d78c69dd706b97e39ef4c856c3c9d938"/></dir><dir name="Model"><file name="Observer.php" hash="92ba57c22bc7fa3cbdf650b8ac33c10a"/><dir name="Source"><file name="Buttons.php" hash="36747ed838586886dd8d7c5412db6183"/><file name="Languages.php" hash="c2527e95cfc81de57230fc41413da30e"/><file name="Menuhover.php" hash="403712eca479672709c8d400c3e8fb71"/><file name="Menuversions.php" hash="7c68a011a001b44f202f5774c32880ba"/><file name="Uihover.php" hash="619d9e5d96f15da367af4096ab448f5a"/></dir></dir><dir name="etc"><file name="config.xml" hash="0229919cfd8c17bf9ca572d449d58d81"/><file name="system.xml" hash="4a91cc8f41a1fca85269f9aad31c77de"/></dir></dir><dir name="SmartLayers"><dir name="Block"><file name="Layer.php" hash="ff9c97fee5c9d729da2a251a776f1cc6"/></dir><dir name="Helper"><file name="Data.php" hash="5e7c2293a8b4211614284c73bd67b982"/></dir><dir name="Model"><dir name="Source"><file name="Sharebuttoncount.php" hash="bc069484c899b8a6d7ce7aa2ac190825"/><file name="Shareposition.php" hash="5423eb0a41d7ffa37ddc7731527f1787"/><file name="Theme.php" hash="7dbedb75131d4f2166a5f967c607b877"/></dir></dir><dir name="etc"><file name="config.xml" hash="08a20fe5558cb6822a7ef2c97586102b"/><file name="system.xml" hash="84ea3c15dfccedb192688dd8936d2fab"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="sharingtool.xml" hash="c3408376e653249f8c26c64a65190877"/><file name="smartlayers.xml" hash="d7446606b33be1dc05f26ee960615044"/></dir><dir name="template"><dir name="addthis"><dir name="sharingtool"><file name="share.phtml" hash="9bb3dda42fae0b71b366d0eaa33fb1c7"/></dir><dir name="smartlayers"><file name="smartlayers.phtml" hash="b743cd2866a700b6c4ec6e96969389eb"/></dir></dir></dir></dir></dir></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>