FacebookFanBox - Version 0.1.2

Version Notes

This version for Magento 1.3

Download this release

Release Info

Developer Magento Core Team
Extension FacebookFanBox
Version 0.1.2
Comparing to
See all releases


Version 0.1.2

app/code/local/Magestore/Fbfanbox/Block/Fbfanbox.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Magestore_Fbfanbox_Block_Fbfanbox extends Mage_Core_Block_Template
3
+ {
4
+ public function _prepareLayout()
5
+ {
6
+ return parent::_prepareLayout();
7
+ }
8
+
9
+ public function getFbfanbox()
10
+ {
11
+ if (!$this->hasData('fbfanbox')) {
12
+ $fbfanbox = array();
13
+
14
+ $enable = Mage::getStoreConfig('fbfanbox/general/enable');
15
+ $fb_page_id = Mage::getStoreConfig('fbfanbox/general/fb_page_id');
16
+ $box_width = Mage::getStoreConfig('fbfanbox/general/box_width');
17
+ $box_height = Mage::getStoreConfig('fbfanbox/general/box_height');
18
+ $connection = Mage::getStoreConfig('fbfanbox/general/connection');
19
+ $stream = Mage::getStoreConfig('fbfanbox/general/stream');
20
+ $header = Mage::getStoreConfig('fbfanbox/general/header');
21
+
22
+ if(!$connection)
23
+ {
24
+ $connection = 10;
25
+ }
26
+
27
+ $fbfanbox['enable'] =$enable;
28
+ $fbfanbox['fb_page_id'] =$fb_page_id;
29
+ $fbfanbox['box_width'] =$box_width;
30
+ $fbfanbox['box_height'] =$box_height;
31
+ $fbfanbox['connection'] =$connection;
32
+ $fbfanbox['stream'] =$stream;
33
+ $fbfanbox['header'] =$header;
34
+
35
+ $this->setData('fbfanbox', $fbfanbox);
36
+ }
37
+ return $this->getData('fbfanbox');
38
+
39
+ }
40
+ }
app/code/local/Magestore/Fbfanbox/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Magestore_Fbfanbox_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/Magestore/Fbfanbox/etc/config.xml ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <default>
4
+ <fbfanbox>
5
+ <general>
6
+ <enable>1</enable>
7
+ <fb_page_id>255197337659</fb_page_id>
8
+ <header>1</header>
9
+ <box_width>292</box_width>
10
+ <connection>10</connection>
11
+ </general>
12
+
13
+ </fbfanbox>
14
+ </default>
15
+ <modules>
16
+ <Magestore_Fbfanbox>
17
+ <version>0.1.2</version>
18
+ </Magestore_Fbfanbox>
19
+ </modules>
20
+ <frontend>
21
+ <routers>
22
+ <fbfanbox>
23
+ <use>standard</use>
24
+ <args>
25
+ <module>Magestore_Fbfanbox</module>
26
+ <frontName>fbfanbox</frontName>
27
+ </args>
28
+ </fbfanbox>
29
+ </routers>
30
+ <layout>
31
+ <updates>
32
+ <fbfanbox>
33
+ <file>fbfanbox.xml</file>
34
+ </fbfanbox>
35
+ </updates>
36
+ </layout>
37
+ </frontend>
38
+ <admin>
39
+ <routers>
40
+ <fbfanbox>
41
+ <use>admin</use>
42
+ <args>
43
+ <module>Magestore_Fbfanbox</module>
44
+ <frontName>fbfanbox</frontName>
45
+ </args>
46
+ </fbfanbox>
47
+ </routers>
48
+ </admin>
49
+ <adminhtml>
50
+ <menu>
51
+ <magestore>
52
+ <title>Magestore Extension</title>
53
+ <sort_order>71</sort_order>
54
+ <children>
55
+ <fbfanbox module="fbfanbox">
56
+ <title>Fbfanbox</title>
57
+ <sort_order>71</sort_order>
58
+ <children>
59
+ <items module="fbfanbox">
60
+ <title>FbFanBox Setting </title>
61
+ <sort_order>0</sort_order>
62
+ <action>adminhtml/system_config/edit/section/fbfanbox</action>
63
+ </items>
64
+ </children>
65
+ </fbfanbox>
66
+ </children>
67
+ </magestore>
68
+
69
+
70
+ </menu>
71
+
72
+ <acl>
73
+ <resources>
74
+ <all>
75
+ <title>Allow Everything</title>
76
+ </all>
77
+ <admin>
78
+ <children>
79
+ <system>
80
+ <children>
81
+ <config>
82
+ <children>
83
+ <fbfanbox translate="title">
84
+ <title>FBFanBox</title>
85
+ <sort_order>50</sort_order>
86
+ </fbfanbox>
87
+ </children>
88
+ </config>
89
+ </children>
90
+ </system>
91
+ <Magestore_Fbfanbox>
92
+ <title>Fbfanbox Module</title>
93
+ <sort_order>10</sort_order>
94
+ </Magestore_Fbfanbox>
95
+ </children>
96
+ </admin>
97
+ </resources>
98
+ </acl>
99
+
100
+ <layout>
101
+ <updates>
102
+ <fbfanbox>
103
+ <file>fbfanbox.xml</file>
104
+ </fbfanbox>
105
+ </updates>
106
+ </layout>
107
+ </adminhtml>
108
+ <global>
109
+ <models>
110
+ <fbfanbox>
111
+ <class>Magestore_Fbfanbox_Model</class>
112
+ <resourceModel>fbfanbox_mysql4</resourceModel>
113
+ </fbfanbox>
114
+ <fbfanbox_mysql4>
115
+ <class>Magestore_Fbfanbox_Model_Mysql4</class>
116
+ <entities>
117
+ <fbfanbox>
118
+ <table>fbfanbox</table>
119
+ </fbfanbox>
120
+ </entities>
121
+ </fbfanbox_mysql4>
122
+ </models>
123
+ <resources>
124
+ <fbfanbox_setup>
125
+ <setup>
126
+ <module>Magestore_Fbfanbox</module>
127
+ </setup>
128
+ <connection>
129
+ <use>core_setup</use>
130
+ </connection>
131
+ </fbfanbox_setup>
132
+ <fbfanbox_write>
133
+ <connection>
134
+ <use>core_write</use>
135
+ </connection>
136
+ </fbfanbox_write>
137
+ <fbfanbox_read>
138
+ <connection>
139
+ <use>core_read</use>
140
+ </connection>
141
+ </fbfanbox_read>
142
+ </resources>
143
+ <blocks>
144
+ <fbfanbox>
145
+ <class>Magestore_Fbfanbox_Block</class>
146
+ </fbfanbox>
147
+ </blocks>
148
+ <helpers>
149
+ <fbfanbox>
150
+ <class>Magestore_Fbfanbox_Helper</class>
151
+ </fbfanbox>
152
+ </helpers>
153
+ </global>
154
+ </config>
app/code/local/Magestore/Fbfanbox/etc/system.xml ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
  <label>FBFanBox Configuration</label>
1
  <frontend_type>text</frontend_type>
2
  <sort_order>1</sort_order>
3
  <show_in_default>1</show_in_default>
4
  <show_in_website>1</show_in_website>
5
  <show_in_store>0</show_in_store>
6
  <fields>
 
 
 
 
 
 
 
 
 
 
7
  <label>Facebook Page ID</label>
8
  <frontend_type>text</frontend_type>
9
  <sort_order>2</sort_order>
10
  <show_in_default>1</show_in_default>
11
  <show_in_website>1</show_in_website>
12
  <show_in_store>1</show_in_store>
13
  </fb_page_id>
14
  <label>Width of the box in pixel</label>
15
  <frontend_type>text</frontend_type>
16
  <sort_order>3</sort_order>
17
  <show_in_default>1</show_in_default>
18
  <show_in_website>1</show_in_website>
19
  <show_in_store>1</show_in_store>
20
  </box_width>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <magestore translate="label">
5
+ <label>Magestore Extension</label>
6
+ <sort_order>400</sort_order>
7
+ </magestore>
8
+ </tabs>
9
+ <sections>
10
+ <fbfanbox translate="label" module="fbfanbox">
11
+ <class>separator-top</class>
12
+ <label>FBFanBox</label>
13
+ <tab>magestore</tab>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>300</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+ <groups>
20
  <label>FBFanBox Configuration</label>
21
  <frontend_type>text</frontend_type>
22
  <sort_order>1</sort_order>
23
  <show_in_default>1</show_in_default>
24
  <show_in_website>1</show_in_website>
25
  <show_in_store>0</show_in_store>
26
  <fields>
27
+ <enable translate="label">
28
+ <label>Enable FBFanBox</label>
29
+ <frontend_type>select</frontend_type>
30
+ <source_model>adminhtml/system_config_source_yesno</source_model>
31
+ <sort_order>1</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
+ </enable>
36
+
37
  <label>Facebook Page ID</label>
38
  <frontend_type>text</frontend_type>
39
  <sort_order>2</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
  </fb_page_id>
44
  <label>Width of the box in pixel</label>
45
  <frontend_type>text</frontend_type>
46
  <sort_order>3</sort_order>
47
  <show_in_default>1</show_in_default>
48
  <show_in_website>1</show_in_website>
49
  <show_in_store>1</show_in_store>
50
  </box_width>
51
+
52
+ <box_height translate="label">
53
+ <label>Height of the box in pixel</label>
54
+ <frontend_type>text</frontend_type>
55
+ <sort_order>4</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>1</show_in_store>
59
+ <comment>Height of the box in pixel</comment>
60
+ </box_height>
61
+
62
+ <connection translate="label">
63
+ <label>Connections</label>
64
+ <frontend_type>text</frontend_type>
65
+ <sort_order>5</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>Show a sample of this many users who have liked this page</comment>
70
+ </connection>
71
+
72
+ <stream translate="label">
73
+ <label>Streams</label>
74
+ <frontend_type>select</frontend_type>
75
+ <source_model>adminhtml/system_config_source_yesno</source_model>
76
+ <sort_order>6</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ <comment>Show the profile stream for the public profile</comment>
81
+ </stream>
82
+
83
+ <header translate="label">
84
+ <label>Header</label>
85
+ <frontend_type>select</frontend_type>
86
+ <source_model>adminhtml/system_config_source_yesno</source_model>
87
+ <sort_order>7</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>1</show_in_store>
91
+ <comment>Show the 'find us on Facebook' bar at top</comment>
92
+ </header>
93
+ </groups>
94
+ </fbfanbox>
95
+ </sections>
96
+ </config>
app/design/frontend/default/default/template/fbfanbox/fbfanbox.phtml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $fbfanbox = $this->getFbfanbox();
3
+ if($fbfanbox['enable'])
4
+ {
5
+ $box_content="";
6
+ $box_content .='<iframe src="http://www.facebook.com/plugins/likebox.php?id='. $fbfanbox['fb_page_id'];
7
+ if($fbfanbox['box_width'])
8
+ {
9
+ $box_content .= '&amp;width='. $fbfanbox['box_width'];
10
+ }
11
+ if($fbfanbox['box_height'])
12
+ {
13
+ $box_content .= '&amp;height='. $fbfanbox['box_height'];
14
+ }
15
+
16
+ $box_content .= '&amp;connections='. $fbfanbox['connection'];
17
+
18
+ if($fbfanbox['header'])
19
+ {
20
+ $box_content .= '&amp;header=true';
21
+ }
22
+
23
+ if($fbfanbox['stream'])
24
+ {
25
+ $box_content .= '&amp;stream=true';
26
+ }
27
+ $box_content .= '" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; ';
28
+
29
+ if($fbfanbox['box_width'])
30
+ {
31
+ $box_content .= ' width:'. $fbfanbox['box_width'] . 'px; ';
32
+ }
33
+ if($fbfanbox['box_height'])
34
+ {
35
+ $box_content .= ' height:'. $fbfanbox['box_height'] . 'px; ';
36
+ }
37
+ $box_content .= '"></iframe>';
38
+
39
+ echo("<div id='fbfanbox'>");
40
+ echo($box_content);
41
+ echo("<div style='font-size:9px'><a href='http://www.magestore.com'>Powered by MageStore.com</a></div>");
42
+ echo("</div>");
43
+
44
+ }
45
+ ?>
app/etc/modules/Magestore_Fbfanbox.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Magestore_Fbfanbox>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Magestore_Fbfanbox>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>FacebookFanBox</name>
4
+ <version>0.1.2</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Shows Fan of a Facebook page or a Facebook application on Magento stores.</summary>
10
+ <description>Nowaday, Facebook become a very popular social network all over the world so it is a right place to advertise your product. Almost companies, organizations or stores have they own Facebook fan page. More users join to that page, more benefit. FbFanBox is an easy way to do that on a Magento store.</description>
11
+ <notes>This version for Magento 1.3</notes>
12
+ <authors><author><name>Magestore.com</name><user>auto-converted</user><email>magestore@gmail.com</email></author></authors>
13
+ <date>2010-04-27</date>
14
+ <time>07:58:40</time>
15
+ <contents><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="fbfanbox"><file name="fbfanbox.phtml" hash="8286b2821f2c59cfab3788af663dbeec"/></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Magestore"><dir name="Fbfanbox"><dir name="Block"><file name="Fbfanbox.php" hash="d1e8ab7a5ff2f64a270c781de8d16e36"/></dir><dir name="etc"><file name="config.xml" hash="b26b3616655bd707363b7cb4ee840324"/><file name="system.xml" hash="8865f73d9152e97307e0ceb8d7c5009d"/></dir><dir name="Helper"><file name="Data.php" hash="4ce9de5fe03ad1a910799c60c4b0d822"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magestore_Fbfanbox.xml" hash="4a53e6d33e3483bd9ba073f25d91bb74"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>