Support » Plugin: Simple Facebook Connect » SFC – Like Button – why 450px wide and wrapped in P tag?

  • Resolved Mike Walsh

    (@mpwalsh8)


    I am successfully using the SFC collection of plugins and want to inc;ude the SFC – Like Button as part of my posts. Unlike the STC – Twitter Button, the SFC – Like Button is wrapped in a Paragraph tag – wouldn’t it make more sense to wrap it in a DIV tag? I am also wondering why it defaults to 450px wide and there doesn’t seem to be any way to change it. Is that on purpose?

    Thanks,

    Mike

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

    (@otto42)

    If you are manually adding it to the theme, you can change the width by specifying a width in the argument array. It defaults to 450 because FB defaults to 450. No other reason.

    And the P tag is there to make it easy for styling. If you’ll notice, it has a handy fb-like class for styling it to be inline instead of block, or not depending on what you want. It’s a P instead of a div because it’s going into the content. The trunk version of the plugin lacks any form of wrapper, since it’s not using the iframe anymore.

    Can you please explain how exactly to reduce this width?

    I did it like this:

    //  Facebook Like Button?
        if (function_exists('sfc_like_button'))
        {
            echo '<span class="mshsbc-social-media-facebook">' ;
            $lb = sfc_like_button(array('width' => '300', 'height' => '25')) ;
            echo $lb ;
            echo '</span>' ;
        }

    It looks like the plugin has been updated in the last day or two so this may no longer be necessary as I am not seeing the plethora of SFC plugins listed in my dashboard any more and this code no longer works.

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    That code will still work. Go to the SFC Settings page and turn on the like button.

    Ok, I see why I am not seeing the SFC plugins in my Dev area, I don’t have SFC configured. I just updated the production site and it works as expected.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘SFC – Like Button – why 450px wide and wrapped in P tag?’ is closed to new replies.