Plugin Directory

Changeset 418966


Ignore:
Timestamp:
08/03/2011 09:07:28 PM (15 years ago)
Author:
sproject
Message:

1.4 release

Location:
facebook-likes-you/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • facebook-likes-you/trunk/facebook-likes-you.php

    r407700 r418966  
    44Plugin URI: http://www.sproject.name/download/wp-facebook-likes-you/
    55Description: Facebook Likes You! is simple plugin which makes it easy to add Facebook Like button and widgetable Like box. It's fully configurable, so you can decide where to append the button.
    6 Version: 1.3.3
     6Version: 1.4
    77Author: Piotr Sochalewski
    88Author URI: http://www.sproject.name/
     
    8080    add_option('fb_like_colorscheme', 'light');
    8181    add_option('fb_like_html5', 'false');
     82    add_option('fb_like_opengraph', 'true');
    8283    add_option('fb_like_xfbml', 'true');
    8384    add_option('fb_like_google1', 'false');
     
    99100    add_option('fb_like_css_style', '');
    100101
    101     $fb_like_settings['width'] = get_option('fb_like_width');
    102     $fb_like_settings['layout'] = get_option('fb_like_layout');
    103     $fb_like_settings['verb'] = get_option('fb_like_verb');
    104     $fb_like_settings['font'] = get_option('fb_like_font');
    105     $fb_like_settings['colorscheme'] = get_option('fb_like_colorscheme');
    106     $fb_like_settings['html5'] = get_option('fb_like_html5') === 'true';
     102    $fb_like_settings['width'] = get_option('fb_like_width');
     103    $fb_like_settings['layout'] = get_option('fb_like_layout');
     104    $fb_like_settings['verb'] = get_option('fb_like_verb');
     105    $fb_like_settings['font'] = get_option('fb_like_font');
     106    $fb_like_settings['colorscheme'] = get_option('fb_like_colorscheme');
     107    $fb_like_settings['html5'] = get_option('fb_like_html5') === 'true';
     108    $fb_like_settings['opengraph'] = get_option('fb_like_opengraph') === 'true';
    107109    $fb_like_settings['xfbml'] = get_option('fb_like_xfbml') === 'true';
    108110    $fb_like_settings['google1'] = get_option('fb_like_google1') === 'true';
    109111    $fb_like_settings['appid'] = get_option('fb_like_appid');
    110112    $fb_like_settings['send'] = get_option('fb_like_send') === 'true';
    111     $fb_like_settings['showattop'] = get_option('fb_like_show_at_top') === 'true';
    112     $fb_like_settings['showatbottom'] = get_option('fb_like_show_at_bottom') === 'true';
    113     $fb_like_settings['showonpage'] = get_option('fb_like_show_on_page') === 'true';
    114     $fb_like_settings['showonpost'] = get_option('fb_like_show_on_post') === 'true';
    115     $fb_like_settings['showonhome'] = get_option('fb_like_show_on_home') === 'true';
    116     $fb_like_settings['showonsearch'] = get_option('fb_like_show_on_search') === 'true';
    117     $fb_like_settings['showonarchive'] = get_option('fb_like_show_on_archive') === 'true';
    118     $fb_like_settings['margin_top'] = get_option('fb_like_margin_top');
    119     $fb_like_settings['margin_bottom'] = get_option('fb_like_margin_bottom');
    120     $fb_like_settings['margin_left'] = get_option('fb_like_margin_left');
    121     $fb_like_settings['margin_right'] = get_option('fb_like_margin_right');
     113    $fb_like_settings['showattop'] = get_option('fb_like_show_at_top') === 'true';
     114    $fb_like_settings['showatbottom'] = get_option('fb_like_show_at_bottom') === 'true';
     115    $fb_like_settings['showonpage'] = get_option('fb_like_show_on_page') === 'true';
     116    $fb_like_settings['showonpost'] = get_option('fb_like_show_on_post') === 'true';
     117    $fb_like_settings['showonhome'] = get_option('fb_like_show_on_home') === 'true';
     118    $fb_like_settings['showonsearch'] = get_option('fb_like_show_on_search') === 'true';
     119    $fb_like_settings['showonarchive'] = get_option('fb_like_show_on_archive') === 'true';
     120    $fb_like_settings['margin_top'] = get_option('fb_like_margin_top');
     121    $fb_like_settings['margin_bottom'] = get_option('fb_like_margin_bottom');
     122    $fb_like_settings['margin_left'] = get_option('fb_like_margin_left');
     123    $fb_like_settings['margin_right'] = get_option('fb_like_margin_right');
    122124    $fb_like_settings['excl_post'] = get_option('fb_like_excl_post');
    123125    $fb_like_settings['excl_cat'] = get_option('fb_like_excl_cat');
     
    132134    // Google +1 JavaScripted placed in 'wp_head'. That's OK.
    133135    add_action('wp_head', 'fb_like_google1_js');
     136   
     137    // Open Graph
     138    add_action('wp_head', 'fb_like_open_graph');
    134139   
    135140    /* Shortcode [fb-like-button] linked to generate_button() */
     
    191196
    192197END;
     198    }
     199}
     200
     201function fb_like_catch_image() {
     202    global $post, $posts;
     203    ob_start();
     204    ob_end_clean();
     205    $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
     206    $first_img = $matches[1][0];
     207       
     208    return $first_img;
     209}
     210
     211function fb_like_open_graph() {
     212    global $fb_like_settings;
     213   
     214    if($fb_like_settings['opengraph']=='true') {
     215        ?>
     216        <meta property="og:title" content="<?php wp_title('&laquo;', true, 'right'); ?><?php bloginfo('name'); ?>"/>
     217        <?php if (is_home())
     218        echo '<meta property="og:type" content="blog"/> <meta property="og:url" content="' . get_bloginfo("home") . '"/>';
     219        else echo '<meta property="og:type" content="article"/> <meta property="og:url" content="' . get_permalink() . '"/>'; ?>
     220        <?php if ( (!is_home()) && (fb_like_catch_image()!='') )
     221        echo '<meta property="og:image" content="' . fb_like_catch_image(). '"/>'; ?>
     222        <meta property="og:site_name" content="<?php bloginfo('name') ?>"/>
     223        <meta property="fb:app_id" content="<?php echo fb_like_return_appid() ?>"/>
     224        <?php
    193225    }
    194226}
     
    588620        </tr>
    589621        <tr valign="top">
     622            <th scope="row"><?php _e("Use Open Graph:", 'fb_like_trans_domain' ); ?></th>
     623            <td><input type="checkbox" name="fb_like_opengraph" value="true" <?php echo (get_option('fb_like_opengraph') == 'true' ? 'checked' : ''); ?>/> <small><?php _e("Mainly fixes an issue with wrong thumbnails. Turn off if you have another Open Graph plugin.", 'fb_like_trans_domain' ); ?></small></td>
     624        </tr>
     625        <tr valign="top">
    590626            <th scope="row"><?php _e("Your app ID:", 'fb_like_trans_domain' ); ?></th>
    591627            <td style="line-height: 100%;"><input size="21" type="text" name="fb_like_appid" value="<?php echo get_option('fb_like_appid'); ?>" /> <br /><small><?php _e("If you have no app ID, you can leave this empty to use default Facebook app ID <code>165570960176857</code>,<br />but remember that you can get your own an app ID by <a href='https://www.facebook.com/developers/createapp.php' target='_blank'>registering your application</a>.", 'fb_like_trans_domain' ); ?></small></td>
  • facebook-likes-you/trunk/languages/fb_like_trans_domain-pl_PL.po

    r403741 r418966  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Facebook Likes You! v1.2.1\n"
     3"Project-Id-Version: Facebook Likes You! v1.4\n"
    44"Report-Msgid-Bugs-To: \n"
    5 "POT-Creation-Date: 2010-05-10 11:45-0800\n"
    6 "PO-Revision-Date: 2011-07-02 17:18+0100\n"
     5"POT-Creation-Date: 2011-05-03 01:22-0800\n"
     6"PO-Revision-Date: 2011-08-03 22:57+0100\n"
    77"Last-Translator: Piotr Sochalewski <[email protected]>\n"
    88"Language-Team: Piotr Sochalewski <[email protected]>\n"
     
    5757
    5858#: facebook-likes-you.php
    59 msgid "Automatically increase the height accordingly"
    60 msgstr "Odpowiednio zwiększa wysokość"
    61 
    62 #: facebook-likes-you.php
    6359msgid "Show Send button:"
    6460msgstr "Przycisk 'Wyślij':"
     
    6965
    7066#: facebook-likes-you.php
     67msgid "Google +1 Button:"
     68msgstr "Przycisk Google +1:"
     69
     70#: facebook-likes-you.php
    7171msgid "Use <span title='XFBML version is more versatile, but requires use of the JavaScript SDK' style='border-bottom: 1px dotted #CCC; cursor: help; '>XFBML</span>:"
    7272msgstr "Użyj <span title='XFBML jest bardziej elastyczny, aczkolwiek wymaga użycia JavaScript SDK' style='border-bottom: 1px dotted #CCC; cursor: help; '>XFBML</span>:"
    7373
    7474#: facebook-likes-you.php
     75msgid "Use Open Graph:"
     76msgstr "Użyj Open Graph:"
     77
     78#: facebook-likes-you.php
     79msgid "Mainly fixes an issue with wrong thumbnails. Turn off if you have another Open Graph plugin."
     80msgstr "Włączony pozwala na wstawienie właściwej miniaturki obok 'lajkowanego' wpisu. Wyłącz jeśli używasz innej wtyczki do obsługi Open Graph."
     81
     82#: facebook-likes-you.php
    7583msgid "Your app ID:"
    7684msgstr "Twoje app ID:"
    7785
    7886#: facebook-likes-you.php
    79 msgid "If you have no app ID, you cen leave this empty to use default Facebook app ID <code>165570960176857</code>,<br />but remember that you can get your own an app ID by <a href='https://www.facebook.com/developers/createapp.php' target='_blank'>registering your application</a>."
     87msgid "If you have no app ID, you can leave this empty to use default Facebook app ID <code>165570960176857</code>,<br />but remember that you can get your own an app ID by <a href='https://www.facebook.com/developers/createapp.php' target='_blank'>registering your application</a>."
    8088msgstr "Jeśli nie posiadasz app ID możesz pozostawić to pole puste, aby użyć domyślnego ID <code>165570960176857</code>.<br />Własne app ID możesz uzyskać <a href='https://www.facebook.com/developers/createapp.php' target='_blank'>rejestrując aplikację</a>."
    8189
     
    169177
    170178#: facebook-likes-you.php
     179msgid "<strong>Free tip:</strong> You can get easily <a href='http://www.facebook.com/insights/' target='_blank'>insights for your website</a> supplied by Facebook."
     180msgstr "<strong>Rada:</strong> Statystyki dotyczące reakcji społeczności Facebooka na Twoje wpisy możesz znaleźć <a href='http://www.facebook.com/insights/' target='_blank'>tutaj</a>."
     181
     182#: facebook-likes-you.php
    171183msgid "Title:"
    172184msgstr "Tytuł:"
  • facebook-likes-you/trunk/languages/fb_like_trans_domain.pot

    r406651 r418966  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: Facebook Likes You! 1.3.2\n"
     3"Project-Id-Version: Facebook Likes You! 1.4\n"
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2011-05-03 01:22-0800\n"
     
    7171
    7272#: facebook-likes-you.php
     73msgid "Use Open Graph:"
     74msgstr ""
     75
     76#: facebook-likes-you.php
     77msgid "Mainly fixes an issue with wrong thumbnails. Turn off if you have another Open Graph plugin."
     78msgstr ""
     79
     80#: facebook-likes-you.php
    7381msgid "Your app ID:"
    7482msgstr ""
  • facebook-likes-you/trunk/readme.txt

    r407700 r418966  
    55Requires at least: 2.9
    66Tested up to: 3.2
    7 Stable tag: 1.3.3
     7Stable tag: 1.4
    88
    99Facebook Likes You! is simple plugin which makes it easy to add Like Button and widgetable Like Box. Google +1 Button isn't a problem too!
     
    3636Try to uncheck 'Use XFBML' checkbox or/and register your own app ID. If it doesn't appear only in Internet Explorer, remove from your theme root `<html>` element and put `<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml">`.
    3737
    38 = How to add Like button in another place than in settings? =
    39 You can use simple BBCode `[fb-like-button]` and place it by WordPress editor or - in another space (i.e. in your WordPress theme) - put `<?php echo do_shortcode('[fb-like-button]'); ?>`.
     38= How to add Like button in another place than available in settings? =
     39You can use simple BBCode `[fb-like-button]` and place it by WordPress editor or – in another space (i.e. in your WordPress theme) – put `<?php echo do_shortcode('[fb-like-button]'); ?>`.
     40
     41= Facebook Likes You! crashed my Open Graph! =
     42Simply uncheck 'Use Open Graph' in settings. Extremely recommended if you've got another Open Graph plugin or put these meta tags on your own.
    4043
    4144== Screenshots ==
     
    4548
    4649== Changelog ==
     50
     51= 1.4 =
     52* Open Graph support (great if you asked me about issue with wrong thumbnails)
    4753
    4854= 1.3.3 =
Note: See TracChangeset for help on using the changeset viewer.