Changeset 217764
- Timestamp:
- 03/15/2010 04:25:25 PM (16 years ago)
- Location:
- facebook-fan-box/trunk
- Files:
-
- 2 edited
-
facebook-fan-box.php (modified) (6 diffs)
-
readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
facebook-fan-box/trunk/facebook-fan-box.php
r204721 r217764 4 4 Plugin URI: http://www.dolcebita.com/wordpress/facebook-fan-box-wordpress-plugin/ 5 5 Description: Displays a Facebook Fan Box 6 Version: 1. 4.16 Version: 1.5 7 7 Author: Marcos Esperon 8 8 Author URI: http://www.dolcebita.com/ … … 25 25 */ 26 26 27 $ffb_options['widget_fields']['title'] = array('label'=>'Title:', 'type'=>'text', 'default'=>'', 'class'=>'widefat', 'size'=>'', 'help'=>''); 27 28 $ffb_options['widget_fields']['api_key'] = array('label'=>'API Key:', 'type'=>'text', 'default'=>'', 'class'=>'widefat', 'size'=>'', 'help'=>''); 28 29 $ffb_options['widget_fields']['profile_id'] = array('label'=>'Profile ID:', 'type'=>'text', 'default'=>'', 'class'=>'widefat', 'size'=>'', 'help'=>''); … … 34 35 $ffb_options['widget_fields']['iframe'] = array('label'=>'iFrame:', 'type'=>'checkbox', 'default'=>false, 'class'=>'', 'size'=>'', 'help'=>''); 35 36 $ffb_options['widget_fields']['logo'] = array('label'=>'Logo:', 'type'=>'checkbox', 'default'=>false, 'class'=>'', 'size'=>'', 'help'=>''); 37 $ffb_options['widget_fields']['lang'] = array('label'=>'Language:', 'type'=>'text', 'default'=>'en_EN', 'class'=>'', 'size'=>'4', 'help'=>'(en_US, es_ES...)'); 36 38 37 function facebook_fan_box($api_key, $profile_id, $stream = 1, $connections = 10, $width = 300, $css = '', $iframe = 0, $height = '', $logo = 0 ) {39 function facebook_fan_box($api_key, $profile_id, $stream = 1, $connections = 10, $width = 300, $css = '', $iframe = 0, $height = '', $logo = 0, $lang = '') { 38 40 $output = ''; 39 41 if ($profile_id != '') { 40 42 if($iframe != 1) { 41 $output = '<script src="http://www.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>' 43 if($lang != '') $lang = '/'.$lang; 44 $output = '<script src="http://www.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php'.$lang.'" type="text/javascript"></script>' 42 45 .'<script type="text/javascript">FB.init("'.$api_key.'", "");</script>' 43 46 .'<fb:fan profile_id="'.$profile_id.'" stream="'.$stream.'" connections="'.$connections.'" logobar="'.$logo.'" width="'.$width.'" css="'.$css.'?'.mktime().'"></fb:fan>'; … … 60 63 61 64 global $ffb_options; 62 63 // $args is an array of strings that help widgets to conform to65 66 // $args is an array of strings that help widgets to conform to 64 67 // the active theme: before_widget, before_title, after_widget, 65 68 // and after_title are the array keys. Default tags: li and h2. 69 66 70 extract($args); 67 71 … … 76 80 } 77 81 82 $title = $item['title']; 78 83 $api_key = $item['api_key']; 79 84 $profile_id = $item['profile_id']; … … 85 90 $iframe = ($item['iframe']) ? 1 : 0; 86 91 $logo = ($item['logo']) ? 1 : 0; 92 $lang = $item['lang']; 87 93 88 94 // These lines generate our output. 89 echo $before_widget ;90 facebook_fan_box($api_key, $profile_id, $stream, $connections, $width, $css, $iframe, $height, $logo );91 echo $after_widget;95 echo $before_widget . $before_title . $title . $after_title; 96 facebook_fan_box($api_key, $profile_id, $stream, $connections, $width, $css, $iframe, $height, $logo, $lang); 97 echo $after_widget; 92 98 93 99 } -
facebook-fan-box/trunk/readme.txt
r204721 r217764 4 4 Requires at least: 2.0.0 5 5 Tested up to: 2.8 6 Stable tag: 1. 46 Stable tag: 1.5 7 7 8 8 Display a Facebook Fan Box on your blog. Put the Facebook Fan Box in your sidebar using the widget mode or call the function inside your template. … … 16 16 If you want to change updates visibility, max. number of fans, width or css properties, just do this: 17 17 18 `<?php facebook_fan_box('API_KEY', 'PROFILE_ID', 'STREAM', 'CONNECTIONS', 'WIDTH', 'CSS', 'IFRAME', 'HEIGHT', 'LOGO' ); ?>`18 `<?php facebook_fan_box('API_KEY', 'PROFILE_ID', 'STREAM', 'CONNECTIONS', 'WIDTH', 'CSS', 'IFRAME', 'HEIGHT', 'LOGO', 'LANG'); ?>` 19 19 20 20 Where: … … 33 33 34 34 - LOGO: Show/Hide Facebook logo bar. 35 36 - LANG: Facebook Locale (en_US, es_ES...). 35 37 36 38 == Installation == … … 55 57 56 58 == Changelog == 59 60 = 1.5 = 61 * Facebook locale option. 62 * Title enabled in the widget method. 57 63 58 64 = 1.4.1 =
Note: See TracChangeset
for help on using the changeset viewer.