function _easysocial_button_facebook_markup in Easy Social 6
Same name and namespace in other branches
- 7 easy_social.module \_easysocial_button_facebook_markup()
Generate the needed markup for the facebook share link
Parameters
$url The url to be shared:
$type Generate horizontal or vertical widgets:
Return value
the html markup
File
- ./
easy_social.module, line 387 - This is the file description for Easy Social module.
Code
function _easysocial_button_facebook_markup($url, $type, $lang = 'en_US') {
// correct for different language identification strings
if ($lang === 'en') {
$lang = 'en_US';
}
elseif ($lang === 'en-gb') {
$lang = 'en_GB';
}
if ($type == 0) {
$type_box = 'button_count';
$markup = <<<FB
<iframe class="fb-widget"
src="http://www.facebook.com/plugins/like.php?href={<span class="php-variable">$url</span>}&locale={<span class="php-variable">$lang</span>}&layout={<span class="php-variable">$type_box</span>}&show_faces=false&width=86&action=like&font=trebuchet+ms&colorscheme=light&height=21"
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:87px; height:21px;"
allowTransparency="true"></iframe>
FB;
}
else {
$type_box = 'box_count';
$markup = <<<FB
<iframe class="fb-widget"
src="http://www.facebook.com/plugins/like.php?href={<span class="php-variable">$url</span>}&locale={<span class="php-variable">$lang</span>}&layout={<span class="php-variable">$type_box</span>}&show_faces=false&width=450&action=like&font=trebuchet+ms&colorscheme=light&height=21"
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:48px; height:60px;"
allowTransparency="true"></iframe>
FB;
}
return $markup;
}