Monday, January 20, 2014

Facebook Fan Box


<?php
$fb_page_url= Mage::getStoreConfig('setting/fbfanbox/fb_page_url');
$box_width=250;
$box_height=290;
$header=TRUE;
$stream=FALSE;
$box_content="";
$box_content .='<iframe src="http://www.facebook.com/plugins/likebox.php?href='. urlencode($fb_page_url);
if($box_width)
{
$box_content .= '&amp;width='. $box_width;
}
if($box_height)
{
$box_content .= '&amp;height='. $box_height;
}

$box_content .= '&amp;connections='. $connection;

if($header)
{
$box_content .= '&amp;header=true';
}

if($stream)
{
$box_content .= '&amp;stream=true';
}
$box_content .= '" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; ';

if($box_width)
{
$box_content .= ' width:'. $box_width . 'px; ';
}
if($box_height)
{
$box_content .= ' height:'. $box_height. 'px; ';
}
$box_content .= '"></iframe>';
?>
<div id='fbfanbox'>
<?php echo($box_content); ?>
</div>


No comments:

Post a Comment