Plugin Directory

Changeset 217764


Ignore:
Timestamp:
03/15/2010 04:25:25 PM (16 years ago)
Author:
hanok
Message:

Version 1.5

Location:
facebook-fan-box/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • facebook-fan-box/trunk/facebook-fan-box.php

    r204721 r217764  
    44Plugin URI: http://www.dolcebita.com/wordpress/facebook-fan-box-wordpress-plugin/
    55Description: Displays a Facebook Fan Box
    6 Version: 1.4.1
     6Version: 1.5
    77Author: Marcos Esperon
    88Author URI: http://www.dolcebita.com/
     
    2525*/
    2626
     27$ffb_options['widget_fields']['title'] = array('label'=>'Title:', 'type'=>'text', 'default'=>'', 'class'=>'widefat', 'size'=>'', 'help'=>'');
    2728$ffb_options['widget_fields']['api_key'] = array('label'=>'API Key:', 'type'=>'text', 'default'=>'', 'class'=>'widefat', 'size'=>'', 'help'=>'');
    2829$ffb_options['widget_fields']['profile_id'] = array('label'=>'Profile ID:', 'type'=>'text', 'default'=>'', 'class'=>'widefat', 'size'=>'', 'help'=>'');
     
    3435$ffb_options['widget_fields']['iframe'] = array('label'=>'iFrame:', 'type'=>'checkbox', 'default'=>false, 'class'=>'', 'size'=>'', 'help'=>'');
    3536$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...)');
    3638
    37 function facebook_fan_box($api_key, $profile_id, $stream = 1, $connections = 10, $width = 300, $css = '', $iframe = 0, $height = '', $logo = 0) {
     39function facebook_fan_box($api_key, $profile_id, $stream = 1, $connections = 10, $width = 300, $css = '', $iframe = 0, $height = '', $logo = 0, $lang = '') {
    3840    $output = '';
    3941  if ($profile_id != '') {
    4042    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>'
    4245               .'<script type="text/javascript">FB.init("'.$api_key.'", "");</script>'
    4346               .'<fb:fan profile_id="'.$profile_id.'" stream="'.$stream.'" connections="'.$connections.'" logobar="'.$logo.'" width="'.$width.'" css="'.$css.'?'.mktime().'"></fb:fan>';
     
    6063
    6164        global $ffb_options;
    62        
    63         // $args is an array of strings that help widgets to conform to
     65   
     66    // $args is an array of strings that help widgets to conform to
    6467        // the active theme: before_widget, before_title, after_widget,
    6568        // and after_title are the array keys. Default tags: li and h2.
     69   
    6670        extract($args);
    6771       
     
    7680        }   
    7781       
     82    $title = $item['title'];
    7883    $api_key = $item['api_key'];
    7984    $profile_id = $item['profile_id'];
     
    8590    $iframe = ($item['iframe']) ? 1 : 0;
    8691    $logo = ($item['logo']) ? 1 : 0;
     92    $lang = $item['lang'];
    8793   
    8894        // 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;
    9298               
    9399    }
  • facebook-fan-box/trunk/readme.txt

    r204721 r217764  
    44Requires at least: 2.0.0
    55Tested up to: 2.8
    6 Stable tag: 1.4
     6Stable tag: 1.5
    77
    88Display 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.
     
    1616If you want to change updates visibility, max. number of fans, width or css properties, just do this:
    1717
    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'); ?>`
    1919
    2020Where:
     
    3333
    3434- LOGO: Show/Hide Facebook logo bar.
     35
     36- LANG: Facebook Locale (en_US, es_ES...).
    3537
    3638== Installation ==
     
    5557
    5658== Changelog == 
     59
     60= 1.5 =
     61* Facebook locale option.
     62* Title enabled in the widget method.
    5763
    5864= 1.4.1 =
Note: See TracChangeset for help on using the changeset viewer.