Facebook_Like_Box_In_Sidebar - Version 1.0.0

Version Notes

Initial Extension Release

Download this release

Release Info

Developer Team Vivacity
Extension Facebook_Like_Box_In_Sidebar
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Vivacity/Flikebox/Block/Likebox.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Vivacity_Flikebox_Block_Likebox extends Mage_Core_Block_Template
3
+ {
4
+ public function getStoreConfig($path){
5
+
6
+ return Mage::getStoreConfig($path);
7
+ }
8
+
9
+ public function getLikebox(){
10
+
11
+ $isActive = Mage::helper('flikebox')->isActive();
12
+ $position = Mage::helper('flikebox')->getPosition();
13
+
14
+ if($isActive) {
15
+
16
+ if ($position == $this->getPosition()) {
17
+
18
+ $connections = $this->getStoreConfig($this->getConnection());
19
+
20
+ $pageId = $this->getStoreConfig($this->getPageId());
21
+ $width = $this->getStoreConfig($this->getWidth());
22
+ $height = $this->getStoreConfig($this->getHeight());
23
+
24
+ $showHeader = (bool)$this->getStoreConfig($this->getShowHeader());
25
+ $showFace = (bool)$this->getStoreConfig($this->getShowFace());
26
+ $showStream = (bool)$this->getStoreConfig($this->getShowStream());
27
+
28
+ return '<iframe src="http://www.facebook.com/connect/connect.php?id='.$pageId.'&locale='.Mage::app()->getLocale()->getLocaleCode().'&connections='.$connections.'&stream='.$showStream.'&header='.$showHeader.'&width='.$width.'&height='.$height.'" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:'.$width.'px; height:'.$height.'px;" allowTransparency="true"></iframe>';
29
+
30
+ } else {
31
+
32
+ return null;
33
+
34
+ }
35
+
36
+ } else {
37
+
38
+ return null;
39
+
40
+ }
41
+ }
42
+ }
app/code/community/Vivacity/Flikebox/Helper/Data.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Vivacity_Flikebox_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ public function isActive()
5
+ {
6
+ return Mage::getStoreConfig('flikebox/general/active');
7
+ }
8
+
9
+ public function getPosition()
10
+ {
11
+ return Mage::getStoreConfig('flikebox/general/col_layout');
12
+ }
13
+ }
app/code/community/Vivacity/Flikebox/Model/Layout.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Vivacity_Flikebox_Model_Layout
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ $option = array(
8
+ "left"=>'Left Column',
9
+ "right"=>'Right Column');
10
+ return $option;
11
+ }
12
+
13
+ }
14
+ ?>
15
+
app/code/community/Vivacity/Flikebox/controllers/IndexController.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Vivacity_Flikebox_IndexController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function indexAction()
5
+ {
6
+ $this->loadLayout();
7
+ $this->renderLayout();
8
+ }
9
+
10
+ }
app/code/community/Vivacity/Flikebox/etc/adminhtml.xml ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <menu>
4
+ <vivacity translate="title" module="flikebox">
5
+ <title>Vivacity Extensions</title>
6
+ <sort_order>71</sort_order>
7
+ <children>
8
+ <flikebox translate="title" module="flikebox">
9
+ <title>FB Like box</title>
10
+ <sort_order>99</sort_order>
11
+ <children>
12
+ <configuration translate="title" module="flikebox">
13
+ <title>FB LikeBox Configuration</title>
14
+ <sort_order>1</sort_order>
15
+ <action>adminhtml/system_config/edit/section/flikebox</action>
16
+ </configuration>
17
+ </children>
18
+ </flikebox>
19
+ </children>
20
+ </vivacity>
21
+ </menu>
22
+ <acl>
23
+ <resources>
24
+ <all>
25
+ <title>Allow Everything</title>
26
+ </all>
27
+ <admin>
28
+ <children>
29
+ <system>
30
+ <children>
31
+ <config>
32
+ <children>
33
+ <flikebox translate="title">
34
+ <title>Flikebox Module</title>
35
+ <sort_order>10</sort_order>
36
+ </flikebox>
37
+ </children>
38
+ </config>
39
+ </children>
40
+ </system>
41
+ <vivacity translate="title" module="flikebox">
42
+ <title>Vivacity Extensions</title>
43
+ <sort_order>71</sort_order>
44
+ <children>
45
+ <flikebox translate="title" module="flikebox">
46
+ <title>FB Like box</title>
47
+ <sort_order>99</sort_order>
48
+ <children>
49
+ <configuration translate="title" module="flikebox">
50
+ <title>FB LikeBox Configuration</title>
51
+ <sort_order>1</sort_order>
52
+ <action>adminhtml/system_config/edit/section/flikebox</action>
53
+ </configuration>
54
+ </children>
55
+ </flikebox>
56
+ </children>
57
+ </vivacity>
58
+ </children>
59
+ </admin>
60
+ </resources>
61
+ </acl>
62
+ </config>
app/code/community/Vivacity/Flikebox/etc/config.xml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Vivacity_Flikebox>
5
+ <version>1.0.0</version>
6
+ </Vivacity_Flikebox>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <flikebox>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Vivacity_Flikebox</module>
14
+ <frontName>flikebox</frontName>
15
+ </args>
16
+ </flikebox>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <flikebox>
21
+ <file>flikebox.xml</file>
22
+ </flikebox>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <admin>
27
+ <routers>
28
+ <flikebox>
29
+ <use>admin</use>
30
+ <args>
31
+ <module>Vivacity_Flikebox</module>
32
+ <frontName>flikebox</frontName>
33
+ </args>
34
+ </flikebox>
35
+ </routers>
36
+ </admin>
37
+ <adminhtml>
38
+ <layout>
39
+ <updates>
40
+ <flikebox>
41
+ <file>flikebox.xml</file>
42
+ </flikebox>
43
+ </updates>
44
+ </layout>
45
+ </adminhtml>
46
+ <global>
47
+ <blocks>
48
+ <flikebox>
49
+ <class>Vivacity_Flikebox_Block</class>
50
+ </flikebox>
51
+ </blocks>
52
+ <helpers>
53
+ <flikebox>
54
+ <class>Vivacity_Flikebox_Helper</class>
55
+ </flikebox>
56
+ </helpers>
57
+ </global>
58
+ <default>
59
+ <flikebox>
60
+ <general>
61
+ <active>1</active>
62
+ <page_id>vivacityinfotech</page_id>
63
+ <width>195</width>
64
+ <height>400</height>
65
+ <connection>3</connection>
66
+ <show_header>1</show_header>
67
+ <show_face>1</show_face>
68
+ <show_stream>1</show_stream>
69
+ <col_layout>left</col_layout>
70
+ </general>
71
+ </flikebox>
72
+ </default>
73
+ </config>
app/code/community/Vivacity/Flikebox/etc/system.xml ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <vivacity_infotech>
5
+ <label>Vivacity InfoTech</label>
6
+ <sort_order>190</sort_order>
7
+ </vivacity_infotech>
8
+ </tabs>
9
+ <sections>
10
+ <flikebox translate="label" module="flikebox">
11
+ <label>Facebook Like Box</label>
12
+ <tab>vivacity_infotech</tab>
13
+ <sort_order>340</sort_order>
14
+ <show_in_default>1</show_in_default>
15
+ <show_in_website>1</show_in_website>
16
+ <show_in_store>1</show_in_store>
17
+ <groups>
18
+ <flikepreview translate="label" module="flikebox">
19
+ <label>Find us on Facebook</label>
20
+ <frontend_type>text</frontend_type>
21
+ <sort_order>80</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
+ <comment>
26
+ <![CDATA[
27
+ <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fvivacityinfotech&amp;width&amp;height=590&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=false&amp;show_border=true&amp;appId=1406798716268204" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:590px;" allowTransparency="true"></iframe>
28
+
29
+ ]]>
30
+ </comment>
31
+ </flikepreview>
32
+
33
+ <general translate="label" module="flikebox">
34
+ <label>General Configuration</label>
35
+ <frontend_type>text</frontend_type>
36
+ <sort_order>1</sort_order>
37
+ <show_in_default>1</show_in_default>
38
+ <show_in_website>1</show_in_website>
39
+ <show_in_store>1</show_in_store>
40
+ <fields>
41
+ <active translate="label">
42
+ <label>Enable Module</label>
43
+ <frontend_type>select</frontend_type>
44
+ <source_model>adminhtml/system_config_source_yesno</source_model>
45
+ <sort_order>1</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ </active>
50
+ <page_id translate="label">
51
+ <label>Page ID</label>
52
+ <frontend_type>text</frontend_type>
53
+ <sort_order>2</sort_order>
54
+ <show_in_default>1</show_in_default>
55
+ <show_in_website>1</show_in_website>
56
+ <show_in_store>1</show_in_store>
57
+ <validate>required-entry</validate>
58
+ </page_id>
59
+
60
+ <width translate="label">
61
+ <label>Width</label>
62
+ <frontend_type>text</frontend_type>
63
+ <sort_order>3</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
+ <validate>required-entry validate-greater-than-zero</validate>
68
+ </width>
69
+ <height translate="label">
70
+ <label>Height</label>
71
+ <frontend_type>text</frontend_type>
72
+ <sort_order>4</sort_order>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>1</show_in_website>
75
+ <show_in_store>1</show_in_store>
76
+ <validate>required-entry validate-greater-than-zero</validate>
77
+ </height>
78
+ <connection translate="label">
79
+ <label>Connections</label>
80
+ <frontend_type>text</frontend_type>
81
+ <sort_order>5</sort_order>
82
+ <show_in_default>1</show_in_default>
83
+ <show_in_website>1</show_in_website>
84
+ <show_in_store>1</show_in_store>
85
+ <validate>required-entry validate-greater-than-zero</validate>
86
+ </connection>
87
+ <show_header translate="label">
88
+ <label>Show header</label>
89
+ <frontend_type>select</frontend_type>
90
+ <source_model>adminhtml/system_config_source_yesno</source_model>
91
+ <sort_order>6</sort_order>
92
+ <show_in_default>1</show_in_default>
93
+ <show_in_website>1</show_in_website>
94
+ <show_in_store>1</show_in_store>
95
+ </show_header>
96
+ <show_face translate="label">
97
+ <label>Show faces</label>
98
+ <frontend_type>select</frontend_type>
99
+ <source_model>adminhtml/system_config_source_yesno</source_model>
100
+ <sort_order>7</sort_order>
101
+ <show_in_default>1</show_in_default>
102
+ <show_in_website>1</show_in_website>
103
+ <show_in_store>1</show_in_store>
104
+ </show_face>
105
+ <show_stream translate="label">
106
+ <label>Show stream</label>
107
+ <frontend_type>select</frontend_type>
108
+ <source_model>adminhtml/system_config_source_yesno</source_model>
109
+ <sort_order>8</sort_order>
110
+ <show_in_default>1</show_in_default>
111
+ <show_in_website>1</show_in_website>
112
+ <show_in_store>1</show_in_store>
113
+ </show_stream>
114
+ <col_layout translate="label">
115
+ <label>Position</label>
116
+ <frontend_type>select</frontend_type>
117
+ <source_model>Vivacity_Flikebox_Model_Layout</source_model>
118
+ <sort_order>9</sort_order>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_website>1</show_in_website>
121
+ <show_in_store>1</show_in_store>
122
+ </col_layout>
123
+ </fields>
124
+ </general>
125
+ </groups>
126
+ </flikebox>
127
+ </sections>
128
+ </config>
app/design/frontend/base/default/layout/flikebox.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="1.0.0">
3
+ <default>
4
+ <reference name="left">
5
+ <block type="flikebox/likebox" name="left.flikebox.likebox" template="flikebox/likebox.phtml">
6
+ <action method="setData"><name>position</name><value>left</value></action>
7
+ <action method="setData"><name>page_id</name><value>flikebox/general/page_id</value></action>
8
+ <action method="setData"><name>width</name><value>flikebox/general/width</value></action>
9
+ <action method="setData"><name>connection</name><value>flikebox/general/connection</value></action>
10
+ <action method="setData"><name>height</name><value>flikebox/general/height</value></action>
11
+ <action method="setData"><name>show_header</name><value>flikebox/general/show_header</value></action>
12
+ <action method="setData"><name>show_face</name><value>flikebox/general/show_face</value></action>
13
+ <action method="setData"><name>show_stream</name><value>flikebox/general/show_stream</value></action>
14
+ </block>
15
+ </reference>
16
+ <reference name="right">
17
+ <block type="flikebox/likebox" name="right.flikebox.likebox" template="flikebox/likebox.phtml">
18
+ <action method="setData"><name>position</name><value>right</value></action>
19
+ <action method="setData"><name>page_id</name><value>flikebox/general/page_id</value></action>
20
+ <action method="setData"><name>width</name><value>flikebox/general/width</value></action>
21
+ <action method="setData"><name>height</name><value>flikebox/general/height</value></action>
22
+ <action method="setData"><name>connection</name><value>flikebox/general/connection</value></action>
23
+ <action method="setData"><name>show_header</name><value>flikebox/general/show_header</value></action>
24
+ <action method="setData"><name>show_face</name><value>flikebox/general/show_face</value></action>
25
+ <action method="setData"><name>show_stream</name><value>flikebox/general/show_stream</value></action>
26
+ </block>
27
+ </reference>
28
+ </default>
29
+ </layout>
app/design/frontend/base/default/template/flikebox/likebox.phtml ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <?php
2
+ echo $this->getLikebox();
3
+ ?>
app/etc/modules/Vivacity_Flikebox.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Vivacity_Flikebox>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ </Vivacity_Flikebox>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Facebook_Like_Box_In_Sidebar</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.gnu.org/copyleft/gpl.html">GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Shows LikeBox of your FaceBook Page on your store for customers to easily follow you on FaceBook.</summary>
10
+ <description>Facebook Like Box Sidebar which will enable facebook like box along with fan list and stream in your magento store.</description>
11
+ <notes>Initial Extension Release</notes>
12
+ <authors><author><name>Team Vivacity</name><user>vivacityinfotec</user><email>vivacityinfotech.jaipur@gmail.com</email></author></authors>
13
+ <date>2014-06-09</date>
14
+ <time>13:45:26</time>
15
+ <contents><target name="magecommunity"><dir name="Vivacity"><dir name="Flikebox"><dir name="Block"><file name="Likebox.php" hash="c40943ddd52e6d6cfeaab5965425878d"/></dir><dir name="Helper"><file name="Data.php" hash="b9e5ef31219ab83e0935d087b659bd2d"/></dir><dir name="Model"><file name="Layout.php" hash="fd6eff5fb72869a6743ecaf0ca07eb03"/></dir><dir name="controllers"><file name="IndexController.php" hash="57f05f7053b5bd8346254764b47002eb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="010e92546869e3f32d2a1fe71518f068"/><file name="config.xml" hash="d3a4d81aadcb9fbf3a2513c1006936df"/><file name="system.xml" hash="ffd2a680c6c561b28a8cecce1f3394fa"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vivacity_Flikebox.xml" hash="af817da4c67913a25c054bd2afd7383d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="flikebox"><file name="likebox.phtml" hash="55b62a6064075df0d477426e42898183"/></dir></dir><dir name="layout"><file name="flikebox.xml" hash="c79cafb7dad6a09515c75ef6973a5964"/></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>