Facebook like button not entirely displayed

Morpheus's picture
Morpheus
Sat, 07/13/2013 - 02:50
#1
Facebook like button not entirely displayed

Hi

This is a topic for the theme maintainer witch is Neo if I'm not mistaken.

I just discovered a bug with Facebook like button displayed within nodes.

When Facebook like button is displayed with his counter (Layout style : count button in theme options) then the like button is not displayed entirely.

The facebook like button can be displayed in 3 different layouts witch are : standard, button count and box count.

To get the button correctly displayed all three cases, you'll need to be able to give them three different widths.

To get this done, edit node.meta_edit.inc and replace (from line 1 to 11) :

<div class="meta-share-wrap"><div class="meta_share clearfix">
<?php if ($facebook_display):
if ( $facebook_layout == 'box_count') {
$facebook_height = 70;
} else {
$facebook_height = 25;
}
?>
<div class="facebook">
<!--
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php print urlencode($nodeurl);?>&amp;send=false&amp;layout=<?php print $facebook_layout; ?>&amp;show_faces=false&amp;width=90&amp;action=like&amp;font=<?php print $facebook_display_font; ?>&amp;colorscheme=<?php print $facebook_display_color; ?>&amp;height=<?php print $facebook_height;?>" scrolling="no" frameborder="0" style="border: 0; overflow:hidden; height: <?php print $facebook_height;?>px; width:50px;" allowTransparency="true"></iframe>

with this code :

<div class="meta-share-wrap"><div class="meta_share clearfix">
<?php if ($facebook_display):
if ( $facebook_layout == 'box_count') {
$facebook_height = 70;
$facebook_width = 90;
} elseif ( $facebook_layout == 'button_count') {
$facebook_height = 25;
$facebook_width = 100;
} else {
$facebook_height = 25;
$facebook_width = 150;
}
?>
<div class="facebook">
<!--
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php print urlencode($nodeurl);?>&amp;send=false&amp;layout=<?php print $facebook_layout; ?>&amp;show_faces=false&amp;width=120&amp;action=like&amp;font=<?php print $facebook_display_font; ?>&amp;colorscheme=<?php print $facebook_display_color; ?>&amp;height=<?php print $facebook_height;?>" scrolling="no" frameborder="0" style="border: 0; overflow:hidden; height: <?php print $facebook_height;?>px; width: <?php print $facebook_width;?>px;" allowTransparency="true"></iframe>

This is not a big deal. I've just added a elseif condition and a width value for each layout.

Neo's picture
Neo
Tue, 07/16/2013 - 03:48

Thank Captain Morpheus, this is great!

eoin's picture
eoin
Tue, 07/16/2013 - 13:14

When I have a block view at the bottom of a basic page, the like/tweet buttons go to the top of the block instead of the page. Any idea how to make it appear at the top of the page and not the block?

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.