Feed & LikeBox For Facebook - Version 0.2

Version Description

  • Now compatible with all mobile devices.
Download this release

Release Info

Developer weblizar
Plugin Icon 128x128 Feed & LikeBox For Facebook
Version 0.2
Comparing to
See all releases

Version 0.2

facebook-by-weblizar.php ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Facebook By WebLizar
4
+ * Version: 0.2
5
+ * Description: Display your facebook page live stream & friends on WordPress blog.
6
+ * Author: WebLizar
7
+ * Author URI: http://www.weblizar.com
8
+ * Plugin URI: http://www.weblizar.com/plugins/
9
+ *
10
+ * This program is free software; you can redistribute it and/or
11
+ * modify it under the terms of the GNU General Public License
12
+ * as published by the Free Software Foundation; either version 2
13
+ * of the License, or (at your option) any later version.
14
+ *
15
+ * This program is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
+ * GNU General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU General Public License
21
+ * along with this program; if not, write to the Free Software
22
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
+ */
24
+
25
+ /**
26
+ * Constant Values & Variables
27
+ */
28
+ define("WEBLIZAR_FACEBOOK_PLUGIN_URL", plugin_dir_url(__FILE__));
29
+ define("WEBLIZAR_FACEBOOK_TEXT_DOMAIN", "weblizar_facebook");
30
+
31
+ /**
32
+ * Widget Code
33
+ */
34
+
35
+ /**
36
+ * Adds WeblizarFacebook widget.
37
+ */
38
+ class WeblizarFacebook extends WP_Widget {
39
+
40
+ /**
41
+ * Register widget with WordPress.
42
+ */
43
+ function __construct() {
44
+ parent::__construct(
45
+ 'weblizar_facebook', // Base ID
46
+ 'Facebook By WebLizar', // Widget Name
47
+ array( 'description' => __( 'Display latest tweets from your Twitter account', WEBLIZAR_FACEBOOK_TEXT_DOMAIN ), ) // Args
48
+ );
49
+ }
50
+
51
+ /**
52
+ * Front-end display of widget.
53
+ *
54
+ * @see WP_Widget::widget()
55
+ *
56
+ * @param array $args Widget arguments.
57
+ * @param array $instance Saved values from database.
58
+ */
59
+ public function widget( $args, $instance ) {
60
+ $FbAppId = apply_filters( 'facebook_app_id', $instance['FbAppId'] );
61
+ $ColorScheme = apply_filters( 'facebook_color_scheme', $instance['ColorScheme'] );
62
+ $ForceWall = apply_filters( 'facebook_force_wall', $instance['ForceWall'] );
63
+ $Header = apply_filters( 'facebook_header', $instance['Header'] );
64
+ $Height = apply_filters( 'facebook_height', $instance['Height'] );
65
+ $FacebookPageURL = apply_filters( 'facebook_page_url', $instance['FacebookPageURL'] );
66
+ $ShowBorder = apply_filters( 'facebook_show_border', $instance['ShowBorder'] );
67
+ $ShowFaces = apply_filters( 'facebook_show_faces', $instance['ShowFaces'] );
68
+ $Stream = apply_filters( 'facebook_stream', $instance['Stream'] );
69
+ $Width = apply_filters( 'facebook_width', $instance['Width'] );
70
+
71
+ //echo $args['before_widget'];
72
+ if ( ! empty( $Title ) )
73
+ echo $args['before_title'] . $Title . $args['after_title'];
74
+ //echo __( 'Hello, World!', 'text_domain' );
75
+ ?>
76
+ <style>
77
+ @media (max-width:767px)
78
+ {
79
+ .fb_iframe_widget {
80
+ width: 100%;
81
+ }
82
+ .fb_iframe_widget span {
83
+ width: 100% !important;
84
+ }
85
+ .fb_iframe_widget iframe {
86
+ width: 100% !important;
87
+ }
88
+ ._8r {
89
+ margin-right: 5px;
90
+ margin-top: -4px !important;
91
+ }
92
+ }
93
+ </style>
94
+ <div id="fb-root"></div>
95
+ <script>(function(d, s, id) {
96
+ var js, fjs = d.getElementsByTagName(s)[0];
97
+ if (d.getElementById(id)) return;
98
+ js = d.createElement(s); js.id = id;
99
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=<?php echo $FbAppId; ?>&version=v2.0";
100
+ fjs.parentNode.insertBefore(js, fjs);
101
+ }(document, 'script', 'facebook-jssdk'));
102
+ </script>
103
+ <div class="fb-like-box" colorscheme="<?php echo $ColorScheme; ?>" data-header="<?php echo $Header; ?>" data-height="<?php echo $Height; ?>" data-href="<?php echo $FacebookPageURL; ?>" data-show-border="<?php echo $ShowBorder; ?>" data-show-faces="<?php echo $ShowFaces; ?>" data-stream="<?php echo $Stream; ?>" data-width="<?php echo $Width; ?>" data-force-wall="<?php echo $ForceWall; ?>"></div>
104
+
105
+ <?php
106
+ //echo $args['after_widget'];
107
+ }
108
+
109
+ /**
110
+ * Back-end widget form.
111
+ *
112
+ * @see WP_Widget::form()
113
+ *
114
+ * @param array $instance Previously saved values from database.
115
+ */
116
+ public function form( $instance ) {
117
+
118
+ //default values & Submitted Values
119
+ $ColorScheme = __( 'lite', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
120
+ if ( isset( $instance[ 'ColorScheme' ] ) ) {
121
+ $ColorScheme = $instance[ 'ColorScheme' ];
122
+ }
123
+
124
+ $ForceWall = __( 'false', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
125
+ if ( isset( $instance[ 'ForceWall' ] ) ) {
126
+ $ForceWall = $instance[ 'ForceWall' ];
127
+ }
128
+
129
+ $Header = __( 'true', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
130
+ if ( isset( $instance[ 'Header' ] ) ) {
131
+ $Header = $instance[ 'Header' ];
132
+ }
133
+
134
+ $Height = __( '556', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
135
+ if ( isset( $instance[ 'Height' ] ) ) {
136
+ $Height = $instance[ 'Height' ];
137
+ }
138
+
139
+ $FacebookPageURL = __( 'https://www.facebook.com/FacebookDevelopers', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
140
+ if ( isset( $instance[ 'FacebookPageURL' ] ) ) {
141
+ $FacebookPageURL = $instance[ 'FacebookPageURL' ];
142
+ }
143
+
144
+ $ShowBorder = __( 'true', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
145
+ if ( isset( $instance[ 'ShowBorder' ] ) ) {
146
+ $ShowBorder = $instance[ 'ShowBorder' ];
147
+ }
148
+
149
+ $ShowFaces = __( 'true', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
150
+ if ( isset( $instance[ 'ShowFaces' ] ) ) {
151
+ $ShowFaces = $instance[ 'ShowFaces' ];
152
+ }
153
+
154
+ $Stream = __( 'true', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
155
+ if ( isset( $instance[ 'Stream' ] ) ) {
156
+ $Stream = $instance[ 'Stream' ];
157
+ }
158
+
159
+ $Width = __( '292', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
160
+ if ( isset( $instance[ 'Width' ] ) ) {
161
+ $Width = $instance[ 'Width' ];
162
+ }
163
+
164
+ $FbAppId = __( '488390501239538', WEBLIZAR_FACEBOOK_TEXT_DOMAIN );
165
+ if ( isset( $instance[ 'FbAppId' ] ) ) {
166
+ $FbAppId = $instance[ 'FbAppId' ];
167
+ }
168
+ ?>
169
+ <p>
170
+ <label for="<?php echo $this->get_field_id( 'FacebookPageURL' ); ?>"><?php _e( 'Facebook Page URL' ); ?></label>
171
+ <input class="widefat" id="<?php echo $this->get_field_id( 'FacebookPageURL' ); ?>" name="<?php echo $this->get_field_name( 'FacebookPageURL' ); ?>" type="text" value="<?php echo esc_attr( $FacebookPageURL ); ?>">
172
+ </p>
173
+ <p>
174
+ <label for="<?php echo $this->get_field_id( 'ColorScheme' ); ?>"><?php _e( 'Widget Color Scheme' ); ?></label>
175
+ <select id="<?php echo $this->get_field_id( 'ColorScheme' ); ?>" name="<?php echo $this->get_field_name( 'ColorScheme' ); ?>">
176
+ <option value="light" <?php if($ColorScheme == "light") echo "selected=selected" ?>>Light Color Theme</option>
177
+ <option value="dark" <?php if($ColorScheme == "dark") echo "selected=selected" ?>>Dark Color Theme</option>
178
+ </select>
179
+ </p>
180
+ <p>
181
+ <label for="<?php echo $this->get_field_id( 'Header' ); ?>"><?php _e( 'Show Widget Header' ); ?></label>
182
+ <select id="<?php echo $this->get_field_id( 'Header' ); ?>" name="<?php echo $this->get_field_name( 'Header' ); ?>">
183
+ <option value="true" <?php if($Header == "true") echo "selected=selected" ?>>Yes</option>
184
+ <option value="false" <?php if($Header == "false") echo "selected=selected" ?>>No</option>
185
+ </select>
186
+ </p>
187
+ <p>
188
+ <label for="<?php echo $this->get_field_id( 'Stream' ); ?>"><?php _e( 'Show Live Stream' ); ?></label>
189
+ <select id="<?php echo $this->get_field_id( 'Stream' ); ?>" name="<?php echo $this->get_field_name( 'Stream' ); ?>">
190
+ <option value="true" <?php if($Stream == "true") echo "selected=selected" ?>>Yes</option>
191
+ <option value="false" <?php if($Stream == "false") echo "selected=selected" ?>>No</option>
192
+ </select>
193
+ </p>
194
+ <p>
195
+ <label for="<?php echo $this->get_field_id( 'Width' ); ?>"><?php _e( 'Widget Width' ); ?></label>
196
+ <input class="widefat" id="<?php echo $this->get_field_id( 'Width' ); ?>" name="<?php echo $this->get_field_name( 'Width' ); ?>" type="text" value="<?php echo esc_attr( $Width ); ?>">
197
+ </p>
198
+ <p>
199
+ <label for="<?php echo $this->get_field_id( 'Height' ); ?>"><?php _e( 'Widget Height' ); ?></label>
200
+ <input class="widefat" id="<?php echo $this->get_field_id( 'Height' ); ?>" name="<?php echo $this->get_field_name( 'Height' ); ?>" type="text" value="<?php echo esc_attr( $Height ); ?>">
201
+ </p>
202
+ <p>
203
+ <label for="<?php echo $this->get_field_id( 'FbAppId' ); ?>"><?php _e( 'Facebook App ID' ); ?> (<?php _e("Required",WEBLIZAR_FACEBOOK_TEXT_DOMAIN); ?>)</label>
204
+ <input class="widefat" id="<?php echo $this->get_field_id( 'FbAppId' ); ?>" name="<?php echo $this->get_field_name( 'FbAppId' ); ?>" type="text" value="<?php echo esc_attr( $FbAppId ); ?>">
205
+ <?php _e("Get Your Facebook App. Id",WEBLIZAR_FACEBOOK_TEXT_DOMAIN); ?>: <a href="https://help.yahoo.com/kb/yahoo-merchant-solutions/facebook-application-sln18861.html" target="_blank">HERE</a>
206
+ </p>
207
+
208
+ <?php
209
+ }
210
+
211
+ /**
212
+ * Sanitize widget form values as they are saved.
213
+ *
214
+ * @see WP_Widget::update()
215
+ *
216
+ * @param array $new_instance Values just sent to be saved.
217
+ * @param array $old_instance Previously saved values from database.
218
+ *
219
+ * @return array Updated safe values to be saved.
220
+ */
221
+ public function update( $new_instance, $old_instance ) {
222
+ $instance = array();
223
+ $instance['FacebookPageURL'] = ( ! empty( $new_instance['FacebookPageURL'] ) ) ? strip_tags( $new_instance['FacebookPageURL'] ) : 'https://www.facebook.com/pages/Web-Lizar/1416569958601479';
224
+ $instance['ColorScheme'] = ( ! empty( $new_instance['ColorScheme'] ) ) ? strip_tags( $new_instance['ColorScheme'] ) : 'light';
225
+ $instance['Header'] = ( ! empty( $new_instance['Header'] ) ) ? strip_tags( $new_instance['Header'] ) : 'true';
226
+ $instance['Width'] = ( ! empty( $new_instance['Width'] ) ) ? strip_tags( $new_instance['Width'] ) : '292';
227
+ $instance['Height'] = ( ! empty( $new_instance['Height'] ) ) ? strip_tags( $new_instance['Height'] ) : '556';
228
+ $instance['Stream'] = ( ! empty( $new_instance['Stream'] ) ) ? strip_tags( $new_instance['Stream'] ) : 'true';
229
+ $instance['ShowFaces'] = ( ! empty( $new_instance['ShowFaces'] ) ) ? strip_tags( $new_instance['ShowFaces'] ) : 'true';
230
+ $instance['ShowBorder'] = ( ! empty( $new_instance['ShowBorder'] ) ) ? strip_tags( $new_instance['ShowBorder'] ) : 'true';
231
+ $instance['ForceWall'] = ( ! empty( $new_instance['ForceWall'] ) ) ? strip_tags( $new_instance['ForceWall'] ) : 'false';
232
+ $instance['FbAppId'] = ( ! empty( $new_instance['FbAppId'] ) ) ? strip_tags( $new_instance['FbAppId'] ) : '488390501239538';
233
+
234
+ return $instance;
235
+ }
236
+
237
+ } // class WeblizarFacebook
238
+
239
+ // register WeblizarFacebook widget
240
+ function WeblizarFacebookWidget() {
241
+ register_widget( 'WeblizarFacebook' );
242
+ }
243
+ add_action( 'widgets_init', 'WeblizarFacebookWidget' );
244
+ ?>
readme.txt ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Facebook By Weblizar ===
2
+ Contributors: weblizar
3
+ Donate link: http://www.weblizar.com/
4
+ Tags: facebook, facebook like, facebook widget, facebook page, facebook share, facebook share button, Like, like button, Share, share button, facebook fanbox, facebook page, page, plugin, posts, publish Facebook, sidebar, social, Social Plugins, facebook embed, facebook events, Facebook feed, Like Button Widget,wall, facebook wall, facebook photos, share, tweets, facebook share, facebook news
5
+ Requires at least: 3.0
6
+ Tested up to: 3.9.1
7
+ Stable tag: 0.2
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+
12
+ Facebook Widget for add latest Facebok Feeds of any public facebook page to your site.
13
+ == Description ==
14
+
15
+ Facebook by [Weblizar](http://www.weblizar.com/) plugin is very simple and easy facebook widget plugin to display your facebook page live stream & friends on WordPress blog.
16
+
17
+ Using **Facebook By Weblizar** facebook widget publish your facbook page post & show your facebook page fans.
18
+
19
+ ### The features of the Plugin
20
+
21
+ * Facebook Widget
22
+ * Facebook Widget Settings
23
+ * Facebook Page Like Button
24
+ * Facebook Page Live Stream
25
+ * Facebook Page Fan Faces
26
+ * Facebook Page Border Option
27
+ * Facebook Page Custom Height & Width Option
28
+ * Mobile device compatible
29
+ * All browser support
30
+ * Responsive facebook wall
31
+ * latest feed displays
32
+ * Display page fans or users
33
+
34
+ == Features ==
35
+ * Facebook Widget
36
+ * Facebook Widget Settings
37
+ * Facebook Page Like Button
38
+ * Facebook Page Live Stream
39
+ * Facebook Page Fan Faces
40
+ * Facebook Page Border Option
41
+ * Facebook Page Custom Height & Width Option
42
+
43
+ = Docs & Support =
44
+
45
+ You can find [docs](http://weblizar.com/facebook-plugin-by-weblizar/), [FAQ](http://www.weblizar.com/faq/) and more detailed information about Testimonial on [Weblizar](http://www.weblizar.com). If you were unable to find the answer to your question on the FAQ or in any of the documentation, you should check the [support forum](http://weblizar.com/facebook-plugin-by-weblizar/) on WordPress.org.
46
+
47
+ = We Need Your Support =
48
+
49
+ It is really hard to continue development and support for this free plugin without contributions from users like you. If you are enjoying using our Testimonial plugin and find it useful, then please consider [__Making a Donation__](http://www.weblizar.com). Your donation will help us to encourage and support the plugin's continued development and better user support.
50
+
51
+
52
+ = Translators =
53
+
54
+ Please contribute to translate our plugin. Contact at `lizarweb (at) gmail (dot) com`.
55
+
56
+ == Installation ==
57
+
58
+ 1. Upload the entire `facebook-by-weblizar` folder to the `/wp-content/plugins/` directory.
59
+ 2. Activate the plugin through the 'Plugins' menu in WordPress.
60
+ 3. Go to Widgets in Appearance Menu and activate widget.
61
+
62
+ == Frequently Asked Questions ==
63
+
64
+ Please use WordPress support forum to ask any query regarding any issue.
65
+
66
+ == Screenshots ==
67
+
68
+ 1. Facebook Widget Preview
69
+ 2. Facebook Widget Settings
70
+ 3. Facebook Widget Preview On Site
71
+
72
+ == Changelog ==
73
+
74
+ For more information, see Weblizar(http://wwww.weblizar.com/).
75
+
76
+ = 0.2 =
77
+
78
+ * Now compatible with all mobile devices.
79
+
80
+ = 0.1 =
81
+
82
+ * Feature - Facebook Widget
83
+ * Feature - Facebook Widget Settings Panel
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file