Thirty4_AddThis - Version 1.0.2

Version Notes

-

Download this release

Release Info

Developer Magento Core Team
Extension Thirty4_AddThis
Version 1.0.2
Comparing to
See all releases


Version 1.0.2

app/code/community/Thirty4/AddThis/Model/System/Config/Source/Style.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Thirty4_AddThis_Model_System_Config_Source_Style
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array('value' => 'toolbox_1', 'label' => 'Toolbox 1'),
9
+ array('value' => 'toolbox_2', 'label' => 'Toolbox 2'),
10
+ array('value' => 'toolbox_3', 'label' => 'Toolbox 3'),
11
+ array('value' => 'sharecount_1', 'label' => 'Sharecount (Large)'),
12
+ array('value' => 'sharecount_2', 'label' => 'Sharecount (Small)'),
13
+ array('value' => 'sharecount_3', 'label' => 'Sharecount (Facebook/Twitter)'),
14
+ array('value' => 'button_1', 'label' => 'Button (Large)'),
15
+ array('value' => 'button_2', 'label' => 'Button (Small)')
16
+ );
17
+ }
18
+ }
app/code/community/Thirty4/AddThis/etc/config.xml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Thirty4_AddThis>
5
+ <version>1.0.2</version>
6
+ </Thirty4_AddThis>
7
+ </modules>
8
+ <global>
9
+ <models>
10
+ <thirty4_addthis>
11
+ <class>Thirty4_AddThis_Model</class>
12
+ </thirty4_addthis>
13
+ </models>
14
+ </global>
15
+ <frontend>
16
+ <layout>
17
+ <updates>
18
+ <thirty4_addthis>
19
+ <file>thirty4_addthis.xml</file>
20
+ </thirty4_addthis>
21
+ </updates>
22
+ </layout>
23
+ </frontend>
24
+ <default>
25
+ <catalog>
26
+ <thirty4_addthis>
27
+ <enabled>1</enabled>
28
+ <style>toolbox_1</style>
29
+ </thirty4_addthis>
30
+ </catalog>
31
+ </default>
32
+ </config>
app/code/community/Thirty4/AddThis/etc/system.xml ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <catalog>
5
+ <groups>
6
+ <thirty4_addthis translate="label">
7
+ <label>AddThis</label>
8
+ <sort_order>10</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>1</show_in_store>
12
+ <fields>
13
+ <enabled translate="label">
14
+ <label>Enable AddThis share links</label>
15
+ <frontend_type>select</frontend_type>
16
+ <source_model>adminhtml/system_config_source_yesno</source_model>
17
+ <sort_order>10</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>1</show_in_store>
21
+ </enabled>
22
+ <style translate="label">
23
+ <label>Style</label>
24
+ <frontend_type>select</frontend_type>
25
+ <source_model>thirty4_addthis/system_config_source_style</source_model>
26
+ <sort_order>20</sort_order>
27
+ <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
+ </style>
31
+ </fields>
32
+ </thirty4_addthis>
33
+ </groups>
34
+ </catalog>
35
+ </sections>
36
+ </config>
app/design/frontend/base/default/layout/thirty4_addthis.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+ <catalog_product_view>
4
+ <reference name="product.info.extrahint">
5
+ <block type="core/template" name="product.info.addthis" as="addthis" template="thirty4/addthis/share.phtml"/>
6
+ </reference>
7
+ </catalog_product_view>
8
+ </layout>
app/design/frontend/base/default/template/thirty4/addthis/share.phtml ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_username = 'xa-'.md5($_SERVER['SERVER_NAME']);
3
+ $_style = Mage::getStoreConfig('catalog/thirty4_addthis/style');
4
+ if (!$_style) $_style = 'toolbox_1';
5
+ ?>
6
+ <div style="margin:10px 0 10px;">
7
+
8
+ <?php if ($_style == 'toolbox_1'): ?>
9
+ <div class="addthis_toolbox addthis_default_style ">
10
+ <a href="http://www.addthis.com/bookmark.php?v=250&amp;username=<?php echo $_username ?>" class="addthis_button_compact">Share</a>
11
+ <span class="addthis_separator">|</span>
12
+ <a class="addthis_button_preferred_1"></a>
13
+ <a class="addthis_button_preferred_2"></a>
14
+ <a class="addthis_button_preferred_3"></a>
15
+ <a class="addthis_button_preferred_4"></a>
16
+ </div>
17
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
18
+ <?php endif ?>
19
+
20
+ <?php if ($_style == 'toolbox_2'): ?>
21
+ <div class="addthis_toolbox addthis_default_style ">
22
+ <a href="http://www.addthis.com/bookmark.php?v=250&amp;username=<?php echo $_username ?>" class="addthis_button_compact">Share</a>
23
+ </div>
24
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
25
+ <?php endif ?>
26
+
27
+ <?php if ($_style == 'toolbox_3'): ?>
28
+ <div class="addthis_toolbox addthis_default_style ">
29
+ <a class="addthis_button_preferred_1"></a>
30
+ <a class="addthis_button_preferred_2"></a>
31
+ <a class="addthis_button_preferred_3"></a>
32
+ <a class="addthis_button_preferred_4"></a>
33
+ <a class="addthis_button_compact"></a>
34
+ </div>
35
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
36
+ <?php endif ?>
37
+
38
+ <?php if ($_style == 'toolbox_4'): ?>
39
+ <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
40
+ <a class="addthis_button_preferred_1"></a>
41
+ <a class="addthis_button_preferred_2"></a>
42
+ <a class="addthis_button_preferred_3"></a>
43
+ <a class="addthis_button_preferred_4"></a>
44
+ <a class="addthis_button_compact"></a>
45
+ </div>
46
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
47
+ <?php endif ?>
48
+
49
+ <?php if ($_style == 'sharecount_1'): ?>
50
+ <div class="addthis_toolbox addthis_default_style ">
51
+ <a class="addthis_counter"></a>
52
+ </div>
53
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
54
+ <?php endif ?>
55
+
56
+ <?php if ($_style == 'sharecount_2'): ?>
57
+ <div class="addthis_toolbox addthis_default_style ">
58
+ <a class="addthis_counter addthis_pill_style"></a>
59
+ </div>
60
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
61
+ <?php endif ?>
62
+
63
+ <?php if ($_style == 'sharecount_3'): ?>
64
+ <div class="addthis_toolbox addthis_default_style ">
65
+ <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
66
+ <a class="addthis_button_tweet"></a>
67
+ <a class="addthis_counter addthis_pill_style"></a>
68
+ </div>
69
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
70
+ <?php endif ?>
71
+
72
+ <?php if ($_style == 'button_1'): ?>
73
+ <a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=<?php echo $_username ?>"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>
74
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
75
+ <?php endif ?>
76
+
77
+ <?php if ($_style == 'button_2'): ?>
78
+ <a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=<?php echo $_username ?>"><img src="http://s7.addthis.com/static/btn/sm-share-en.gif" width="83" height="16" alt="Bookmark and Share" style="border:0"/></a>
79
+ <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=<?php echo $_username ?>"></script>
80
+ <?php endif ?>
81
+
82
+ </div>
app/etc/modules/Thirty4_AddThis.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Thirty4_AddThis>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Thirty4_AddThis>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Thirty4_AddThis</name>
4
+ <version>1.0.2</version>
5
+ <stability>stable</stability>
6
+ <license>OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>AddThis support for catalog</summary>
10
+ <description>AddThis support for catalog</description>
11
+ <notes>-</notes>
12
+ <authors><author><name>Damian Hodgkiss</name><user>auto-converted</user><email>damian@thirty4.com.au</email></author></authors>
13
+ <date>2010-12-20</date>
14
+ <time>05:32:51</time>
15
+ <contents><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="thirty4_addthis.xml" hash="b07bcfb1b7276041adaa5d137b257743"/></dir><dir name="template"><dir name="thirty4"><dir name="addthis"><file name="share.phtml" hash="5e6a14c48b0f168986e84d50eb259448"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Thirty4_AddThis.xml" hash="49e569b4f64cb414ee5fccf4d2386638"/></dir></target><target name="magecommunity"><dir name="Thirty4"><dir name="AddThis"><dir name="etc"><file name="config.xml" hash="a42cf335466247a36f607a9bdfb4fd53"/><file name="system.xml" hash="26109a5ac5a8f0715f65f8d5bbcb9573"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Style.php" hash="4d2bb42638fe4d2fcd1e4389489aa1a8"/></dir></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>