Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you have this problem you should list all your other plugins (if any). I’ve noticed a similar problem if qTranslate is used together with Magic Fields 2, but qTranslate alone doesn’t produces this for me.

    Conflicting plugins are really hard to debug, so please test if you experience this with only qTranslate enabled, and also try to pinpoint which plugin combinations are causing this.

    Great plugin, I gave it 4 stars, here’s the things which could help reach the 5th star:

    Add a Settings button to the Plugins page, so we can set things up right away after installing it (I guess that’s the reason people gave it a poor rating, they didn’t find the settings). Here’s the code, just add it to the bottom of your wp-facebook-like.php script:

    /**
     * Add a settings link to the Plugins page, so people can go straight from the plugin page to the
     * settings page.
     */
    function wpfblike_plugin_actions( $links, $file ){
    	// Static so we don't call plugin_basename on every plugin row.
    	static $this_plugin;
    	if ( ! $this_plugin ) $this_plugin = plugin_basename(__FILE__);
    	if ( $file == $this_plugin ){
    		$settings_link = '<a href="options-general.php?page=wpfblike-options">' . __('Settings') . '</a>';
    		array_unshift( $links, $settings_link ); // before other links
    	}
    	return $links;
    }
    add_filter( 'plugin_action_links', 'wpfblike_plugin_actions', 10, 2 );

    Add an automatic option to the language option list, preferably to the top, but you should make it default (admin-options.php). After that, you can set up an ‘automatic’ value for fblanguage, and all you need to do is get the real language code for your WordPress page. Put the following code on the top of your get_footer function on wp-facebook-like.php (don’t place it into __construct, the language value is not defined there yet!):

    // Automatic language
    if ($this->fblanguage == 'automatic') $this->fblanguage = strtr(get_bloginfo('language', false), '-', '_');

    It’s a one-liner, could be hard to understand, but here’s what it does: asks wordpress for the language value (get_bloginfo(‘language’)), it returns the language code, but separated with a dash, not and underline, so we replace that with strtr, then we set this value for fblanguage. That makes setting up the plugin easier, one less option to set. Plus, that’s the easiest way for multi-lingual blogs to display the like button in the current language.

    One small issue in the readme file: you have &lg and &gt codes under the templete developers section, replace them with proper opening and closing tags! Also you should encourage using a conditional check, before inserting functions into templetes:

    <?php
    if (function_exists('wpfblike')) {
      echo wpfblike();
    }
    ?>

    That won’t litter up the template if they remove your great plugin for whatever reason. I hope you include these settings in the next release. I’ll give you 5 stars then :).

    Also, you may want to change the default tagline to: “Share and Enjoy:” (without quotes) and make the change in sociable.php around line 757:

    $html .= __($tagline, 'sociable');

    HTML tags shouldn’t be used in the tagline itself, use the CSS class (.sociable_tagline) for styling. Should I post a bugreport?

Viewing 3 replies - 1 through 3 (of 3 total)