Facebook Button by BestWebSoft - Version 2011.2.01

Version Description

Download this release

Release Info

Developer bestwebsoft
Plugin Icon 128x128 Facebook Button by BestWebSoft
Version 2011.2.01
Comparing to
See all releases

Version 2011.2.01

Thumbs.db ADDED
Binary file
facebook-button-plugin.php ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Facebook Button Plugin
4
+ Plugin URI: http://bestwebsoft.com/plugin/
5
+ Description: Put Facebook Button in to your post.
6
+ Author: BestWebSoft
7
+ Version: 2.01
8
+ Author URI: http://bestwebsoft.com/
9
+ License: GPLv2 or later
10
+ */
11
+
12
+ /* Copyright 2011 BestWebSoft ( plugin@bestwebsoft.com )
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License, version 2, as
16
+ published by the Free Software Foundation.
17
+
18
+ This program is distributed in the hope that it will be useful,
19
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ GNU General Public License for more details.
22
+
23
+ You should have received a copy of the GNU General Public License
24
+ along with this program; if not, write to the Free Software
25
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
+ */
27
+
28
+ if( ! function_exists( 'bws_add_menu_render' ) ) {
29
+ function bws_add_menu_render() {
30
+ global $title;
31
+ ?>
32
+ <div class="wrap">
33
+ <div class="icon32 icon32-bws" id="icon-options-general"></div>
34
+ <h2><?php echo $title;?></h2>
35
+ <p><a href="http://wordpress.org/extend/plugins/captcha/">Captcha</a></p>
36
+ <p><a href="http://wordpress.org/extend/plugins/contact-form-plugin/">Contact Form</a></p>
37
+ <p><a href="http://wordpress.org/extend/plugins/facebook-button-plugin/">Facebook Like Button Plugin</a></p>
38
+ <p><a href="http://wordpress.org/extend/plugins/twitter-plugin/">Twitter Plugin</a></p>
39
+ <p><a href="http://wordpress.org/extend/plugins/portfolio/">Portfolio</a></p>
40
+ <span style="color: rgb(136, 136, 136); font-size: 10px;">If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
41
+ </div>
42
+ <?php
43
+ }
44
+ }
45
+
46
+ if( ! function_exists( 'bws_plugin_header' ) ) {
47
+ function bws_plugin_header() {
48
+ global $post_type;
49
+ ?>
50
+ <style>
51
+ #adminmenu #toplevel_page_my_new_menu div.wp-menu-image
52
+ {
53
+ background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_16.png") no-repeat scroll center center transparent;
54
+ }
55
+ #adminmenu #toplevel_page_my_new_menu:hover div.wp-menu-image,#adminmenu #toplevel_page_my_new_menu.wp-has-current-submenu div.wp-menu-image
56
+ {
57
+ background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_16_c.png") no-repeat scroll center center transparent;
58
+ }
59
+ .wrap #icon-options-general.icon32-bws
60
+ {
61
+ background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/facebook-button-plugin/img/icon_36.png") no-repeat scroll left top transparent;
62
+ }
63
+ </style>
64
+ <?php
65
+ }
66
+ }
67
+
68
+ add_action('admin_head', 'bws_plugin_header');
69
+
70
+
71
+ if( ! function_exists( 'fcbk_bttn_plgn_add_pages' ) ) {
72
+ function fcbk_bttn_plgn_add_pages() {
73
+ //add_options_page ( 'FaceBook Button', 'FaceBook Button', 0, 'FaceBookButton', 'fcbk_bttn_plgn_settings_page' );
74
+ add_menu_page(__('BWS Plugins'), __('BWS Plugins'), 'edit_themes', 'my_new_menu', 'bws_add_menu_render', " ", 90);
75
+ add_submenu_page('my_new_menu', 'FaceBook Button Options', 'FaceBook Button', 'edit_themes', __FILE__, 'fcbk_bttn_plgn_settings_page');
76
+
77
+ //call register settings function
78
+ add_action( 'admin_init', 'fcbk_bttn_plgn_settings' );
79
+ }
80
+ }
81
+
82
+ if( ! function_exists( 'fcbk_bttn_plgn_settings' ) ) {
83
+ function fcbk_bttn_plgn_settings() {
84
+ global $fcbk_bttn_plgn_options_array;
85
+
86
+ $fcbk_bttn_plgn_options_array_default = array(
87
+ 'fcbk_bttn_plgn_link' => '',
88
+ 'fcbk_bttn_plgn_where' => '',
89
+ 'fcbk_bttn_plgn_display_option' => '',
90
+ 'fcbk_bttn_plgn_count_icon' => 1,
91
+ 'fb_img_link' => 'wp-content/plugins/facebook-button-plugin/img/standart-facebook-ico.jpg'
92
+ );
93
+
94
+ if( ! get_option( 'fcbk_bttn_plgn_options_array' ) )
95
+ add_option( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array_default, '', 'yes' );
96
+
97
+ $fcbk_bttn_plgn_options_array = get_option( 'fcbk_bttn_plgn_options_array' );
98
+
99
+ $fcbk_bttn_plgn_options_array = array_merge( $fcbk_bttn_plgn_options_array_default, $fcbk_bttn_plgn_options_array );
100
+ }
101
+ }
102
+
103
+ //Function formed content of the plugin's admin page.
104
+ if( ! function_exists( 'fcbk_bttn_plgn_settings_page' ) ) {
105
+ function fcbk_bttn_plgn_settings_page()
106
+ {
107
+ global $fcbk_bttn_plgn_options_array;
108
+ //$fcbk_bttn_plgn_options_array = get_option ( 'fcbk_bttn_plgn_options_array' );
109
+
110
+ $message = "";
111
+ $error = "";
112
+ if( isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) ) {
113
+ // Takes all the changed settings on the plugin's admin page and saves them in array 'fcbk_bttn_plgn_options_array'.
114
+ if ( isset ( $_REQUEST['fcbk_bttn_plgn_where'] ) && isset ( $_REQUEST['fcbk_bttn_plgn_link'] ) && isset ( $_REQUEST['fcbk_bttn_plgn_display_option'] ) ) {
115
+ $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] = $_REQUEST [ 'fcbk_bttn_plgn_link' ];
116
+ $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] = $_REQUEST [ 'fcbk_bttn_plgn_where' ];
117
+ $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] = $_REQUEST [ 'fcbk_bttn_plgn_display_option' ];
118
+ if ( isset ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) && $_FILES [ 'uploadfile' ] [ 'tmp_name' ] != "" ) {
119
+ $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] + 1;
120
+ }
121
+ if($fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] > 2)
122
+ $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ] = 1;
123
+ update_option ( 'fcbk_bttn_plgn_options_array', $fcbk_bttn_plgn_options_array );
124
+ $message = "Options saved.";
125
+ }
126
+ // Form options
127
+ if ( isset ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) && $_FILES [ 'uploadfile' ] [ 'tmp_name' ] != "" ) {
128
+ $max_image_width = 100;
129
+ $max_image_height = 40;
130
+ $max_image_size = 32 * 1024;
131
+ $valid_types = array( 'jpg', 'jpeg' );
132
+
133
+ // Construction to rename downloading file
134
+ $new_name = 'facebook-ico'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ];
135
+ $new_ext = '.jpg';
136
+ $namefile = $new_name.$new_ext;
137
+ $uploaddir = $_REQUEST [ 'home' ] . 'wp-content/plugins/facebook-button-plugin/img/'; // The directory in which we will take the file:
138
+ $uploadfile = $uploaddir.$namefile;
139
+
140
+ //checks is file download initiated by user
141
+ if ( isset ( $_FILES [ 'uploadfile' ] ) && $_REQUEST [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) {
142
+ //Checking is allowed download file given parameters
143
+ if ( is_uploaded_file( $_FILES [ 'uploadfile' ] [ 'tmp_name' ] ) ) {
144
+ $filename = $_FILES [ 'uploadfile' ] [ 'tmp_name' ];
145
+ $ext = substr ( $_FILES [ 'uploadfile' ] [ 'name' ], 1 + strrpos( $_FILES [ 'uploadfile' ] [ 'name' ], '.' ) );
146
+ if ( filesize ( $filename ) > $max_image_size ) {
147
+ $error = "Error: File size > 32K";
148
+ }
149
+ elseif ( ! in_array ( $ext, $valid_types ) ) {
150
+ $error = "Error: Invalid file type";
151
+ }
152
+ else {
153
+ $size = GetImageSize ( $filename );
154
+ if ( ( $size ) && ( $size[0] <= $max_image_width ) && ( $size[1] <= $max_image_height ) ) {
155
+ //If file satisfies requirements, we will move them from temp to your plugin folder and rename to 'facebook_ico.jpg'
156
+ if (move_uploaded_file ( $_FILES [ 'uploadfile' ] [ 'tmp_name' ], $uploadfile ) ) {
157
+ $message .= " Upload successful.";
158
+ }
159
+ else {
160
+ $error = "Error: moving file failed";
161
+ }
162
+ }
163
+ else {
164
+ $error = "Error: check image width or height";
165
+ }
166
+ }
167
+ }
168
+ else {
169
+ $error = "Uploading Error: check image properties";
170
+ }
171
+ }
172
+ fcbk_bttn_plgn_update_option();
173
+ }
174
+ }
175
+ ?>
176
+ <div class="wrap">
177
+ <style>
178
+ .wrap #icon-options-general.icon32-bws
179
+ {
180
+ background: url("../wp-content/plugins/facebook-button-plugin/img/icon_36.png") no-repeat scroll left top transparent;
181
+ }
182
+ </style>
183
+ <div class="icon32 icon32-bws" id="icon-options-general"></div>
184
+ <h2>FaceBook Button Options</h2>
185
+ <div class="updated fade" <?php if( ! isset( $_REQUEST['fcbk_bttn_plgn_form_submit'] ) || $error != "" ) echo "style=\"display:none\""; ?>><p><strong><?php echo $message; ?></strong></p></div>
186
+ <div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
187
+ <div>
188
+ <form name="form1" method="post" action="admin.php?page=facebook-button-plugin/facebook-button-plugin.php" enctype="multipart/form-data" >
189
+ <table class="form-table">
190
+ <tr valign="top">
191
+ <th scope="row"><?php _e( "Your's FaceBook Login:" ); ?></th>
192
+ <td>
193
+ <input name='fcbk_bttn_plgn_link' type='text' value='<?php echo $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ] ?>' style="width:200px;" />
194
+ </td>
195
+ </tr>
196
+ <tr>
197
+ <th>
198
+ Choose display option:
199
+ </th>
200
+ <td>
201
+ <select name="fcbk_bttn_plgn_display_option" onchange="if ( this . value == 'custom' ) { getElementById ( 'fcbk_bttn_plgn_display_option_custom' ) . style.display = 'block'; } else { getElementById ( 'fcbk_bttn_plgn_display_option_custom' ) . style.display = 'none'; }" style="width:200px;" >
202
+ <option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'standart' ) echo 'selected="selected"'; ?> value="standart">Standart FaceBook image</option>
203
+ <option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) echo 'selected="selected"'; ?> value="custom">Custom FaceBook image</option>
204
+ </select>
205
+ </td>
206
+ </tr>
207
+ <tr>
208
+ <th>
209
+ Current image:
210
+ </th>
211
+ <td>
212
+ <img src="<?php echo home_url( '/' ).$fcbk_bttn_plgn_options_array [ 'fb_img_link' ]; ?>" style="margin-left:2px;" />
213
+ </td>
214
+ </tr>
215
+ <tr>
216
+ <td colspan="2">
217
+ <div id="fcbk_bttn_plgn_display_option_custom" <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom' ) { echo ( 'style="display:block"' ); } else {echo ( 'style="display:none"' ); }?>>
218
+ <table>
219
+ <th style="padding-left:0px;font-size:13px;">
220
+ <input type="hidden" name="MAX_FILE_SIZE" value="64000"/>
221
+ <input type="hidden" name="home" value="<?php echo ABSPATH ; ?>"/>
222
+ FaceBook image:
223
+ </th>
224
+ <td>
225
+ <input name="uploadfile" type="file" style="width:196px;" />
226
+ <span style="color: rgb(136, 136, 136); font-size: 10px;">Image properties: max image width:100px; max image height:40px; max image size:32Kb; image types:"jpg", "jpeg".</span>
227
+ </td>
228
+ </table>
229
+ </div>
230
+ </td>
231
+ </tr>
232
+ <tr>
233
+ <th>
234
+ FaceBook Button Position:
235
+ </th>
236
+ <td>
237
+ <select name="fcbk_bttn_plgn_where" onchange="if ( this . value == 'shortcode' ) { getElementById ( 'shortcode' ) . style.display = 'inline'; } else { getElementById ( 'shortcode' ) . style.display = 'none'; }" style="width:200px;" >
238
+ <option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'before' ) echo 'selected="selected"'; ?> value="before">Before</option>
239
+ <option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'after' ) echo 'selected="selected"'; ?> value="after">After</option>
240
+ <option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'beforeandafter' ) echo 'selected="selected"'; ?> value="beforeandafter">Before and After</option>
241
+ <option <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'shortcode ') echo 'selected="selected"'; ?> value="shortcode">Shortcode</option>
242
+ </select>
243
+ <span id="shortcode" style="color: rgb(136, 136, 136); font-size: 10px; <?php if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ] == 'shortcode' ) { echo ( 'display:inline' ); } else { echo ( 'display:none' ); }?>">If you would like to add a FaceBook button to your website, just copy and put this shortcode onto your post or page: [fb_button].</span>
244
+ </td>
245
+ </tr>
246
+ <tr>
247
+ <td colspan="2">
248
+ <input type="hidden" name="fcbk_bttn_plgn_form_submit" value="submit" />
249
+ <input type="submit" value="Save Changes" class="button-primary">
250
+ </td>
251
+ </tr>
252
+ </table>
253
+ </form>
254
+ </div>
255
+ </div>
256
+
257
+ <?php
258
+ }
259
+ }
260
+
261
+ //Function 'facebook_fcbk_bttn_plgn_display_option' reacts to changes type of picture (Standard or Custom) and generates link to image, link transferred to array 'fcbk_bttn_plgn_options_array'
262
+ if( ! function_exists( 'fcbk_bttn_plgn_update_option' ) ) {
263
+ function fcbk_bttn_plgn_update_option () {
264
+ global $fcbk_bttn_plgn_options_array;
265
+ if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'standart' ){
266
+ $fb_img_link = 'wp-content/plugins/facebook-button-plugin/img/standart-facebook-ico.jpg';
267
+ } else if ( $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_display_option' ] == 'custom'){
268
+ $fb_img_link = 'wp-content/plugins/facebook-button-plugin/img/facebook-ico'.$fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_count_icon' ].'.jpg';
269
+ }
270
+ $fcbk_bttn_plgn_options_array [ 'fb_img_link' ] = $fb_img_link ;
271
+ update_option( "fcbk_bttn_plgn_options_array", $fcbk_bttn_plgn_options_array );
272
+ }
273
+ }
274
+
275
+ //Function 'facebook_button' taking from array 'fcbk_bttn_plgn_options_array' necessary information to create FaceBook Button and reacting to your choise in plugin menu - points where it appears.
276
+ if( ! function_exists( 'fcbk_bttn_plgn_display_button' ) ) {
277
+ function fcbk_bttn_plgn_display_button ( $content ) {
278
+ //Query the database to receive array 'fcbk_bttn_plgn_options_array' and receiving necessary information to create button
279
+ $fcbk_bttn_plgn_options_array = get_option ( 'fcbk_bttn_plgn_options_array' );
280
+ $fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ];
281
+ $img = home_url( '/' ).$fcbk_bttn_plgn_options_array [ 'fb_img_link' ];
282
+ $url = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ];
283
+ $permalink_post = get_permalink ( $post_ID );
284
+ //Button
285
+ $button = '<div id="fb_share">
286
+ <div style="float:left;margin-right:10px;" >
287
+ <a name="fb_share" href="http://www.facebook.com/' . $url . '" target="blank">
288
+ <img src="' . $img . '" alt="Fb-Button" />
289
+ </a>
290
+ </div>
291
+ <div>
292
+ <div id="fb-root"></div>
293
+ <script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
294
+ <fb:like href="' . $permalink_post . '" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
295
+ </div>
296
+ </div>';
297
+ //Indication where show FaceBook Button depending on selected item in admin page.
298
+ if ( $fcbk_bttn_plgn_where == 'before' ) {
299
+ return $button . $content;
300
+ } else if ( $fcbk_bttn_plgn_where == 'after' ) {
301
+ return $content . $button;
302
+ } else if ( $fcbk_bttn_plgn_where == 'beforeandafter' ) {
303
+ return $button . $content . $button;
304
+ } else if ( $fcbk_bttn_plgn_where == 'shortcode' ) {
305
+ return $content;
306
+ } else {
307
+ return $content;
308
+ }
309
+ }
310
+ }
311
+
312
+ //Function 'facebook_button_short' are using to create shortcode by FaceBook Button.
313
+ if( ! function_exists( 'fcbk_bttn_plgn_shortcode' ) ) {
314
+ function fcbk_bttn_plgn_shortcode( $content ) {
315
+ $fcbk_bttn_plgn_options_array = get_option ( 'fcbk_bttn_plgn_options_array' );
316
+ $fcbk_bttn_plgn_where = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_where' ];
317
+ $img = home_url( '/' ). $fcbk_bttn_plgn_options_array [ 'fb_img_link' ];
318
+ $url = $fcbk_bttn_plgn_options_array [ 'fcbk_bttn_plgn_link' ];
319
+ $permalink_post = get_permalink ( $post_ID );
320
+ $button = '<div id="fb_share" >
321
+ <div style="float:left;margin-right:10px;" >
322
+ <a name="fb_share" href="http://www.facebook.com/'.$url.'" target="blank">
323
+ <img src="'.$img.'" alt="Fb-Button" />
324
+ </a>
325
+ </div>
326
+ <div>
327
+ <div id="fb-root"></div>
328
+ <script src="http://connect.facebook.net/en_US/all.js#appId=224313110927811&amp;xfbml=1"></script>
329
+ <fb:like href="'.$permalink_post.'" send="false" layout="button_count" width="400" show_faces="false" font=""></fb:like>
330
+ </div>
331
+ </div>';
332
+ return $button;
333
+ }
334
+ }
335
+
336
+ function fcbk_bttn_plgn_action_links( $links, $file ) {
337
+ //Static so we don't call plugin_basename on every plugin row.
338
+ static $this_plugin;
339
+ if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
340
+
341
+ if ( $file == $this_plugin ){
342
+ $settings_link = '<a href="admin.php?page=facebook-button-plugin/facebook-button-plugin.php">' . __('Settings', 'facebook-button-plugin') . '</a>';
343
+ array_unshift( $links, $settings_link );
344
+ }
345
+ return $links;
346
+ } // end function fcbk_bttn_plgn_action_links
347
+
348
+ function fcbk_bttn_plgn_links($links, $file) {
349
+ $base = plugin_basename(__FILE__);
350
+ if ($file == $base) {
351
+ $links[] = '<a href="admin.php?page=facebook-button-plugin/facebook-button-plugin.php">' . __('Settings','facebook-button-plugin') . '</a>';
352
+ $links[] = '<a href="http://wordpress.org/extend/plugins/facebook-button-plugin/faq/" target="_blank">' . __('FAQ','facebook-button-plugin') . '</a>';
353
+ $links[] = '<a href="Mailto:plugin@bestwebsoft.com">' . __('Support','facebook-button-plugin') . '</a>';
354
+ }
355
+ return $links;
356
+ }
357
+
358
+ // adds "Settings" link to the plugin action page
359
+ add_filter( 'plugin_action_links', 'fcbk_bttn_plgn_action_links',10,2);
360
+
361
+ //Additional links on the plugin page
362
+ add_filter( 'plugin_row_meta', 'fcbk_bttn_plgn_links',10,2);
363
+
364
+ //Calling a function add administrative menu.
365
+ add_action( 'admin_menu', 'fcbk_bttn_plgn_add_pages' );
366
+
367
+ //Add shortcode.
368
+ add_shortcode( 'fb_button', 'fcbk_bttn_plgn_shortcode' );
369
+
370
+ //Add settings links.
371
+ add_filter( 'the_content', 'fcbk_bttn_plgn_display_button' );
img/facebook-ico.jpg ADDED
Binary file
img/icon_16.png ADDED
Binary file
img/icon_16_c.png ADDED
Binary file
img/icon_36.png ADDED
Binary file
img/standart-facebook-ico.jpg ADDED
Binary file
readme.txt ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Facebook Like Button Plugin ===
2
+ Contributors: bestwebsoft
3
+ Contributors: bestwebsoft
4
+ Donate link: http://bestwebsoft.com/
5
+ Tags: Facebook, Facebook Button, Like, Like button, Share, Share button, Facebook like, Facebook like button, Facebook button like, Button like, Facebook share, Facebook share button, Facebook button share
6
+ Requires at least: 3.1
7
+ Tested up to: 3.1
8
+ Stable tag: 2011.2.01
9
+
10
+ Add Facebook button to your WordPress website
11
+
12
+ == Description ==
13
+
14
+ Facebook Button Plugin allows you to add follow button in the most easiest and flexible way.
15
+
16
+ == Installation ==
17
+
18
+ 1. Upload `facebook-button-plugin` folder to the `/wp-content/plugins/` directory.
19
+ 2. Activate the plugin through the 'Plugins' menu in your WordPress admin panel.
20
+ 3. You can adjust necessary settings through your WordPress admin pane in "Settings" > "FaceBook Button".
21
+
22
+ == Frequently Asked Questions ==
23
+
24
+ = I cannot see Facebook Button icon in the post after plugin installation =
25
+
26
+ 1. In the WordPress admin panel go to "Plugins", find "Facebook Button Plugin" plugin and press "Activate".
27
+
28
+ = How I can deactivate the plugin =
29
+
30
+ 1. In the WordPress admin panel go to "Plugins", find "Facebook Button Plugin" plugin and press "Deactivate".
31
+
32
+ = After clicking on the the Facebook Button icon I got Facebook home page instead of necessary account page =
33
+
34
+ 1. In the WordPress admin panel go to "Settings", find "Facebook Button" plugin settings page and enter login of your Facebook account. Then press "Update Changes" button.
35
+ 2. If you do not have Facebook account yet you need to create it using this link: http://www.facebook.com . After that go through instructions from the 1st point.
36
+
37
+ = How to adjust Facebook Button icon position on the page =
38
+
39
+ 1. In the WordPress admin panel go to "Settings", find "Facebook Button" plugin settings page and choose one from listed positions: Before, After, Before and After or Shortcode. Then press "Update Changes" button.
40
+
41
+ = How to change Facebook Button icon picture =
42
+
43
+ 1. In the WordPress admin panel go to "Settings", find "Facebook Button" plugin settings page and choose one from listed positions: Standart FaceBook image or Custom FaceBook image. Then press "Update Changes" button.
44
+ 2. If you choose Custom FaceBook image, you can upload yor's oun picture. To uload you must press "Choose file" button and chose yor image in to you folder. Then press "Update Changes" button.
45
+
46
+ = After installation and setting adjustment in plugin settings it is still not working =
47
+
48
+ 1. You need to press "Update Changes" button to update all changes. Make sure that you got "Options Saved" message after saving action.
49
+ 2. After saving your settings you need to refresh your web page where Facebook Button icon should be located.
50
+
51
+ == Screenshots ==
52
+
53
+ 1. Plugin admin page.
54
+ 2. Plugin admin page: select display option.
55
+ 3. Plugin admin page: select FaceBook Button position.
56
+ 4. Displaying FaceBook Button in your post by shortcode.
57
+ 5. Displaying FaceBook Button ater your post.
58
+
59
+ == Changelog ==
60
+
61
+ = 2.01 =
62
+ *Usability at the settings page of plugin was improved.
63
+
64
+ = 1 =
65
+ *Ability to install Facebook Button icon wth link to the account page, including settings adjustment functionality via WordPress admin panel.
66
+
67
+ == Upgrade Notice ==
68
+
69
+ = 2.01 =
70
+ Usability at the settings page of plugin was improved.
71
+
72
+ = 1 =
73
+ Ability to install Facebook Button icon wth link to the account page, including settings adjustment functionality via WordPress admin panel.
screenshot-1.jpg ADDED
Binary file
screenshot-2.jpg ADDED
Binary file
screenshot-3.jpg ADDED
Binary file
screenshot-4.jpg ADDED
Binary file
screenshot-5.jpg ADDED
Binary file