Version Notes
Fixed SSL compatibility errors
Fixed issue with Bundle products
Download this release
Release Info
Developer | AddThis |
Extension | addthis_sharingtool |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- app/code/community/AddThis/SharingTool/Block/Share.php +5 -15
- app/code/community/AddThis/SharingTool/Model/Source/Buttons.php +24 -22
- app/code/community/AddThis/SharingTool/etc/config.xml +17 -12
- app/code/community/AddThis/SharingTool/etc/system.xml +30 -51
- app/design/frontend/default/default/template/addthis/sharingtool/share.phtml +45 -42
- package.xml +6 -5
app/code/community/AddThis/SharingTool/Block/Share.php
CHANGED
@@ -50,6 +50,11 @@ class AddThis_SharingTool_Block_Share extends Mage_Core_Block_Template
|
|
50 |
return Mage::getStoreConfig('sharing_tool/button_style/custom_button_url');
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
public function getExcludeServices(){
|
54 |
|
55 |
return Mage::getStoreConfig('sharing_tool/api/services_exclude');
|
@@ -114,27 +119,12 @@ class AddThis_SharingTool_Block_Share extends Mage_Core_Block_Template
|
|
114 |
|
115 |
return Mage::getStoreConfig('sharing_tool/api/ui_offset_left');
|
116 |
}
|
117 |
-
|
118 |
-
public function getUiCobrand(){
|
119 |
-
|
120 |
-
return Mage::getStoreConfig('sharing_tool/api/ui_cobrand');
|
121 |
-
}
|
122 |
|
123 |
public function getUiCss(){
|
124 |
|
125 |
return Mage::getStoreConfig('sharing_tool/api/ui_use_css');
|
126 |
}
|
127 |
|
128 |
-
public function getUiAddressBook(){
|
129 |
-
|
130 |
-
return Mage::getStoreConfig('sharing_tool/api/ui_use_addressbook');
|
131 |
-
}
|
132 |
-
|
133 |
-
public function getUiCompliant(){
|
134 |
-
|
135 |
-
return Mage::getStoreConfig('sharing_tool/api/ui_508_compliant');
|
136 |
-
}
|
137 |
-
|
138 |
public function getDataTrackClick(){
|
139 |
|
140 |
return Mage::getStoreConfig('sharing_tool/api/data_track_clickback');
|
50 |
return Mage::getStoreConfig('sharing_tool/button_style/custom_button_url');
|
51 |
}
|
52 |
|
53 |
+
public function getCustomButtonCode(){
|
54 |
+
|
55 |
+
return Mage::getStoreConfig('sharing_tool/button_style/custom_button_code');
|
56 |
+
}
|
57 |
+
|
58 |
public function getExcludeServices(){
|
59 |
|
60 |
return Mage::getStoreConfig('sharing_tool/api/services_exclude');
|
119 |
|
120 |
return Mage::getStoreConfig('sharing_tool/api/ui_offset_left');
|
121 |
}
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
public function getUiCss(){
|
124 |
|
125 |
return Mage::getStoreConfig('sharing_tool/api/ui_use_css');
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
public function getDataTrackClick(){
|
129 |
|
130 |
return Mage::getStoreConfig('sharing_tool/api/data_track_clickback');
|
app/code/community/AddThis/SharingTool/Model/Source/Buttons.php
CHANGED
@@ -6,7 +6,7 @@
|
|
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 |
-
*
|
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,
|
@@ -24,29 +24,29 @@ class AddThis_SharingTool_Model_Source_Buttons
|
|
24 |
$result = array();
|
25 |
|
26 |
$result[] = array('class'=>'buttons','value'=>'style_1','label'=>'
|
27 |
-
<img src="
|
28 |
-
<img src="
|
29 |
-
<img src="
|
30 |
-
<img src="
|
31 |
-
<img src="
|
32 |
-
<img src="
|
33 |
|
34 |
-
$result[] = array('value'=>'style_2','label'=>' <img src="
|
35 |
|
36 |
-
$result[] = array('value'=>'style_3','label'=>' <img src="
|
37 |
-
<img src="
|
38 |
-
<img src="
|
39 |
-
<img src="
|
40 |
-
<img src="
|
41 |
-
<img src="
|
42 |
|
43 |
-
$result[] = array('value'=>'style_4','label'=>' <img src="
|
44 |
-
<label>Share</label> <img src="
|
45 |
-
<img src="
|
46 |
-
<img src="
|
47 |
-
<img src="
|
48 |
|
49 |
-
$result[] = array('value'=>'style_5','label'=>' <img src="
|
50 |
<label>Share</label><br/><br/>');
|
51 |
|
52 |
|
@@ -54,9 +54,11 @@ class AddThis_SharingTool_Model_Source_Buttons
|
|
54 |
|
55 |
$result[] = array('value'=>'style_7','label'=>' <img src="https://cache.addthiscdn.com/www/20111123101657/images/sharecount-vertical.gif" style="vertical-align:middle"/><br/><br/>');
|
56 |
|
57 |
-
$result[] = array('value'=>'style_8','label'=>' <img src="
|
58 |
|
59 |
-
$result[] = array('value'=>'style_9','label'=>' <b>Custom Button</b><style>#sharing_tool_button_style_button_setstyle_1{margin-left:6px;} .note{width:500px;}</style
|
|
|
|
|
60 |
|
61 |
return $result;
|
62 |
}
|
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 |
+
* https://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,
|
24 |
$result = array();
|
25 |
|
26 |
$result[] = array('class'=>'buttons','value'=>'style_1','label'=>'
|
27 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/facebook.gif" style="vertical-align:middle"/>
|
28 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/twitter.gif" style="vertical-align:middle"/>
|
29 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/email.gif" style="vertical-align:middle"/>
|
30 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/google.gif" style="vertical-align:middle"/>
|
31 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/linkedin.gif" style="vertical-align:middle"/>
|
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'=>' <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'=>' <img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/facebook.png" style="vertical-align:middle"/>
|
37 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/twitter.png" style="vertical-align:middle" />
|
38 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/email.png" style="vertical-align:middle" />
|
39 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/google.png" style="vertical-align:middle" />
|
40 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/32x32/linkedin.png" style="vertical-align:middle" />
|
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'=>' <img src="https://cache.addthiscdn.com/icons/v1/thumbs/menu.gif" style="vertical-align:middle"/>
|
44 |
+
<label>Share</label> <img src="https://cache.addthiscdn.com/icons/v1/thumbs/facebook.gif" style="vertical-align:middle" />
|
45 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/myspace.gif" style="vertical-align:middle" />
|
46 |
+
<img src="https://cache.addthiscdn.com/icons/v1/thumbs/google.gif" style="vertical-align:middle" />
|
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'=>' <img src="https://cache.addthiscdn.com/icons/v1/thumbs/menu.gif" style="vertical-align:middle"/>
|
50 |
<label>Share</label><br/><br/>');
|
51 |
|
52 |
|
54 |
|
55 |
$result[] = array('value'=>'style_7','label'=>' <img src="https://cache.addthiscdn.com/www/20111123101657/images/sharecount-vertical.gif" style="vertical-align:middle"/><br/><br/>');
|
56 |
|
57 |
+
$result[] = array('value'=>'style_8','label'=>' <img src="https://s7.addthis.com/static/btn/sm-plus.gif" style="vertical-align:middle"/><br/><br/>');
|
58 |
|
59 |
+
$result[] = array('value'=>'style_9','label'=>' <b>Custom Button</b><style>#sharing_tool_button_style_button_setstyle_1{margin-left:6px;} .note{width:500px;}</style><br/><br/>');
|
60 |
+
|
61 |
+
$result[] = array('value'=>'style_10','label'=>' <b>Custom Code</b>');
|
62 |
|
63 |
return $result;
|
64 |
}
|
app/code/community/AddThis/SharingTool/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<AddThis_SharingTool>
|
5 |
-
<version>1.0.
|
6 |
</AddThis_SharingTool>
|
7 |
</modules>
|
8 |
<global>
|
@@ -46,10 +46,15 @@
|
|
46 |
<sharing_tool>
|
47 |
<general>
|
48 |
<enabled>1</enabled>
|
49 |
-
<menuvx>300</menuvx>
|
50 |
</general>
|
51 |
<button_style>
|
52 |
-
<button_set>style_3</button_set>
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</button_style>
|
54 |
<compact>
|
55 |
<advanced>0</advanced>
|
@@ -74,15 +79,15 @@
|
|
74 |
</updates>
|
75 |
</layout>
|
76 |
<events>
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
</events>
|
87 |
</frontend>
|
88 |
<adminhtml>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<AddThis_SharingTool>
|
5 |
+
<version>1.0.1</version>
|
6 |
</AddThis_SharingTool>
|
7 |
</modules>
|
8 |
<global>
|
46 |
<sharing_tool>
|
47 |
<general>
|
48 |
<enabled>1</enabled>
|
|
|
49 |
</general>
|
50 |
<button_style>
|
51 |
+
<button_set>style_3</button_set>
|
52 |
+
<custom_button_code><div class="addthis_toolbox addthis_default_style ">
|
53 |
+
<a class="addthis_button_facebook"></a>
|
54 |
+
<a class="addthis_button_twitter"></a>
|
55 |
+
<a class="addthis_button_pinterest_pinit"></a>
|
56 |
+
<a class="addthis_counter addthis_pill_style"></a>
|
57 |
+
</div></custom_button_code>
|
58 |
</button_style>
|
59 |
<compact>
|
60 |
<advanced>0</advanced>
|
79 |
</updates>
|
80 |
</layout>
|
81 |
<events>
|
82 |
+
<core_block_abstract_to_html_after>
|
83 |
+
<observers>
|
84 |
+
<sharingtool>
|
85 |
+
<type>singleton</type>
|
86 |
+
<class>sharingtool/observer</class>
|
87 |
+
<method>addButtonsHtml</method>
|
88 |
+
</sharingtool>
|
89 |
+
</observers>
|
90 |
+
</core_block_abstract_to_html_after>
|
91 |
</events>
|
92 |
</frontend>
|
93 |
<adminhtml>
|
app/code/community/AddThis/SharingTool/etc/system.xml
CHANGED
@@ -41,16 +41,7 @@
|
|
41 |
<show_in_website>1</show_in_website>
|
42 |
<show_in_store>1</show_in_store>
|
43 |
<comment><![CDATA[<a href="http://support.addthis.com/customer/portal/articles/381263-addthis-client-api" target="_blank">More info</a>]]></comment>
|
44 |
-
</pubid>
|
45 |
-
<menuvx translate="label">
|
46 |
-
<label>Menu Version</label>
|
47 |
-
<frontend_type>select</frontend_type>
|
48 |
-
<source_model>sharingtool/source_menuversions</source_model>
|
49 |
-
<sort_order>110</sort_order>
|
50 |
-
<show_in_default>1</show_in_default>
|
51 |
-
<show_in_website>1</show_in_website>
|
52 |
-
<show_in_store>1</show_in_store>
|
53 |
-
</menuvx>
|
54 |
</fields>
|
55 |
</general>
|
56 |
|
@@ -70,19 +61,28 @@
|
|
70 |
<show_in_store>1</show_in_store>
|
71 |
<comment><![CDATA[<script type="text/javascript">
|
72 |
document.observe("dom:loaded", function() {
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
84 |
-
});
|
85 |
-
}
|
86 |
});</script>]]></comment>
|
87 |
</button_set>
|
88 |
|
@@ -95,6 +95,14 @@
|
|
95 |
<show_in_store>1</show_in_store>
|
96 |
<comment>ex : http://www.example.com/button_name.jpg</comment>
|
97 |
</custom_button_url>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
</fields>
|
99 |
</button_style>
|
100 |
|
@@ -233,15 +241,6 @@
|
|
233 |
<show_in_store>1</show_in_store>
|
234 |
<comment>Number of pixels to offset the left of the compact menu from its parent element.</comment>
|
235 |
</ui_offset_left>
|
236 |
-
<ui_cobrand translate="label">
|
237 |
-
<label>Brand Label</label>
|
238 |
-
<frontend_type>text</frontend_type>
|
239 |
-
<sort_order>160</sort_order>
|
240 |
-
<show_in_default>1</show_in_default>
|
241 |
-
<show_in_website>1</show_in_website>
|
242 |
-
<show_in_store>1</show_in_store>
|
243 |
-
<comment>Additional branding message to be rendered in the upper-right-hand corner of the menus.</comment>
|
244 |
-
</ui_cobrand>
|
245 |
<ui_use_css translate="label">
|
246 |
<label>Load AddThis CSS</label>
|
247 |
<frontend_type>select</frontend_type>
|
@@ -251,26 +250,6 @@
|
|
251 |
<show_in_website>1</show_in_website>
|
252 |
<show_in_store>1</show_in_store>
|
253 |
</ui_use_css>
|
254 |
-
<ui_use_addressbook translate="label">
|
255 |
-
<label>Import Address</label>
|
256 |
-
<frontend_type>select</frontend_type>
|
257 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
258 |
-
<sort_order>180</sort_order>
|
259 |
-
<show_in_default>1</show_in_default>
|
260 |
-
<show_in_website>1</show_in_website>
|
261 |
-
<show_in_store>1</show_in_store>
|
262 |
-
<comment>If yes, the user will be able import their contacts from popular webmail services when using email sharing.</comment>
|
263 |
-
</ui_use_addressbook>
|
264 |
-
<ui_508_compliant translate="label">
|
265 |
-
<label>Keyboard Navigable</label>
|
266 |
-
<frontend_type>select</frontend_type>
|
267 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
268 |
-
<sort_order>190</sort_order>
|
269 |
-
<show_in_default>1</show_in_default>
|
270 |
-
<show_in_website>1</show_in_website>
|
271 |
-
<show_in_store>1</show_in_store>
|
272 |
-
<comment>If yes, clicking the AddThis button will open a new window to a page that is keyboard navigable.</comment>
|
273 |
-
</ui_508_compliant>
|
274 |
<data_track_clickback translate="label">
|
275 |
<label>Track Clickbacks</label>
|
276 |
<frontend_type>select</frontend_type>
|
41 |
<show_in_website>1</show_in_website>
|
42 |
<show_in_store>1</show_in_store>
|
43 |
<comment><![CDATA[<a href="http://support.addthis.com/customer/portal/articles/381263-addthis-client-api" target="_blank">More info</a>]]></comment>
|
44 |
+
</pubid>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
</fields>
|
46 |
</general>
|
47 |
|
61 |
<show_in_store>1</show_in_store>
|
62 |
<comment><![CDATA[<script type="text/javascript">
|
63 |
document.observe("dom:loaded", function() {
|
64 |
+
if(!$('sharing_tool_button_style_button_setstyle_9').checked){
|
65 |
+
$('row_sharing_tool_button_style_custom_button_url').hide();
|
66 |
+
}
|
67 |
+
if(!$('sharing_tool_button_style_button_setstyle_10').checked){
|
68 |
+
$('row_sharing_tool_button_style_custom_button_code').hide();
|
69 |
+
}
|
70 |
+
for(i=0;i<10;i++){
|
71 |
+
$$('[id^="sharing_tool_button_style_button_setstyle_"]')[i].observe('click', function() {
|
72 |
+
if(this.id == "sharing_tool_button_style_button_setstyle_9"){
|
73 |
+
$('row_sharing_tool_button_style_custom_button_url').show();
|
74 |
+
}
|
75 |
+
else {
|
76 |
+
$('row_sharing_tool_button_style_custom_button_url').hide();
|
77 |
+
}
|
78 |
+
if(this.id == "sharing_tool_button_style_button_setstyle_10"){
|
79 |
+
$('row_sharing_tool_button_style_custom_button_code').show();
|
80 |
+
}
|
81 |
+
else {
|
82 |
+
$('row_sharing_tool_button_style_custom_button_code').hide();
|
83 |
+
}
|
84 |
+
});
|
85 |
}
|
|
|
|
|
86 |
});</script>]]></comment>
|
87 |
</button_set>
|
88 |
|
95 |
<show_in_store>1</show_in_store>
|
96 |
<comment>ex : http://www.example.com/button_name.jpg</comment>
|
97 |
</custom_button_url>
|
98 |
+
<custom_button_code translate="label">
|
99 |
+
<label>Custom Code</label>
|
100 |
+
<frontend_type>textarea</frontend_type>
|
101 |
+
<sort_order>20</sort_order>
|
102 |
+
<show_in_default>1</show_in_default>
|
103 |
+
<show_in_website>1</show_in_website>
|
104 |
+
<show_in_store>1</show_in_store>
|
105 |
+
</custom_button_code>
|
106 |
</fields>
|
107 |
</button_style>
|
108 |
|
241 |
<show_in_store>1</show_in_store>
|
242 |
<comment>Number of pixels to offset the left of the compact menu from its parent element.</comment>
|
243 |
</ui_offset_left>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
<ui_use_css translate="label">
|
245 |
<label>Load AddThis CSS</label>
|
246 |
<frontend_type>select</frontend_type>
|
250 |
<show_in_website>1</show_in_website>
|
251 |
<show_in_store>1</show_in_store>
|
252 |
</ui_use_css>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
<data_track_clickback translate="label">
|
254 |
<label>Track Clickbacks</label>
|
255 |
<frontend_type>select</frontend_type>
|
app/design/frontend/default/default/template/addthis/sharingtool/share.phtml
CHANGED
@@ -19,13 +19,18 @@
|
|
19 |
/**General Options*/
|
20 |
$plugin_enabled = $this->getPluginEnabledStatus();
|
21 |
$pubid = $this->getPubId();
|
22 |
-
$menu_version =
|
23 |
|
24 |
/**Custom Share*/
|
25 |
$custom_url = $this->getCustomUrl();
|
26 |
$custom_title = $this->getCustomTitle();
|
27 |
$custom_description = $this->getCustomDescription();
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
/**API COnfig Options*/
|
31 |
$services_exclude = $this->getExcludeServices();
|
@@ -38,10 +43,7 @@
|
|
38 |
$ui_language = $this->getUiLanguage();
|
39 |
$ui_offset_top = $this->getUiOffsetTop();
|
40 |
$ui_offset_left = $this->getUiOffsetLeft();
|
41 |
-
$ui_cobrand = $this->getUiCobrand();
|
42 |
$ui_use_css = $this->getUiCss();
|
43 |
-
$ui_use_addressbook = $this->getUiAddressBook();
|
44 |
-
$ui_508_compliant = $this->getUiCompliant();
|
45 |
$data_track_clickback = $this->getDataTrackClick();
|
46 |
$address_bar_share = $this->getAddressBarShare();
|
47 |
$data_ga_tracker = $this->getDataGaTracker();
|
@@ -63,7 +65,7 @@
|
|
63 |
<!-- AddThis API Config -->
|
64 |
|
65 |
<script type='text/javascript'>
|
66 |
-
var addthis_product = 'mag-1.0';
|
67 |
var addthis_config = {
|
68 |
<?php
|
69 |
if($pubid):
|
@@ -104,18 +106,9 @@ var addthis_config = {
|
|
104 |
if($ui_offset_left):
|
105 |
echo ", ui_offset_left : ".$ui_offset_left."\n";
|
106 |
endif;
|
107 |
-
if($ui_cobrand):
|
108 |
-
echo ", ui_cobrand : '".$ui_cobrand."'\n";
|
109 |
-
endif;
|
110 |
if($ui_use_css == 0):
|
111 |
echo ", ui_use_css : false \n";
|
112 |
endif;
|
113 |
-
if($ui_use_addressbook == 1):
|
114 |
-
echo ", ui_use_addressbook : true \n";
|
115 |
-
endif;
|
116 |
-
if($ui_508_compliant == 1):
|
117 |
-
echo ", ui_508_compliant : true \n";
|
118 |
-
endif;
|
119 |
if($data_track_clickback == 0):
|
120 |
echo ", data_track_clickback : false \n";
|
121 |
endif;
|
@@ -135,7 +128,7 @@ var addthis_config = {
|
|
135 |
$button_style = $this->getButtonStyle();
|
136 |
switch($button_style)
|
137 |
{
|
138 |
-
|
139 |
?>
|
140 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
141 |
<a class="addthis_button_preferred_1"></a>
|
@@ -146,20 +139,20 @@ var addthis_config = {
|
|
146 |
<a class="addthis_counter addthis_bubble_style"></a>
|
147 |
</div>
|
148 |
<?php
|
149 |
-
|
150 |
-
|
151 |
?>
|
152 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
153 |
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
|
154 |
-
<
|
155 |
<a class="addthis_counter addthis_pill_style"></a>
|
156 |
</div>
|
157 |
<?php
|
158 |
-
|
159 |
-
|
160 |
?>
|
161 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
162 |
-
<a href="
|
163 |
<span class="addthis_separator">|</span>
|
164 |
<a class="addthis_button_preferred_1"></a>
|
165 |
<a class="addthis_button_preferred_2"></a>
|
@@ -167,42 +160,47 @@ var addthis_config = {
|
|
167 |
<a class="addthis_button_preferred_4"></a>
|
168 |
</div>
|
169 |
<?php
|
170 |
-
|
171 |
-
|
172 |
?>
|
173 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
174 |
-
<a href="
|
175 |
</div>
|
176 |
<?php
|
177 |
-
|
178 |
-
|
179 |
?>
|
180 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
181 |
<a class="addthis_counter addthis_pill_style"></a>
|
182 |
</div>
|
183 |
<?php
|
184 |
-
|
185 |
-
|
186 |
?>
|
187 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
188 |
<a class="addthis_counter"></a>
|
189 |
</div>
|
190 |
<?php
|
191 |
-
|
192 |
-
|
193 |
?>
|
194 |
-
<a class="addthis_button" href="
|
195 |
-
<img src="
|
196 |
<?php
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
?>
|
201 |
-
<a class="addthis_button" href="
|
202 |
<img src="<?php echo $custom_button_url ?>" alt="Bookmark and Share" style="border:0"/></a>
|
203 |
<?php
|
204 |
-
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
206 |
?>
|
207 |
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" <?php echo $custom_share?>>
|
208 |
<a class="addthis_button_preferred_1"></a>
|
@@ -213,10 +211,15 @@ var addthis_config = {
|
|
213 |
<a class="addthis_counter addthis_bubble_style"></a>
|
214 |
</div>
|
215 |
<?php
|
216 |
-
|
217 |
?>
|
218 |
-
<script type="text/javascript" src="
|
219 |
<!-- AddThis Button END -->
|
220 |
<?php
|
221 |
endif; //if plugin not enabled
|
222 |
-
?>
|
|
|
|
|
|
|
|
|
|
19 |
/**General Options*/
|
20 |
$plugin_enabled = $this->getPluginEnabledStatus();
|
21 |
$pubid = $this->getPubId();
|
22 |
+
$menu_version = 300;
|
23 |
|
24 |
/**Custom Share*/
|
25 |
$custom_url = $this->getCustomUrl();
|
26 |
$custom_title = $this->getCustomTitle();
|
27 |
$custom_description = $this->getCustomDescription();
|
28 |
+
|
29 |
+
if($custom_url != ""):
|
30 |
+
$custom_share = "addthis:url='".$custom_url."' addthis:title='".$custom_title."' addthis:description='".$custom_description."'";
|
31 |
+
else:
|
32 |
+
$custom_share = "";
|
33 |
+
endif;
|
34 |
|
35 |
/**API COnfig Options*/
|
36 |
$services_exclude = $this->getExcludeServices();
|
43 |
$ui_language = $this->getUiLanguage();
|
44 |
$ui_offset_top = $this->getUiOffsetTop();
|
45 |
$ui_offset_left = $this->getUiOffsetLeft();
|
|
|
46 |
$ui_use_css = $this->getUiCss();
|
|
|
|
|
47 |
$data_track_clickback = $this->getDataTrackClick();
|
48 |
$address_bar_share = $this->getAddressBarShare();
|
49 |
$data_ga_tracker = $this->getDataGaTracker();
|
65 |
<!-- AddThis API Config -->
|
66 |
|
67 |
<script type='text/javascript'>
|
68 |
+
var addthis_product = 'mag-1.0.1';
|
69 |
var addthis_config = {
|
70 |
<?php
|
71 |
if($pubid):
|
106 |
if($ui_offset_left):
|
107 |
echo ", ui_offset_left : ".$ui_offset_left."\n";
|
108 |
endif;
|
|
|
|
|
|
|
109 |
if($ui_use_css == 0):
|
110 |
echo ", ui_use_css : false \n";
|
111 |
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
if($data_track_clickback == 0):
|
113 |
echo ", data_track_clickback : false \n";
|
114 |
endif;
|
128 |
$button_style = $this->getButtonStyle();
|
129 |
switch($button_style)
|
130 |
{
|
131 |
+
case 'style_1':
|
132 |
?>
|
133 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
134 |
<a class="addthis_button_preferred_1"></a>
|
139 |
<a class="addthis_counter addthis_bubble_style"></a>
|
140 |
</div>
|
141 |
<?php
|
142 |
+
break;
|
143 |
+
case 'style_2':
|
144 |
?>
|
145 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
146 |
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
|
147 |
+
<iframe allowtransparency="true" frameborder="0" scrolling="no" src="https://platform.twitter.com/widgets/tweet_button.html" style="width:95px; height:20px; float:left;"></iframe>
|
148 |
<a class="addthis_counter addthis_pill_style"></a>
|
149 |
</div>
|
150 |
<?php
|
151 |
+
break;
|
152 |
+
case 'style_4':
|
153 |
?>
|
154 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
155 |
+
<a href="https://www.addthis.com/bookmark.php?v=250&pubid=xa-4f0d95b663c861f6" class="addthis_button_compact">Share</a>
|
156 |
<span class="addthis_separator">|</span>
|
157 |
<a class="addthis_button_preferred_1"></a>
|
158 |
<a class="addthis_button_preferred_2"></a>
|
160 |
<a class="addthis_button_preferred_4"></a>
|
161 |
</div>
|
162 |
<?php
|
163 |
+
break;
|
164 |
+
case 'style_5':
|
165 |
?>
|
166 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
167 |
+
<a href="https://www.addthis.com/bookmark.php?v=250&pubid=xa-4f0d960e09c42ec4" class="addthis_button_compact">Share</a>
|
168 |
</div>
|
169 |
<?php
|
170 |
+
break;
|
171 |
+
case 'style_6':
|
172 |
?>
|
173 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
174 |
<a class="addthis_counter addthis_pill_style"></a>
|
175 |
</div>
|
176 |
<?php
|
177 |
+
break;
|
178 |
+
case 'style_7':
|
179 |
?>
|
180 |
<div class="addthis_toolbox addthis_default_style " <?php echo $custom_share?>>
|
181 |
<a class="addthis_counter"></a>
|
182 |
</div>
|
183 |
<?php
|
184 |
+
break;
|
185 |
+
case 'style_8':
|
186 |
?>
|
187 |
+
<a class="addthis_button" href="https://www.addthis.com/bookmark.php?v=250" <?php echo $custom_share?>>
|
188 |
+
<img src="https://s7.addthis.com/static/btn/sm-plus.gif" alt="Bookmark and Share" style="border:0"/></a>
|
189 |
<?php
|
190 |
+
break;
|
191 |
+
case 'style_9':
|
192 |
+
$custom_button_url = $this->getCustomButtonUrl();
|
193 |
?>
|
194 |
+
<a class="addthis_button" href="https://www.addthis.com/bookmark.php?v=250" <?php echo $custom_share?>>
|
195 |
<img src="<?php echo $custom_button_url ?>" alt="Bookmark and Share" style="border:0"/></a>
|
196 |
<?php
|
197 |
+
break;
|
198 |
+
case 'style_10':
|
199 |
+
$custom_button_code = $this->getCustomButtonCode();
|
200 |
+
echo $custom_button_code;
|
201 |
+
|
202 |
+
break;
|
203 |
+
default:
|
204 |
?>
|
205 |
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" <?php echo $custom_share?>>
|
206 |
<a class="addthis_button_preferred_1"></a>
|
211 |
<a class="addthis_counter addthis_bubble_style"></a>
|
212 |
</div>
|
213 |
<?php
|
214 |
+
}//switch ends
|
215 |
?>
|
216 |
+
<script type="text/javascript" src="https://s7.addthis.com/js/<?php echo $menu_version;?>/addthis_widget.js"></script>
|
217 |
<!-- AddThis Button END -->
|
218 |
<?php
|
219 |
endif; //if plugin not enabled
|
220 |
+
?>
|
221 |
+
<style>
|
222 |
+
#at3win #at3winheader h3 {
|
223 |
+
text-align:left !important;
|
224 |
+
}
|
225 |
+
</style>
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>addthis_sharingtool</name>
|
4 |
-
<version>1.0.
|
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 Sharing Tool</summary>
|
10 |
<description>AddThis helps users to share your product and drive viral traffic.</description>
|
11 |
-
<notes>
|
|
|
12 |
<authors><author><name>AddThis</name><user>AddThisTeam</user><email>plugins@addthis.com</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="AddThis"><dir name="SharingTool"><dir name="Block"><file name="Share.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>addthis_sharingtool</name>
|
4 |
+
<version>1.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 Sharing Tool</summary>
|
10 |
<description>AddThis helps users to share your product and drive viral traffic.</description>
|
11 |
+
<notes>Fixed SSL compatibility errors
|
12 |
+
Fixed issue with Bundle products</notes>
|
13 |
<authors><author><name>AddThis</name><user>AddThisTeam</user><email>plugins@addthis.com</email></author></authors>
|
14 |
+
<date>2013-04-16</date>
|
15 |
+
<time>07:20:06</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="AddThis"><dir name="SharingTool"><dir name="Block"><file name="Share.php" hash="826c73cf37d6b60cc973fc0e3f9f1625"/></dir><dir name="Helper"><file name="Data.php" hash="d78c69dd706b97e39ef4c856c3c9d938"/></dir><dir name="Model"><file name="Observer.php" hash="5c9b5d0935bfbe2bddda81be9bfbee77"/><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="eb698194f5a047a2fbbf38a382640a79"/><file name="system.xml" hash="bdad69dd1ecf5e79b480a74f44064778"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="addthis"><dir name="sharingtool"><file name="share.phtml" hash="05f831833fe7ae703cb40268cf20430e"/></dir></dir></dir><dir name="layout"><file name="sharingtool.xml" hash="c3408376e653249f8c26c64a65190877"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="AddThis_SharingTool.xml" hash="40c4518a253bec346ad54824bdfef229"/></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
19 |
</package>
|