SocialShareFacebookComments - Version 1.0.0

Version Notes

Including Color, Width and Number of Posts Configuration Support

Download this release

Release Info

Developer Roy Toledo
Extension SocialShareFacebookComments
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/SocialShare/FacebookComments/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SocialShare_OpenGraphTags_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/community/SocialShare/FacebookComments/Model/System/Config/Source/Dropdown/Colorscheme.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SocialShare_FacebookComments_Model_System_Config_Source_Dropdown_ColorScheme
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array( 'value' => 'light', 'label' => 'Light' ),
9
+ array( 'value' => 'dark', 'label' => 'Dark' ),
10
+
11
+ );
12
+ }
13
+ }
app/code/community/SocialShare/FacebookComments/Model/System/Config/Source/Dropdown/Position.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class SocialShare_FacebookComments_Model_System_Config_Source_Dropdown_Position
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ return array(
8
+ array( 'value' => 'prod_bottom', 'label' => 'Product Page Bottom' ),
9
+ array( 'value' => 'dark', 'label' => 'Dark' ),
10
+
11
+ );
12
+ }
13
+ }
app/code/community/SocialShare/FacebookComments/etc/adminhtml.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <facebookcomments translate="title" module="facebookcomments">
12
+ <title>Facebook Comments</title>
13
+ </facebookcomments>
14
+ </children>
15
+ </config>
16
+ </children>
17
+ </system>
18
+ </children>
19
+ </admin>
20
+ </resources>
21
+ </acl>
22
+ </config>
app/code/community/SocialShare/FacebookComments/etc/config.xml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <SocialShare_FacebookComments>
5
+ <version>1.0</version>
6
+ </SocialShare_FacebookComments>
7
+ </modules>
8
+
9
+ <frontend>
10
+ <layout>
11
+ <updates>
12
+ <FacebookComments>
13
+ <file>FacebookComments.xml</file>
14
+ </FacebookComments>
15
+ </updates>
16
+ </layout>
17
+ </frontend>
18
+
19
+ <adminhtml>
20
+ <acl>
21
+ <resources>
22
+ <admin>
23
+ <children>
24
+ <system>
25
+ <children>
26
+ <config>
27
+ <children>
28
+ <facebookcomments translate="title" module="facebookcomments">
29
+ <title>Social Share - Facebook Comments</title>
30
+ </facebookcomments>
31
+ </children>
32
+ </config>
33
+ </children>
34
+ </system>
35
+ </children>
36
+ </admin>
37
+ </resources>
38
+ </acl>
39
+ </adminhtml>
40
+
41
+ <global>
42
+ <resources>
43
+ <FacebookComments_setup>
44
+ <setup>
45
+ <module>SocialShare_FacebookComments</module>
46
+ </setup>
47
+ <connection>
48
+ <use>core_setup</use>
49
+ </connection>
50
+ </FacebookComments_setup>
51
+ <FacebookComments_write>
52
+ <connection>
53
+ <use>core_write</use>
54
+ </connection>
55
+ </FacebookComments_write>
56
+ <FacebookComments_read>
57
+ <connection>
58
+ <use>core_read</use>
59
+ </connection>
60
+ </FacebookComments_read>
61
+ </resources>
62
+ <blocks>
63
+ <FacebookComments>
64
+ <class>SocialShare_FacebookComments_Block</class>
65
+ </FacebookComments>
66
+ </blocks>
67
+ <helpers>
68
+ <facebookcomments>
69
+ <class>SocialShare_FacebookComments_Helper</class>
70
+ </facebookcomments>
71
+ </helpers>
72
+ <models>
73
+ <facebookcomments>
74
+ <class>SocialShare_FacebookComments_Model</class>
75
+ </facebookcomments>
76
+ </models>
77
+ </global>
78
+
79
+ <default>
80
+ <facebookcomments>
81
+ <conf>
82
+ <enabled>0</enabled>
83
+ <posts>5</posts>
84
+ <width>500</width>
85
+ <colorscheme>light</colorscheme>
86
+ </conf>
87
+ </facebookcomments>
88
+ </default>
89
+ </config>
app/code/community/SocialShare/FacebookComments/etc/system.xml ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <tabs>
4
+ <socialshare>
5
+ <label>Social Share</label>
6
+ <sort_order>150</sort_order>
7
+ </socialshare>
8
+ </tabs>
9
+ <sections>
10
+ <facebookcomments translate="label" module="opengraphtags">
11
+ <label>Facebook Comments</label>
12
+ <tab>socialshare</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>30</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <conf translate="label">
20
+ <label>Facebook Comments</label>
21
+ <sort_order>10</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ <fields>
26
+ <!--
27
+ <active translate="label">
28
+ <label>Extentions Active</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>10</sort_order>
32
+ <show_in_default>1</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>1</show_in_store>
35
+ </active>
36
+ -->
37
+ <posts translate="label">
38
+ <label>Number of Posts</label>
39
+ <comment>minimup posts</comment>
40
+ <frontend_type>text</frontend_type>
41
+ <sort_order>20</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ </posts>
46
+ <width translate="label">
47
+ <label>Width</label>
48
+ <comment>in pixels</comment>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>30</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ </width>
55
+ <colorscheme translate="label">
56
+ <label>Color Scheme</label>
57
+ <frontend_type>select</frontend_type>
58
+ <source_model>facebookcomments/system_config_source_dropdown_colorscheme</source_model>
59
+ <sort_order>50</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </colorscheme>
64
+ </fields>
65
+ </conf>
66
+
67
+ <position translate="label">
68
+ <label>Position</label>
69
+ <sort_order>50</sort_order>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
72
+ <show_in_store>1</show_in_store>
73
+ <fields>
74
+
75
+ <prod_bottom translate="label">
76
+ <label>Product Page Bottom</label>
77
+ <frontend_type>select</frontend_type>
78
+ <source_model>adminhtml/system_config_source_yesno</source_model>
79
+ <sort_order>10</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>1</show_in_store>
83
+ </prod_bottom>
84
+
85
+ </fields>
86
+ </position>
87
+ </groups>
88
+ </facebookcomments>
89
+ </sections>
90
+ </config>
app/design/frontend/default/default/layout/FacebookComments.xml ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+
4
+ <catalog_product_view>
5
+ <reference name="content">
6
+ <block after="additional" type="core/template" name="fb_comments" >
7
+ <action method="setTemplate" ifconfig="facebookcomments/position/prod_bottom">
8
+ <template>socialshare/fb_comments.phtml</template>
9
+ </action>
10
+ </block>
11
+ </reference>
12
+ </catalog_product_view>
13
+
14
+ <default>
15
+ <!--
16
+ <reference name="content">
17
+ <block after="additional" type="core/template" name="fb_comments" >
18
+ <action method="setTemplate" ifconfig="facebookcomments/conf/active">
19
+ <template>socialshare/fb_comments.phtml</template>
20
+ </action>
21
+ </block>
22
+ </reference>
23
+ -->
24
+ </default>
25
+ </layout>
app/design/frontend/default/default/template/socialshare/fb_comments.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <!-- SocialShare - Facebook Comments -->
2
+ <div class="fbCommentsContainer" style="min-height:160px;">
3
+ <div class="fb-comments" data-href="<?php echo $this->helper('core/url')->getCurrentUrl();?>" data-num-posts="<?php echo Mage::getStoreConfig('facebookcomments/conf/posts'); ?>" data-width="<?php echo Mage::getStoreConfig('facebookcomments/conf/width'); ?>" data-colorscheme="<?php echo Mage::getStoreConfig('facebookcomments/conf/colorscheme'); ?>"></div>
4
+ </div>
5
+ <!-- SocialShare - Facebook Comments END -->
app/etc/modules/SocialShare_FacebookComments.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <modules>
4
+ <SocialShare_FacebookComments>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </SocialShare_FacebookComments>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>SocialShareFacebookComments</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license>GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Facebook Comments</summary>
10
+ <description>Easily Add Facebook Comments to your magento store</description>
11
+ <notes>Including Color, Width and Number of Posts Configuration Support</notes>
12
+ <authors><author><name>Roy Toledo</name><user>NikNak</user><email>toledoroy@gmail.com</email></author></authors>
13
+ <date>2012-09-29</date>
14
+ <time>05:29:01</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="SocialShare_FacebookComments.xml" hash="43087a2d1453b10ad7bd133e715a39f0"/></dir></target><target name="magecommunity"><dir name="SocialShare"><dir name="FacebookComments"><dir><dir name="Helper"><file name="Data.php" hash="0d955fa9a94fddc4e5fe8b6c87f1cece"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Colorscheme.php" hash="8b332d27e2cfe88f3396598a0f33922d"/><file name="Position.php" hash="252f5f384c83ebb6f0334a067a822440"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="9b6183b185498ff532e7be740aa6af23"/><file name="config.xml" hash="27110306edebf37663dd0b250bba63f7"/><file name="system.xml" hash="717e63dcb736214f0be02eb9b9b8a1ac"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="socialshare"><file name="fb_comments.phtml" hash="088c6b09f79c97fce1878fb9ee719ca5"/></dir></dir><dir name="layout"><file name="FacebookComments.xml" hash="8d230b077ab4fe2d4579d22bc721583b"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>4.0.0</min><max>6.0.0</max></php><package><name>SocialShare-OG</name><channel>community</channel><min></min><max></max></package></required></dependencies>
18
+ </package>