Changeset 418966
- Timestamp:
- 08/03/2011 09:07:28 PM (15 years ago)
- Location:
- facebook-likes-you/trunk
- Files:
-
- 5 edited
-
facebook-likes-you.php (modified) (6 diffs)
-
languages/fb_like_trans_domain-pl_PL.mo (modified) (previous)
-
languages/fb_like_trans_domain-pl_PL.po (modified) (4 diffs)
-
languages/fb_like_trans_domain.pot (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
facebook-likes-you/trunk/facebook-likes-you.php
r407700 r418966 4 4 Plugin URI: http://www.sproject.name/download/wp-facebook-likes-you/ 5 5 Description: 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.36 Version: 1.4 7 7 Author: Piotr Sochalewski 8 8 Author URI: http://www.sproject.name/ … … 80 80 add_option('fb_like_colorscheme', 'light'); 81 81 add_option('fb_like_html5', 'false'); 82 add_option('fb_like_opengraph', 'true'); 82 83 add_option('fb_like_xfbml', 'true'); 83 84 add_option('fb_like_google1', 'false'); … … 99 100 add_option('fb_like_css_style', ''); 100 101 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'; 107 109 $fb_like_settings['xfbml'] = get_option('fb_like_xfbml') === 'true'; 108 110 $fb_like_settings['google1'] = get_option('fb_like_google1') === 'true'; 109 111 $fb_like_settings['appid'] = get_option('fb_like_appid'); 110 112 $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'); 122 124 $fb_like_settings['excl_post'] = get_option('fb_like_excl_post'); 123 125 $fb_like_settings['excl_cat'] = get_option('fb_like_excl_cat'); … … 132 134 // Google +1 JavaScripted placed in 'wp_head'. That's OK. 133 135 add_action('wp_head', 'fb_like_google1_js'); 136 137 // Open Graph 138 add_action('wp_head', 'fb_like_open_graph'); 134 139 135 140 /* Shortcode [fb-like-button] linked to generate_button() */ … … 191 196 192 197 END; 198 } 199 } 200 201 function 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 211 function 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('«', 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 193 225 } 194 226 } … … 588 620 </tr> 589 621 <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"> 590 626 <th scope="row"><?php _e("Your app ID:", 'fb_like_trans_domain' ); ?></th> 591 627 <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 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Facebook Likes You! v1. 2.1\n"3 "Project-Id-Version: Facebook Likes You! v1.4\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 201 0-05-10 11:45-0800\n"6 "PO-Revision-Date: 2011-0 7-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" 7 7 "Last-Translator: Piotr Sochalewski <[email protected]>\n" 8 8 "Language-Team: Piotr Sochalewski <[email protected]>\n" … … 57 57 58 58 #: facebook-likes-you.php 59 msgid "Automatically increase the height accordingly"60 msgstr "Odpowiednio zwiększa wysokość"61 62 #: facebook-likes-you.php63 59 msgid "Show Send button:" 64 60 msgstr "Przycisk 'Wyślij':" … … 69 65 70 66 #: facebook-likes-you.php 67 msgid "Google +1 Button:" 68 msgstr "Przycisk Google +1:" 69 70 #: facebook-likes-you.php 71 71 msgid "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>:" 72 72 msgstr "Użyj <span title='XFBML jest bardziej elastyczny, aczkolwiek wymaga użycia JavaScript SDK' style='border-bottom: 1px dotted #CCC; cursor: help; '>XFBML</span>:" 73 73 74 74 #: facebook-likes-you.php 75 msgid "Use Open Graph:" 76 msgstr "Użyj Open Graph:" 77 78 #: facebook-likes-you.php 79 msgid "Mainly fixes an issue with wrong thumbnails. Turn off if you have another Open Graph plugin." 80 msgstr "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 75 83 msgid "Your app ID:" 76 84 msgstr "Twoje app ID:" 77 85 78 86 #: facebook-likes-you.php 79 msgid "If you have no app ID, you c en 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>."87 msgid "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>." 80 88 msgstr "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>." 81 89 … … 169 177 170 178 #: facebook-likes-you.php 179 msgid "<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." 180 msgstr "<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 171 183 msgid "Title:" 172 184 msgstr "Tytuł:" -
facebook-likes-you/trunk/languages/fb_like_trans_domain.pot
r406651 r418966 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Facebook Likes You! 1. 3.2\n"3 "Project-Id-Version: Facebook Likes You! 1.4\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 5 "POT-Creation-Date: 2011-05-03 01:22-0800\n" … … 71 71 72 72 #: facebook-likes-you.php 73 msgid "Use Open Graph:" 74 msgstr "" 75 76 #: facebook-likes-you.php 77 msgid "Mainly fixes an issue with wrong thumbnails. Turn off if you have another Open Graph plugin." 78 msgstr "" 79 80 #: facebook-likes-you.php 73 81 msgid "Your app ID:" 74 82 msgstr "" -
facebook-likes-you/trunk/readme.txt
r407700 r418966 5 5 Requires at least: 2.9 6 6 Tested up to: 3.2 7 Stable tag: 1. 3.37 Stable tag: 1.4 8 8 9 9 Facebook 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! … … 36 36 Try 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">`. 37 37 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? = 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]'); ?>`. 40 41 = Facebook Likes You! crashed my Open Graph! = 42 Simply uncheck 'Use Open Graph' in settings. Extremely recommended if you've got another Open Graph plugin or put these meta tags on your own. 40 43 41 44 == Screenshots == … … 45 48 46 49 == Changelog == 50 51 = 1.4 = 52 * Open Graph support (great if you asked me about issue with wrong thumbnails) 47 53 48 54 = 1.3.3 =
Note: See TracChangeset
for help on using the changeset viewer.