Forums

Simple Facebook Connect
[resolved] SFC - Like Button - why 450px wide and wrapped in P tag? (6 posts)

  1. mpwalsh8
    Member
    Posted 9 months ago #

    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

  2. Otto
    Tech Ninja
    Posted 9 months ago #

    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.

  3. neononcon
    Member
    Posted 9 months ago #

    Can you please explain how exactly to reduce this width?

  4. mpwalsh8
    Member
    Posted 9 months ago #

    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.

  5. Otto
    Tech Ninja
    Posted 9 months ago #

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

  6. mpwalsh8
    Member
    Posted 9 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic