addthis_sharingtool - Version 2.1.0

Version Notes

* Moved frontend design files to base
* Updated button images in configuration page

Download this release

Release Info

Developer AddThis
Extension addthis_sharingtool
Version 2.1.0
Comparing to
See all releases


Code changes from version 2.0.2 to 2.1.0

app/code/community/AddThis/PluginsGeneral/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <AddThis_PluginsGeneral>
5
- <version>2.0.1</version>
6
  </AddThis_PluginsGeneral>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <AddThis_PluginsGeneral>
5
+ <version>2.1.0</version>
6
  </AddThis_PluginsGeneral>
7
  </modules>
8
  <global>
app/code/community/AddThis/SharingTool/Model/Source/Buttons.php CHANGED
@@ -24,29 +24,29 @@ class AddThis_SharingTool_Model_Source_Buttons
24
  $result = array();
25
 
26
  $result[] = array('class'=>'buttons','value'=>'style_1','label'=>'&nbsp;&nbsp;
27
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/facebook.gif" style="vertical-align:middle"/>&nbsp;
28
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/twitter.gif" style="vertical-align:middle"/>&nbsp;
29
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/email.gif" style="vertical-align:middle"/>&nbsp;
30
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/google.gif" style="vertical-align:middle"/>&nbsp;
31
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/linkedin.gif" style="vertical-align:middle"/>&nbsp;
32
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/menu.gif" style="vertical-align:middle"/><br/><br/>');
33
 
34
  $result[] = array('value'=>'style_2','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/downloads/plugins/magento/gtc-like-tweet-share.gif" style="vertical-align:middle;width:273px;"/><br/><br/>');
35
 
36
- $result[] = array('value'=>'style_3','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/facebook.png" style="vertical-align:middle"/>&nbsp;
37
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/twitter.png" style="vertical-align:middle" />&nbsp;
38
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/email.png" style="vertical-align:middle" />&nbsp;
39
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/google.png" style="vertical-align:middle" />&nbsp;
40
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/linkedin.png" style="vertical-align:middle" />&nbsp;
41
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/addthis.png" style="vertical-align:middle" /><br/><br/>');
42
 
43
- $result[] = array('value'=>'style_4','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/icons/v1/thumbs/menu.gif" style="vertical-align:middle"/>&nbsp;
44
- <label>Share</label>&nbsp;<img src="https://cache.addthiscdn.com/icons/v1/thumbs/facebook.gif" style="vertical-align:middle" />&nbsp;
45
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/myspace.gif" style="vertical-align:middle" />&nbsp;
46
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/google.gif" style="vertical-align:middle" />&nbsp;
47
- <img src="https://cache.addthiscdn.com/icons/v1/thumbs/twitter.gif" style="vertical-align:middle" /><br/><br/>');
48
 
49
- $result[] = array('value'=>'style_5','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/icons/v1/thumbs/menu.gif" style="vertical-align:middle"/>&nbsp;
50
  <label>Share</label><br/><br/>');
51
 
52
 
24
  $result = array();
25
 
26
  $result[] = array('class'=>'buttons','value'=>'style_1','label'=>'&nbsp;&nbsp;
27
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/facebook.png" style="vertical-align:middle"/>&nbsp;
28
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/twitter.png" style="vertical-align:middle"/>&nbsp;
29
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/email.png" style="vertical-align:middle"/>&nbsp;
30
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/google.png" style="vertical-align:middle"/>&nbsp;
31
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/linkedin.png" style="vertical-align:middle"/>&nbsp;
32
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/menu.png" style="vertical-align:middle"/><br/><br/>');
33
 
34
  $result[] = array('value'=>'style_2','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/downloads/plugins/magento/gtc-like-tweet-share.gif" style="vertical-align:middle;width:273px;"/><br/><br/>');
35
 
36
+ $result[] = array('value'=>'style_3','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/facebook.png" style="vertical-align:middle"/>&nbsp;
37
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/twitter.png" style="vertical-align:middle" />&nbsp;
38
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/email.png" style="vertical-align:middle" />&nbsp;
39
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/google.png" style="vertical-align:middle" />&nbsp;
40
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/linkedin.png" style="vertical-align:middle" />&nbsp;
41
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/32x32/addthis.png" style="vertical-align:middle" /><br/><br/>');
42
 
43
+ $result[] = array('value'=>'style_4','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/menu.png" style="vertical-align:middle"/>&nbsp;
44
+ <label>Share</label>&nbsp;<img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/facebook.png" style="vertical-align:middle" />&nbsp;
45
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/myspace.png" style="vertical-align:middle" />&nbsp;
46
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/google.png" style="vertical-align:middle" />&nbsp;
47
+ <img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/twitter.png" style="vertical-align:middle" /><br/><br/>');
48
 
49
+ $result[] = array('value'=>'style_5','label'=>'&nbsp;&nbsp;<img src="https://cache.addthiscdn.com/icons/v2/thumbs/16x16/menu.png" style="vertical-align:middle"/>&nbsp;
50
  <label>Share</label><br/><br/>');
51
 
52
 
app/code/community/AddThis/SharingTool/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <AddThis_SharingTool>
5
- <version>2.0.1</version>
6
  </AddThis_SharingTool>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <AddThis_SharingTool>
5
+ <version>2.1.0</version>
6
  </AddThis_SharingTool>
7
  </modules>
8
  <global>
app/code/community/AddThis/SmartLayers/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <AddThis_SmartLayers>
5
- <version>2.0.1</version>
6
  </AddThis_SmartLayers>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <AddThis_SmartLayers>
5
+ <version>2.1.0</version>
6
  </AddThis_SmartLayers>
7
  </modules>
8
  <global>
app/design/frontend/{default → base}/default/layout/sharingtool.xml RENAMED
File without changes
app/design/frontend/{default → base}/default/layout/smartlayers.xml RENAMED
File without changes
app/design/frontend/default/default/template/addthis/sharingtool/share.phtml CHANGED
@@ -210,7 +210,7 @@ var addthis_config = {
210
  var at_script = document.createElement('script');
211
  at_script.src = '//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo urlencode($pubid) ?>';
212
  document.getElementsByTagName('head')[0].appendChild(at_script);
213
- var addthis_product = 'mag-sp-2.0.0';
214
  }
215
  };
216
  if(window.addEventListener)
@@ -226,4 +226,4 @@ endif; //if plugin not enabled
226
  #at3win #at3winheader h3 {
227
  text-align:left !important;
228
  }
229
- </style>
210
  var at_script = document.createElement('script');
211
  at_script.src = '//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo urlencode($pubid) ?>';
212
  document.getElementsByTagName('head')[0].appendChild(at_script);
213
+ var addthis_product = 'mag-sp-2.1.0';
214
  }
215
  };
216
  if(window.addEventListener)
226
  #at3win #at3winheader h3 {
227
  text-align:left !important;
228
  }
229
+ </style>
app/design/frontend/default/default/template/addthis/sharingtool/share.phtml~ ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /**General Options*/
20
+ $plugin_enabled = $this->getPluginEnabledStatus();
21
+ $pubid = $this->getPubId();
22
+ if(!$pubid)
23
+ $pubid = "xa-525fbbd6215b4f1a";
24
+
25
+ /**Custom Share*/
26
+ $custom_url = $this->getCustomUrl();
27
+ $custom_title = $this->getCustomTitle();
28
+ $custom_description = $this->getCustomDescription();
29
+
30
+ if($custom_url != ""):
31
+ $custom_share = "addthis:url='".$custom_url."' addthis:title='".$custom_title."' addthis:description='".$custom_description."'";
32
+ else:
33
+ $custom_share = "";
34
+ endif;
35
+
36
+ /**API COnfig Options*/
37
+ $services_exclude = $this->getExcludeServices();
38
+ $services_compact = $this->getCompactServices();
39
+ $services_expanded = $this->getExpandedServices();
40
+ $ui_click = $this->getUiClick();
41
+ $ui_delay = $this->getUiDelay();
42
+ $ui_hover_direction = $this->getUiHover();
43
+ $ui_open_windows = $this->getUiOpenWindows();
44
+ $ui_language = $this->getUiLanguage();
45
+ $ui_offset_top = $this->getUiOffsetTop();
46
+ $ui_offset_left = $this->getUiOffsetLeft();
47
+ $ui_use_css = $this->getUiCss();
48
+ $data_track_clickback = $this->getDataTrackClick();
49
+ $address_bar_share = $this->getAddressBarShare();
50
+ $data_ga_tracker = $this->getDataGaTracker();
51
+
52
+
53
+ /**Custom Service*/
54
+ $services_custom_name = $this->getCustomServiceName();
55
+ $services_custom_url = $this->getCustomServiceUrl();
56
+ $services_custom_icon = $this->getCustomServiceIcon();
57
+
58
+ ?>
59
+ <!-- Check whether the plugin is enabled -->
60
+ <?php
61
+ if($plugin_enabled!=0):
62
+ ?>
63
+
64
+ <!-- AddThis Button BEGIN -->
65
+
66
+ <!-- AddThis API Config -->
67
+ <script type='text/javascript'>
68
+ var addthis_product = 'mag-sp-2.0.0';
69
+ var addthis_config = {
70
+ <?php
71
+ if($pubid):
72
+ echo "pubid : '".$pubid."'\n";
73
+ else:
74
+ echo "pubid : 'xa-525fbbd6215b4f1a'\n";
75
+ endif;
76
+ if($services_exclude):
77
+ echo ", services_exclude : '".$services_exclude."'\n";
78
+ endif;
79
+ if($services_compact):
80
+ echo ", services_compact : '".$services_compact."'\n";
81
+ endif;
82
+ if($services_expanded):
83
+ echo ", services_expanded : '".$services_expanded."'\n";
84
+ endif;
85
+ if($services_custom_name && $services_custom_url):
86
+ echo ", services_custom : { name:'".$services_custom_name."', url:'".$services_custom_url."', icon:'".$services_custom_icon."' }\n";
87
+ endif;
88
+ if($ui_click == 0):
89
+ echo ", ui_click : true \n";
90
+ endif;
91
+ if($ui_delay):
92
+ echo ", ui_delay : '".$ui_delay."'\n";
93
+ endif;
94
+ if($ui_hover_direction != 0):
95
+ echo ", ui_hover_direction : '".$ui_hover_direction."'\n";
96
+ endif;
97
+ if($ui_open_windows == 1):
98
+ echo ", ui_open_windows : true \n";
99
+ endif;
100
+ if($ui_language != 'auto'):
101
+ echo ", ui_language : '".$ui_language."'\n";
102
+ endif;
103
+ if($data_track_clickback == 0):
104
+ echo ", data_track_clickback : false \n";
105
+ endif;
106
+ if($address_bar_share == 1):
107
+ echo ", data_track_addressbar : true \n";
108
+ endif;
109
+ if($data_ga_tracker):
110
+ echo ", data_ga_tracker : '".$data_ga_tracker."'\n";
111
+ endif;
112
+ ?>
113
+ }
114
+ </script>
115
+ <!-- AddThis API Config END -->
116
+ <?php
117
+
118
+ $button_style = $this->getButtonStyle();
119
+ switch($button_style)
120
+ {
121
+ case 'style_1':
122
+ ?>
123
+ <div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
124
+ <a class="addthis_button_preferred_1"></a>
125
+ <a class="addthis_button_preferred_2"></a>
126
+ <a class="addthis_button_preferred_3"></a>
127
+ <a class="addthis_button_preferred_4"></a>
128
+ <a class="addthis_button_compact"></a>
129
+ <a class="addthis_counter addthis_bubble_style"></a>
130
+ </div>
131
+ <?php
132
+ break;
133
+ case 'style_2':
134
+ ?>
135
+ <div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
136
+ <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
137
+ <iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://platform.twitter.com/widgets/tweet_button.html" style="width:95px; height:20px; float:left;"></iframe>
138
+ <a class="addthis_counter addthis_pill_style"></a>
139
+ </div>
140
+ <?php
141
+ break;
142
+ case 'style_4':
143
+ ?>
144
+ <div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
145
+ <a href="https://www.addthis.com/bookmark.php?v=250&amp;pubid=xa-4f0d95b663c861f6" class="addthis_button_compact">Share</a>
146
+ <span class="addthis_separator">|</span>
147
+ <a class="addthis_button_preferred_1"></a>
148
+ <a class="addthis_button_preferred_2"></a>
149
+ <a class="addthis_button_preferred_3"></a>
150
+ <a class="addthis_button_preferred_4"></a>
151
+ </div>
152
+ <?php
153
+ break;
154
+ case 'style_5':
155
+ ?>
156
+ <div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
157
+ <a href="https://www.addthis.com/bookmark.php?v=250&amp;pubid=xa-4f0d960e09c42ec4" class="addthis_button_compact">Share</a>
158
+ </div>
159
+ <?php
160
+ break;
161
+ case 'style_6':
162
+ ?>
163
+ <div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
164
+ <a class="addthis_counter addthis_pill_style"></a>
165
+ </div>
166
+ <?php
167
+ break;
168
+ case 'style_7':
169
+ ?>
170
+ <div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
171
+ <a class="addthis_counter"></a>
172
+ </div>
173
+ <?php
174
+ break;
175
+ case 'style_8':
176
+ ?>
177
+ <a class="addthis_button" href="https://www.addthis.com/bookmark.php?v=250" <?php echo $custom_share?>>
178
+ <img src="https://s7.addthis.com/static/btn/sm-plus.gif" alt="Bookmark and Share" style="border:0"/></a>
179
+ <?php
180
+ break;
181
+ case 'style_9':
182
+ $custom_button_url = $this->getCustomButtonUrl();
183
+ ?>
184
+ <a class="addthis_button" href="https://www.addthis.com/bookmark.php?v=250" <?php echo $custom_share?>>
185
+ <img src="<?php echo $custom_button_url ?>" alt="Bookmark and Share" style="border:0"/></a>
186
+ <?php
187
+ break;
188
+ case 'style_10':
189
+ $custom_button_code = $this->getCustomButtonCode();
190
+ echo $custom_button_code;
191
+
192
+ break;
193
+ default:
194
+ ?>
195
+ <div class="addthis_toolbox addthis_default_style addthis_32x32_style" <?php echo $custom_share?>>
196
+ <a class="addthis_button_preferred_1"></a>
197
+ <a class="addthis_button_preferred_2"></a>
198
+ <a class="addthis_button_preferred_3"></a>
199
+ <a class="addthis_button_preferred_4"></a>
200
+ <a class="addthis_button_compact"></a>
201
+ <a class="addthis_counter addthis_bubble_style"></a>
202
+ </div>
203
+ <?php
204
+ }//switch ends
205
+ ?>
206
+
207
+ <script>
208
+ var ats_widget = function(){
209
+ if(typeof addthis_conf == 'undefined'){
210
+ var at_script = document.createElement('script');
211
+ at_script.src = '//s7.addthis.com/js/300/addthis_widget.js#pubid=<?php echo urlencode($pubid) ?>';
212
+ document.getElementsByTagName('head')[0].appendChild(at_script);
213
+ var addthis_product = 'mag-sp-2.0.0';
214
+ }
215
+ };
216
+ if(window.addEventListener)
217
+ window.addEventListener('load',ats_widget);
218
+ else
219
+ window.attachEvent('onload',ats_widget);
220
+ </script>
221
+ <!-- AddThis Button END -->
222
+ <?php
223
+ endif; //if plugin not enabled
224
+ ?>
225
+ <style>
226
+ #at3win #at3winheader h3 {
227
+ text-align:left !important;
228
+ }
229
+ </style>
app/design/frontend/default/default/template/addthis/smartlayers/smartlayers.phtml CHANGED
@@ -50,7 +50,7 @@
50
  $atslScript .= "<script type='text/javascript' src='https://s7.addthis.com/js/300/addthis_widget.js#pubid=".urlencode($pubid)."'></script>". PHP_EOL;
51
 
52
  $atslScript .= "<script type='text/javascript'>". PHP_EOL;
53
- $atslScript .= "\tvar addthis_product='mag-sp-2.0.0';". PHP_EOL;
54
  if($custom_code_enabled == 1 && $custom_code_content != ""){
55
  $atslScript .= $custom_code_content;
56
  } else {
50
  $atslScript .= "<script type='text/javascript' src='https://s7.addthis.com/js/300/addthis_widget.js#pubid=".urlencode($pubid)."'></script>". PHP_EOL;
51
 
52
  $atslScript .= "<script type='text/javascript'>". PHP_EOL;
53
+ $atslScript .= "\tvar addthis_product='mag-sp-2.1.0';". PHP_EOL;
54
  if($custom_code_enabled == 1 && $custom_code_content != ""){
55
  $atslScript .= $custom_code_content;
56
  } else {
app/design/frontend/default/default/template/addthis/smartlayers/smartlayers.phtml~ ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ /**General Options*/
21
+ $plugin_enabled = $this->getPluginEnabledStatus();
22
+
23
+ $pubid = $this->getPubId();
24
+ if(!$pubid)
25
+ $pubid = "xa-525fbbd6215b4f1a";
26
+
27
+ $theme = $this->getTheme();
28
+
29
+ /**Follow*/
30
+ $follow_services = $this->getFollow();
31
+
32
+ /**Share*/
33
+ $share_enabled = $this->getShareEnabled();
34
+ $share_position = $this->getShareButtonPosition();
35
+ $share_count = $this->getShareButtonCount();
36
+
37
+ /**What's Next*/
38
+ $whatsnext_enabled = $this->getWhatsNextEnabled();
39
+
40
+ /**Recomended Content*/
41
+ $recomended_enabled = $this->getRecomendedEnabled();
42
+ $recomended_header = $this->getRecomendedHeader();
43
+
44
+ /**Custom Code*/
45
+ $custom_code_enabled = $this->getCustomCodeEnabled();
46
+ $custom_code_content = $this->getCustomCode();
47
+
48
+ if($plugin_enabled !=0 ){
49
+ $atslScript = "<!-- AddThis Smart Layers BEGIN -->" . PHP_EOL;
50
+ $atslScript .= "<script type='text/javascript' src='https://s7.addthis.com/js/300/addthis_widget.js#pubid=".urlencode($pubid)."'></script>". PHP_EOL;
51
+
52
+ $atslScript .= "<script type='text/javascript'>". PHP_EOL;
53
+ $atslScript .= "\tvar addthis_product='mag-sp-2.0.0';". PHP_EOL;
54
+ if($custom_code_enabled == 1 && $custom_code_content != ""){
55
+ $atslScript .= $custom_code_content;
56
+ } else {
57
+ $atslScript .= "\taddthis.layers({". PHP_EOL;
58
+ $atslScript .= "\t\t'theme' : '".$theme."'". PHP_EOL;
59
+ if($share_enabled != 0){
60
+ $atslScript .= "\t\t,'share' : {\n\t\t\t'position' : '".$share_position."',\n\t\t\t'numPreferredServices' : ".$share_count."\n\t\t}". PHP_EOL;
61
+ }
62
+ if(strlen(implode($follow_services)) != 0) {
63
+
64
+ $atslScript .= "\t\t,'follow' : {";
65
+ $atslScript .= "\n\t\t\t'services' : [";
66
+
67
+ foreach($follow_services as $services => $service) {
68
+
69
+ if($follow_services[$services] != "" && $follow_services[$services] != "YOUR-PROFILE-ID") {
70
+ if($services == "linkedin_comp")
71
+ $atslScript .= "\n\t\t\t\t{'service': 'linkedin', 'id': '".$follow_services[$services]."', 'usertype':'company'},";
72
+ else
73
+ $atslScript .= "\n\t\t\t\t{'service': '".$services."', 'id': '".$follow_services[$services]."'},";
74
+ }
75
+ }
76
+ $atslScript .= "\n\t\t\t]";
77
+ $atslScript .= "\n\t\t}". PHP_EOL;
78
+ }
79
+ if($whatsnext_enabled != 0) {
80
+ $atslScript .= "\t\t,'whatsnext' : {}". PHP_EOL;
81
+ }
82
+
83
+ if($recomended_enabled != 0) {
84
+ $atslScript .= "\t\t,'recommended' : {\n\t\t\t'title': '".$recomended_header."'\n\t\t}". PHP_EOL;
85
+ }
86
+ $atslScript .= "\t});". PHP_EOL;
87
+ }
88
+ $atslScript .= "</script>". PHP_EOL;
89
+ $atslScript .= "<!-- AddThis Smart Layers ENDS -->" . PHP_EOL;
90
+ $atslScript .= "<style>.at-share-close-control .at4-arrow {float: right !important;}</style>" . PHP_EOL;
91
+
92
+ echo $atslScript;
93
+
94
+ }//if plugin is enabled
95
+ ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
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>
@@ -9,12 +9,12 @@
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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>addthis_sharingtool</name>
4
+ <version>2.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0">Apache</license>
7
  <channel>community</channel>
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>* Moved frontend design files to base&#xD;
13
+ * Updated button images in configuration page</notes>
14
  <authors><author><name>AddThis</name><user>plugins_addthis</user><email>plugins@addthis.com</email></author></authors>
15
+ <date>2014-06-27</date>
16
+ <time>10:30:30</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="ad49d60d4e0e2bf9472195e3dfc2cb30"/><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="6cf2407f1d4f506acb7e8e27df55b38f"/><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="1ba0b53bb0e6c441acae4b7f1ad979b4"/><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="068d7df75c9255736b12a499f3fbb45d"/><file name="system.xml" hash="84ea3c15dfccedb192688dd8936d2fab"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sharingtool.xml" hash="c3408376e653249f8c26c64a65190877"/><file name="smartlayers.xml" hash="d7446606b33be1dc05f26ee960615044"/></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="addthis"><dir name="sharingtool"><file name="share.phtml" hash="4e962d55d43e333ac9a396c931ff659b"/><file name="share.phtml~" hash="9bb3dda42fae0b71b366d0eaa33fb1c7"/></dir><dir name="smartlayers"><file name="smartlayers.phtml" hash="01a39b33ee99c7d6f5288f602f16995a"/><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>