Support » Plugin: Simple Facebook Connect » [Plugin: Simple Facebook Connect] Questions / suggestions re new/dev version

  • I’ve got a few questions and suggestions re

    First the questions:

    1. Is there still a shortcode for the connect button? Because the old [fb-connect] shortcode, stops the output of a page’s content below the shortcode. Or is there another method to place the connect buttons on pages? As you can see, the output of the (Mingle) forum is stopped:

    2. Is there any CSS to remove the underline from the connect button’s text at hover? I believe I read about this somewhere before, but I forgot where.

    The suggestions:

    Re the FB registration form: isn’t better to use the old method? Like use the standard WP reg form and just add a FB reg/connect button to it. That way non-facebook users can still register as well. Or a setup option, which lets WP admins decide whether they prefer a FB button or a FB registration form.

    That’s it! 🙂

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    1. The [fb-connect] shortcode hasn’t been implemented in the new plugin yet. As such, I have no idea why it would “stop” anything, because it’s not yet a shortcode in the new plugin at all.

    2. I’d have to see the site in question. I don’t get an underline with default themes.

    3. The new FB register widget approach does indeed allow non-connected users to register. Try it without being logged into facebook at all, and without hitting the connect button. Just put in a username and email and such.

    Thanks for your reply!

    1. I tested it again and the FB button shortcode indeed isn’t the problem. I found out the forum gets disabled, the moment the SFC plugin is active. If SFC is de-activated, the forum works. This is the forum plugin I’m using:

    I’m using the [mingleforum] shortcode to let the forum WP page generate the forum.

    Do you have any thoughts on this? If not, I’ll post this issue on the forum plugin forum as well.

    Though the forum worked in combination with the old SFC plugin. Is it possible the new SFC disables/filters the [mingleforum] shortcode somehow? Just a wild guess.

    2. Ok, I noticed the theme’s CSS had a hover underline for #commentform. It’s now set to ‘text-decoration: none;’ and the underline is indeed gone.

    3. Oh ok, then everything is okay re the registration form. I didn’t realize the FB reg form also works with non-facebook users.

    So it’s basically only the forum problem that remains. The rest seems to work just fine, with the new version of SFC! 🙂

    Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    The forum is probably using shortcodes or something else incorrectly. SFC Like processes the content and the shortcodes in the header, in order to find images and other stuff for the meta. If the plugin that does the shortcode can’t be processed more than once per page, this will probably break it. The problem there would be in the mingle forum plugin using a shortcode to take non-repeatable actions.

    Ok, thanks for the clarification and all the help! I’ll post the issue on the Mingle forum shortly and see if I can perhaps fix it myself.

    The shortcode in Mingle Forum should execute everytime do_shortcode is called. However, because of themes like Thesis, and other plugins that actually print shortcode content into the header (lack of foresight I guess) I had to add a check in Mingle Forum to prevent the forum from showing up twice on the same page.

    The check tells if an instance is already running, if so then don’t run. I would imagine that when SFC is parsing the shortcode content, it triggers the first instance, preventing the forum from showing on the page itself.

    I’m not sure what the best solution is for this problem. I’d love to hear any thoughts you have Otto. Perhaps a simple (disable on X pages) option in SFC would work best.

    Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    SFC does put some content into the header, albeit heavily filtered and parsed and such. It runs the shortcode specifically so it can get the “final” version of the content for putting into meta tags for Facebook.

    Basically, you’re encountering the opposite problem here. This is a case where you *want* that shortcode to be parsed properly and put into the header. The alternative would be for it to put the [mingleforum] shortcode there, unprocessed, and thus have that shortcode show up on the resulting Facebook Page’s shares or posts. Not a great user experience.

    Note that if a post has an explicit excerpt, the latest version of SFC (0.999, still in beta) should use that instead (assuming I fixed that bug.. which is debatable 😉 ). So you might try recommending that for the Page where the forum is displayed for the user to give it an explicit excerpt which lacks the shortcode, perhaps one even describing the forum in detail.

    However, the shortcode will *still* get processed at least once, even in this case. One of the other things SFC is looking for in a post is images. These get put into the meta for Facebook to find and use on shares. For this case, the excerpt won’t do, since the excerpt probably won’t have images from the post. So it processes the shortcodes in the content in case they’re using some kind of gallery plugin or similar, then it looks specifically for html IMG tags in the resulting content. So basically you can’t assume that the first time the shortcode is being processed is when the shortcode is actually going to be displayed. A shortcode should return the result every time, and if a theme does it wrong, then that’s really on the theme author. Not a great solution, but the only one that works everywhere.

    To unhook this on a specific page template or similar, you can do remove_action('wp_head','sfc_base_meta'); as of SFC version 0.999, available here:

    Ok, I’ve added the following function to the theme’s functions.php file:

    // Makes sure Mingle forum shortcode works with SFC active
    	function remove_sfc_base_meta() {
    		if (is_page('FORUM_PAGE_ID')){
    			// Add Facebook meta for forum page
    			echo '<meta property="og:title" content="' . get_the_title() . '" />';
    			echo '<meta property="og:type" content="article" />';
    			echo '<meta property="og:url" content="' . get_permalink() . '" />';
    	add_action('wp_head', 'remove_sfc_base_meta', 1);

    Also, is it possible to add Login with Facebook button on a page (since the SFC shortcode has been removed)?

    Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    Edit: Never mind, I missed the is_page check.

    Phew, glad everything is okay then 🙂


    any workaround for this? I’m still unable to have both Mingle Forum and SFC on our site. I’ve tried the function above, and it didn’t help.


    This should work for now, open the wpf.class.php file in the forum plugin folder and remove these three lines:

    if($this->showing) //Check if forum already exists
    			return "";
    		$this->showing = true;

    Hi, thanks! It worked… three times! 🙂 Deleting these lines, I had 3 forums on the page…

    Here the fact is that we depend on Facebook for our site, and SFC is the only plugin I’ve tested that is being able to publish on FB with thumbnails. Without SFC or with other plugins, FB is not showing thumbnails.

    But this incompatibility between SFC and Mingle Forum is preventing us from using it.

    I have to removed the above 3 lines and now I have 3 forums on my page. How can I fix this?

    Same issue with Events-Manager plugin and the shortcode [event_form].
    Any idea why code is generated in the <head> section ?

    Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    @enseignement: Yes, the Events Manager plugin is doing it wrong. Shortcodes are supposed to *return* content, not echo it out.

    See this for more info:

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘[Plugin: Simple Facebook Connect] Questions / suggestions re new/dev version’ is closed to new replies.