You are here

function _easysocial_button_facebook_markup in Easy Social 7

Same name and namespace in other branches
  1. 6 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:

$data Actually not used:

Return value

the html markup

File

./easy_social.module, line 388
This is the file description for Easy Social module.

Code

function _easysocial_button_facebook_markup($url, $type, $data = NULL, $lang = 'en_US') {
  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>}&amp;locale={<span class="php-variable">$lang</span>}&amp;layout={<span class="php-variable">$type_box</span>}&amp;show_faces=false&amp;width=86&amp;action=like&amp;font=trebuchet+ms&amp;colorscheme=light&amp;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>}&amp;locale={<span class="php-variable">$lang</span>}&amp;layout={<span class="php-variable">$type_box</span>}&amp;show_faces=false&amp;width=450&amp;action=like&amp;font=trebuchet+ms&amp;colorscheme=light&amp;height=21"
      scrolling="no"
      frameborder="0"
      style="border:none; overflow:hidden; width:48px; height:60px;"
      allowTransparency="true"></iframe>
FB;
  }
  return $markup;
}