Sparx_Fblikebox - Version 0.1.0

Version Notes

Enable FBLikeBox: (yes or no) Enable the extension or not
Facebook Page Href: URL of Facebook page
Width: Width of the box shown in front-end
Height: Height of the box shown in front-end
Streams: Show the profile stream or not
Header: Show the header “Find us on Facebook” or not.

For more info
https://developers.facebook.com/docs/plugins/like-box-for-pages/

Download this release

Release Info

Developer Bhoopendra Dwivedi
Extension Sparx_Fblikebox
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/community/Sparx/Fblikebox/Block/Adminhtml/System/Config/Implementcode.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sparx_Fblikebox_Block_Adminhtml_System_Config_Implementcode extends Mage_Adminhtml_Block_System_Config_Form_Field
3
+ {
4
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element){
5
+
6
+ return '
7
+ <div class="entry-edit-head collapseable"><a onclick="Fieldset.toggleCollapse(\'fblikebox_template\'); return false;" href="#" id="fblikebox_template-head" class="open">Implement Code</a></div>
8
+ <input id="fblikebox_template-state" type="hidden" value="1" name="config_state[fblikebox_template]">
9
+ <fieldset id="fblikebox_template" class="config collapseable" style="">
10
+ <h4 class="icon-head head-edit-form fieldset-legend">Code for Fb Like Box (FanBox)</h4>
11
+
12
+ <div id="messages">
13
+ <ul class="messages">
14
+ <li class="notice-msg">
15
+ <ul>
16
+ <li>'.Mage::helper('fblikebox')->__('Add code below to a template file').'</li>
17
+ </ul>
18
+ </li>
19
+ </ul>
20
+ </div>
21
+ <br>
22
+ <ul>
23
+ <li>
24
+ <code>
25
+ $this->getLayout()->createBlock('.'"fblikebox/fblikebox"'.')->setTemplate('.'"fblikebox/fblikebox.phtml"'.')->toHtml();
26
+ </code>
27
+ </li>
28
+ </ul>
29
+ <br>
30
+ <div id="messages">
31
+ <ul class="messages">
32
+ <li class="notice-msg">
33
+ <ul>
34
+ <li>'.Mage::helper('fblikebox')->__('Put codeon a CMS page').'</li>
35
+ </ul>
36
+ </li>
37
+ </ul>
38
+ </div>
39
+ <br>
40
+ <ul>
41
+ <li>
42
+ <code>
43
+ {{block type="fblikebox/fblikebox" name="fblikebox.cms" template="fblikebox/fblikebox.phtml"}}
44
+ </code>
45
+ </li>
46
+ </ul>
47
+ <br>
48
+ <div id="messages">
49
+ <ul class="messages">
50
+ <li class="notice-msg">
51
+ <ul>
52
+ <li>'.Mage::helper('fblikebox')->__('Please copy and paste the code below on one of xml layout files where you want to show the FB Like Box.').'</li>
53
+ </ul>
54
+ </li>
55
+ </ul>
56
+ </div>
57
+
58
+ <ul>
59
+ <li>
60
+ <code>
61
+ &lt;block type="fblikebox/fblikebox" name="fblikebox.fblikebox" template="fblikebox/fblikebox.phtml"&gt;<br>
62
+
63
+ &lt;/block&gt;
64
+ </code>
65
+ </li>
66
+ </ul>
67
+
68
+ <br>
69
+
70
+ </fieldset>';
71
+ }
72
+ }
app/code/community/Sparx/Fblikebox/Block/Fblikebox.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sparx_Fblikebox_Block_Fblikebox extends Mage_Core_Block_Template{
3
+
4
+ /**
5
+ * Create Ifrom for Facebook Fan Page
6
+ *
7
+ * @return HTMl
8
+ */
9
+ public function getFbContent(){
10
+ $_helper = Mage::helper('fblikebox');
11
+ $box_href=$_helper->getHref();
12
+ $box_width=$_helper->getWidth();
13
+ $box_height=$_helper->getHeight();
14
+ $box_colorscheme=$_helper->getColorscheme();
15
+ $box_header=$_helper->isShowHeader();
16
+ $box_force_wall=$_helper->getForceWall();
17
+ $box_show_border=$_helper->isShowBorder();
18
+ $box_show_faces=$_helper->isShowFaces();
19
+ $box_stream=$_helper->isShowStream();
20
+ $box_connection=$_helper->getConnection();
21
+ $box_content="";
22
+ $box_content .='<iframe src="http://www.facebook.com/plugins/likebox.php?href='. urlencode($box_href);
23
+ if($box_width)
24
+ {
25
+ $box_content .= '&amp;width='. $box_width;
26
+ }
27
+ if($box_height)
28
+ {
29
+ $box_content .= '&amp;height='. $box_height;
30
+ }
31
+
32
+ $box_content .= '&amp;connections='. $box_connection;
33
+
34
+ if($box_header)
35
+ {
36
+ $box_content .= '&amp;header=true';
37
+ }else{
38
+ $box_content .= '&amp;header=false';
39
+ }
40
+ if($box_show_border)
41
+ {
42
+ $box_content .= '&amp;show_border=true';
43
+ }else{
44
+ $box_content .= '&amp;show_border=false';
45
+ }
46
+ if($box_show_faces)
47
+ {
48
+ $box_content .= '&amp;show_faces=true';
49
+ }else{
50
+ $box_content .= '&amp;show_faces=false';
51
+ }
52
+ if($box_colorscheme)
53
+ {
54
+ $box_content .= '&amp;colorscheme='.$box_colorscheme;
55
+ }
56
+ if($box_stream)
57
+ {
58
+ $box_content .= '&amp;stream=true';
59
+ }
60
+ $box_content .= '" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; ';
61
+
62
+ if($box_width)
63
+ {
64
+ $box_content .= ' width:'. $box_width . 'px; ';
65
+ }
66
+ if($box_height)
67
+ {
68
+ $box_content .= ' height:'. $box_height. 'px; ';
69
+ }
70
+ $box_content .= '"></iframe>';
71
+ return $box_content;
72
+ }
73
+
74
+ }
app/code/community/Sparx/Fblikebox/Helper/Data.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sparx_Fblikebox_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ public function isEnabled(){
5
+ return Mage::getStoreConfig('fblikebox/general/enable');
6
+ }
7
+ public function isShowInRight(){
8
+ return Mage::getStoreConfig('fblikebox/general/right');
9
+ }
10
+ public function isShowInLeft(){
11
+ return Mage::getStoreConfig('fblikebox/general/left');
12
+ }
13
+ public function getHref(){
14
+ return Mage::getStoreConfig('fblikebox/general/href');
15
+ }
16
+ public function getForceWall(){
17
+ return Mage::getStoreConfig('fblikebox/general/force_wall');
18
+ }
19
+ public function getColorscheme(){
20
+ if(Mage::getStoreConfig('fblikebox/general/colorscheme'))
21
+ return 'light';
22
+ else return 'dark';
23
+ }
24
+ public function isShowHeader(){
25
+ return Mage::getStoreConfig('fblikebox/general/header');
26
+ }
27
+ public function isShowBorder(){
28
+ return Mage::getStoreConfig('fblikebox/general/show_border');
29
+ }
30
+ public function isShowFaces(){
31
+ return Mage::getStoreConfig('fblikebox/general/show_faces');
32
+ }
33
+ public function isShowStream(){
34
+ return Mage::getStoreConfig('fblikebox/general/stream');
35
+ }
36
+ public function getHeight(){
37
+ return Mage::getStoreConfig('fblikebox/general/height');
38
+ }
39
+ public function getWidth(){
40
+ return Mage::getStoreConfig('fblikebox/general/width');
41
+ }
42
+ public function getConnection(){
43
+ return Mage::getStoreConfig('fblikebox/general/connection');
44
+ }
45
+ }
46
+
app/code/community/Sparx/Fblikebox/Model/Source/Showlight.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sparx_Fblikebox_Model_Source_Showlight
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 1, 'label'=>Mage::helper('fblikebox')->__('Light')),
13
+ array('value' => 0, 'label'=>Mage::helper('fblikebox')->__('Dark'))
14
+ );
15
+ }
16
+ }
app/code/community/Sparx/Fblikebox/Model/Source/Showtrue.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sparx_Fblikebox_Model_Source_Showtrue
3
+ {
4
+ /**
5
+ * Options getter
6
+ *
7
+ * @return array
8
+ */
9
+ public function toOptionArray()
10
+ {
11
+ return array(
12
+ array('value' => 1, 'label'=>Mage::helper('fblikebox')->__('True')),
13
+ array('value' => 0, 'label'=>Mage::helper('fblikebox')->__('False'))
14
+ );
15
+ }
16
+ }
app/code/community/Sparx/Fblikebox/controllers/IndexController.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Sparx_Fblikebox_IndexController extends Mage_Core_Controller_Front_Action{
3
+ public function IndexAction() {
4
+
5
+ $this->loadLayout();
6
+ $this->getLayout()->getBlock("head")->setTitle($this->__("Fb Like Box"));
7
+ $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
8
+ $breadcrumbs->addCrumb("home", array(
9
+ "label" => $this->__("Home Page"),
10
+ "title" => $this->__("Home Page"),
11
+ "link" => Mage::getBaseUrl()
12
+ ));
13
+
14
+ $breadcrumbs->addCrumb("fblikebox", array(
15
+ "label" => $this->__("Fb Like Box"),
16
+ "title" => $this->__("Fb Like Box")
17
+ ));
18
+
19
+ $this->renderLayout();
20
+
21
+ }
22
+ }
app/code/community/Sparx/Fblikebox/etc/adminhtml.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <fblikebox translate="title" module="fblikebox">
12
+ <title>Fb Like Box Section</title>
13
+ <sort_order>0</sort_order>
14
+ </fblikebox>
15
+ </children>
16
+ </config>
17
+ </children>
18
+ </system>
19
+ </children>
20
+ </admin>
21
+ </resources>
22
+ </acl>
23
+ </config>
app/code/community/Sparx/Fblikebox/etc/config.xml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Sparx_Fblikebox>
5
+ <version>0.1.0</version>
6
+ </Sparx_Fblikebox>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <fblikebox>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Sparx_Fblikebox</module>
14
+ <frontName>fblikebox</frontName>
15
+ </args>
16
+ </fblikebox>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <fblikebox>
21
+ <file>fblikebox.xml</file>
22
+ </fblikebox>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <helpers>
28
+ <fblikebox>
29
+ <class>Sparx_Fblikebox_Helper</class>
30
+ </fblikebox>
31
+ </helpers>
32
+ <blocks>
33
+ <fblikebox>
34
+ <class>Sparx_Fblikebox_Block</class>
35
+ </fblikebox>
36
+ </blocks>
37
+ <models>
38
+ <fblikebox>
39
+ <class>Sparx_Fblikebox_Model</class>
40
+ </fblikebox>
41
+ </models>
42
+ </global>
43
+ <default>
44
+ <fblikebox>
45
+ <general>
46
+ <enable>1</enable>
47
+ <left>1</left>
48
+ <right>0</right>
49
+ <!--fbpageurl>https://www.facebook.com/csschopper/</fbpageurl-->
50
+ <colorscheme>1</colorscheme>
51
+ <force_wall>0</force_wall>
52
+ <header>1</header>
53
+ <height>290</height>
54
+ <href>https://www.facebook.com/csschopperfanpage</href>
55
+ <show_border>1</show_border>
56
+ <show_faces>1</show_faces>
57
+ <stream>0</stream>
58
+ <width>193</width>
59
+ </general>
60
+ </fblikebox>
61
+ </default>
62
+ </config>
app/code/community/Sparx/Fblikebox/etc/system.xml ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <sparx translate="label" module="fblikebox">
5
+ <label>Sparx</label>
6
+ <sort_order>0</sort_order>
7
+ </sparx>
8
+ </tabs>
9
+ <sections>
10
+ <fblikebox translate="label" module="fblikebox">
11
+ <label>Fb Like Box</label>
12
+ <tab>sparx</tab>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>0</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
+ <implement translate="label">
20
+ <label>Implement Code</label>
21
+ <frontend_model>fblikebox/adminhtml_system_config_implementcode</frontend_model>
22
+ <sort_order>20</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ </implement>
27
+ <general translate="label">
28
+ <label>General Configuration</label>
29
+ <frontend_type>text</frontend_type>
30
+ <sort_order>10</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ <fields>
35
+ <enable translate="label">
36
+ <label>Enable</label>
37
+ <frontend_type>select</frontend_type>
38
+ <source_model>adminhtml/system_config_source_yesno</source_model>
39
+ <sort_order>10</sort_order>
40
+ <show_in_default>1</show_in_default>
41
+ <show_in_website>1</show_in_website>
42
+ <show_in_store>1</show_in_store>
43
+ </enable>
44
+ <left translate="label">
45
+ <label>Display In Left</label>
46
+ <frontend_type>select</frontend_type>
47
+ <source_model>adminhtml/system_config_source_yesno</source_model>
48
+ <sort_order>11</sort_order>
49
+ <show_in_default>1</show_in_default>
50
+ <show_in_website>1</show_in_website>
51
+ <show_in_store>1</show_in_store>
52
+ </left>
53
+ <right translate="label">
54
+ <label>Display In Right</label>
55
+ <frontend_type>select</frontend_type>
56
+ <source_model>adminhtml/system_config_source_yesno</source_model>
57
+ <sort_order>12</sort_order>
58
+ <show_in_default>1</show_in_default>
59
+ <show_in_website>1</show_in_website>
60
+ <show_in_store>1</show_in_store>
61
+ </right>
62
+ <!--fbpageurl translate="label">
63
+ <label>FB Page Url</label>
64
+ <frontend_type>text</frontend_type>
65
+ <sort_order>20</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>1</show_in_website>
68
+ <show_in_store>1</show_in_store>
69
+ <comment>https://www.facebook.com/csschopper</comment>
70
+ </fbpageurl-->
71
+ <colorscheme translate="label">
72
+ <label>Color Scheme</label>
73
+ <frontend_type>select</frontend_type>
74
+ <source_model>fblikebox/source_showlight</source_model>
75
+ <sort_order>30</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ <comment>The color scheme used by the plugin. Can be "light" or "dark".</comment>
80
+ </colorscheme>
81
+ <force_wall translate="label">
82
+ <label>Force Wall</label>
83
+ <frontend_type>select</frontend_type>
84
+ <source_model>fblikebox/source_showtrue</source_model>
85
+ <sort_order>40</sort_order>
86
+ <show_in_default>1</show_in_default>
87
+ <show_in_website>1</show_in_website>
88
+ <show_in_store>1</show_in_store>
89
+ <comment>For "place" Pages (Pages that have a physical location that can be used with check-ins), this specifies whether the stream contains posts by the Page or just check-ins from friends.</comment>
90
+ </force_wall>
91
+ <header translate="label">
92
+ <label>Header</label>
93
+ <frontend_type>select</frontend_type>
94
+ <source_model>fblikebox/source_showtrue</source_model>
95
+ <sort_order>50</sort_order>
96
+ <show_in_default>1</show_in_default>
97
+ <show_in_website>1</show_in_website>
98
+ <show_in_store>1</show_in_store>
99
+ <comment>Specifies whether to display the Facebook header at the top of the plugin.</comment>
100
+ </header>
101
+ <height translate="label">
102
+ <label>Height</label>
103
+ <frontend_type>text</frontend_type>
104
+ <sort_order>60</sort_order>
105
+ <show_in_default>1</show_in_default>
106
+ <show_in_website>1</show_in_website>
107
+ <show_in_store>1</show_in_store>
108
+ <comment>The height of the plugin in pixels. The default height varies based on number of faces to display, and whether the stream is displayed. With stream set to true and 10 photos displayed (via show_faces) the default height is 556px. With stream and show_faces both false, the default height is 63px</comment>
109
+ </height>
110
+ <href translate="label">
111
+ <label>Href</label>
112
+ <frontend_type>text</frontend_type>
113
+ <sort_order>70</sort_order>
114
+ <show_in_default>1</show_in_default>
115
+ <show_in_website>1</show_in_website>
116
+ <show_in_store>1</show_in_store>
117
+ <comment>The absolute URL of the Facebook Page that will be liked. This is a required setting.</comment>
118
+ </href>
119
+ <show_border translate="label">
120
+ <label>Show Border</label>
121
+ <frontend_type>select</frontend_type>
122
+ <source_model>fblikebox/source_showtrue</source_model>
123
+ <sort_order>80</sort_order>
124
+ <show_in_default>1</show_in_default>
125
+ <show_in_website>1</show_in_website>
126
+ <show_in_store>1</show_in_store>
127
+ <comment>Specifies whether or not to show a border around the plugin.</comment>
128
+ </show_border>
129
+ <show_faces translate="label">
130
+ <label>Show Faces</label>
131
+ <frontend_type>select</frontend_type>
132
+ <source_model>fblikebox/source_showtrue</source_model>
133
+ <sort_order>90</sort_order>
134
+ <show_in_default>1</show_in_default>
135
+ <show_in_website>1</show_in_website>
136
+ <show_in_store>1</show_in_store>
137
+ <comment>Specifies whether to display profile photos of people who like the page.</comment>
138
+ </show_faces>
139
+ <stream translate="label">
140
+ <label>Stream</label>
141
+ <frontend_type>select</frontend_type>
142
+ <source_model>fblikebox/source_showtrue</source_model>
143
+ <sort_order>100</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ <comment>Specifies whether to display a stream of the latest posts by the Page.</comment>
148
+ </stream>
149
+ <width translate="label">
150
+ <label>Width</label>
151
+ <frontend_type>text</frontend_type>
152
+ <sort_order>110</sort_order>
153
+ <show_in_default>1</show_in_default>
154
+ <show_in_website>1</show_in_website>
155
+ <show_in_store>1</show_in_store>
156
+ <comment>The width of the plugin in pixels. Minimum is 292.</comment>
157
+ </width>
158
+ <connection translate="label">
159
+ <label>Connection</label>
160
+ <frontend_type>text</frontend_type>
161
+ <sort_order>120</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ <comment>The number of fans shown in the box</comment>
166
+ </connection>
167
+ </fields>
168
+ </general>
169
+ </groups>
170
+ </fblikebox>
171
+ </sections>
172
+ </config>
app/design/frontend/base/default/layout/fblikebox.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="left">
5
+ <block type="fblikebox/fblikebox" name="fblikebox_left" template="fblikebox/left.phtml"/>
6
+ </reference>
7
+ <reference name="right">
8
+ <block type="fblikebox/fblikebox" name="fblikebox_right" template="fblikebox/right.phtml"/>
9
+ </reference>
10
+ </default>
11
+ <fblikebox_index_index>
12
+ <reference name="root">
13
+ <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
14
+ </reference>
15
+ <reference name="content">
16
+ <block type="fblikebox/fblikebox" name="fblikebox_index" template="fblikebox/index.phtml"/>
17
+ </reference>
18
+ </fblikebox_index_index>
19
+ </layout>
20
+
app/design/frontend/base/default/template/fblikebox/fblikebox.phtml ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_helper = $this->helper('fblikebox');
3
+ if($_helper->isEnabled()){
4
+ $box_href=$_helper->getHref();
5
+ $box_width=$_helper->getWidth();
6
+ $box_height=$_helper->getHeight();
7
+ $box_colorscheme=$_helper->getColorscheme();
8
+ $box_header=$_helper->isShowHeader();
9
+ $box_force_wall=$_helper->getForceWall();
10
+ $box_show_border=$_helper->isShowBorder();
11
+ $box_show_faces=$_helper->isShowFaces();
12
+ $box_stream=$_helper->isShowStream();
13
+ $box_content="";
14
+ $box_content .='<iframe src="http://www.facebook.com/plugins/likebox.php?href='. urlencode($box_href);
15
+ if($box_width)
16
+ {
17
+ $box_content .= '&amp;width='. $box_width;
18
+ }
19
+ if($box_height)
20
+ {
21
+ $box_content .= '&amp;height='. $box_height;
22
+ }
23
+
24
+ $box_content .= '&amp;connections='. $connection;
25
+
26
+ if($box_header)
27
+ {
28
+ $box_content .= '&amp;header=true';
29
+ }
30
+
31
+ if($box_stream)
32
+ {
33
+ $box_content .= '&amp;stream=true';
34
+ }
35
+ $box_content .= '" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; ';
36
+
37
+ if($box_width)
38
+ {
39
+ $box_content .= ' width:'. $box_width . 'px; ';
40
+ }
41
+ if($box_height)
42
+ {
43
+ $box_content .= ' height:'. $box_height. 'px; ';
44
+ }
45
+ $box_content .= '"></iframe>';
46
+ ?>
47
+ <div id='fbfanbox'>
48
+ <?php echo($box_content); ?>
49
+ </div>
50
+ <?php
51
+ }
52
+ ?>
app/design/frontend/base/default/template/fblikebox/left.phtml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_helper = $this->helper('fblikebox');
3
+ if($_helper->isEnabled() && $_helper->isShowInLeft()){ ?>
4
+ <div class="block block-fblikebox">
5
+ <div class="block-title">
6
+ <strong><span><?php echo $this->__('Facebook') ?></span></strong>
7
+ </div>
8
+ <div class="block-content">
9
+ <div id='fbfanbox'>
10
+ <?php echo $this->getFbContent(); ?>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ <?php } ?>
app/design/frontend/base/default/template/fblikebox/right.phtml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_helper = $this->helper('fblikebox');
3
+ if($_helper->isEnabled() && $_helper->isShowInRight()){ ?>
4
+ <div class="block block-fblikebox">
5
+ <div class="block-title">
6
+ <strong><span><?php echo $this->__('Facebook') ?></span></strong>
7
+ </div>
8
+ <div class="block-content">
9
+ <div id='fbfanbox'>
10
+ <?php echo $this->getFbContent(); ?>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ <?php } ?>
app/etc/modules/Sparx_Fblikebox.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Sparx_Fblikebox>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>0.1.0</version>
8
+ </Sparx_Fblikebox>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Sparx_Fblikebox</name>
4
+ <version>0.1.0</version>
5
+ <stability>stable</stability>
6
+ <license>Open Software License (OSL)</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Show Facebook Fan Page on Magento site.</summary>
10
+ <description>Show Facebook Fan Page on Magento site.</description>
11
+ <notes>Enable FBLikeBox: (yes or no) Enable the extension or not&#xD;
12
+ Facebook Page Href: URL of Facebook page&#xD;
13
+ Width: Width of the box shown in front-end&#xD;
14
+ Height: Height of the box shown in front-end&#xD;
15
+ Streams: Show the profile stream or not&#xD;
16
+ Header: Show the header &#x201C;Find us on Facebook&#x201D; or not.&#xD;
17
+ &#xD;
18
+ For more info &#xD;
19
+ https://developers.facebook.com/docs/plugins/like-box-for-pages/&#xD;
20
+ </notes>
21
+ <authors><author><name>Bhoopendra Dwivedi</name><user>Sparx</user><email>bhoopendra.dwivedi@sparxtechnologies.com</email></author></authors>
22
+ <date>2014-04-23</date>
23
+ <time>05:31:50</time>
24
+ <contents><target name="magecommunity"><dir name="Sparx"><dir name="Fblikebox"><dir><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Implementcode.php" hash="4808dcc5729dcbf28f3cabbc3b7db9e1"/></dir></dir></dir><file name="Fblikebox.php" hash="5815f56d94e8b5588ac36eea1cb040bb"/></dir><dir name="Helper"><file name="Data.php" hash="4af1e1bd09f69fa39ac1043233bdc318"/></dir><dir name="Model"><dir name="Source"><file name="Showlight.php" hash="7b4acb9e7e3273e521b2a5fdfddd8394"/><file name="Showtrue.php" hash="e980abf1b47009316377ddf93af50b13"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="760db44f4c7a456600cec40c2fcd24f9"/></dir><dir name="etc"><file name="adminhtml.xml" hash="ae51c2ba737fece2bb66637671918704"/><file name="config.xml" hash="5ff4a893bcc009b69503aca7ca343ccb"/><file name="system.xml" hash="e64ec91b6e55c004aa1600c7fbd36440"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="fblikebox"><file name="fblikebox.phtml" hash="154831c79c022bcf9b21d9d209110e0d"/><file name="left.phtml" hash="66d39e59cbac85bca2d93cac30f68558"/><file name="right.phtml" hash="826f4cb21635406f95f578f33b070b3d"/></dir></dir><dir name="layout"><file name="fblikebox.xml" hash=""/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sparx_Fblikebox.xml" hash="775a83188fa4c291dfe39ae84141d801"/></dir></target></contents>
25
+ <compatible/>
26
+ <dependencies><required><php><min>5.0.1</min><max>6.0.0</max></php></required></dependencies>
27
+ </package>