public function getTagHtml() { if ($this->fields->exists('image') && $this->getParamValue('image') != "") { self::$needsJavascript = true; $url = $this->getParamValueEx('href', 'url', null, SCSocialUtilities::getStrippedUrl()); $layout = $this->getParamValue('layout'); $url = rawurlencode($url); $image = rawurlencode($this->getParamValue('image')); $desc = rawurlencode($this->getParamValue('desc')); $tagButtonText = '<a href="//pinterest.com/pin/create/button/?url=' . $url; if ($image) { $tagButtonText .= '&media=' . $image; } if ($desc) { $tagButtonText .= '&description=' . $desc; } $tagButtonText .= '"'; if ($layout) { $tagButtonText .= SCEasyTags::getShareButtonLayout('pinterest', $layout, '"'); } else { $tagButtonText .= $this->getField('data-pin-config', 'pin_count', null, 'none', 'data-pin-config'); } if (strpos($tagButtonText, 'above') !== false) { $pinItButton = 'pinit_fg_en_rect_gray_28.png'; $tagButtonText .= $this->getField('data-pin-height', '', null, '28', 'data-pin-height'); } else { $pinItButton = 'pin_it_button.png'; } $tagButtonText .= ' data-pin-do="buttonPin" ><img src="//assets.pinterest.com/images/pidgets/' . $pinItButton . '" alt="Share on Pinterest"/></a>'; } else { $tagButtonText = ''; } return $tagButtonText; }
protected function getTagHtml() { JFBCFactory::addStylesheet('jfbconnect.css'); $tag = '<script type="IN/Share"'; $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-url'); $tag .= $this->getField('showzero', 'show_zero', 'boolean', 'false', 'data-showzero'); if ($this->fields->exists('layout')) { $tag .= SCEasyTags::getShareButtonLayout('linkedin', $this->fields->get('layout'), '"'); } else { $tag .= $this->getField('counter', null, null, '', 'data-counter'); } $tag .= ' data-onsuccess="jfbc.social.linkedin.share"'; $tag .= '></script>'; return $tag; }
protected function getTagHtml() { $username = $this->getParamValueEx('username', null, null, ''); $tag = '<a href="https://twitter.com/' . $username . '" class="twitter-follow-button"'; //NOTE: vertical count is not yet supported in twitter follow if ($this->fields->exists('layout')) { $tag .= SCEasyTags::getShareButtonLayout('twitter', $this->fields->get('layout'), '"'); } else { $tag .= $this->getField('count', null, null, '', 'data-count'); } $tag .= $this->getField('lang', null, null, '', 'data-lang'); $tag .= $this->getField('width', null, null, '', 'data-width'); $tag .= $this->getField('align', null, null, '', 'data-align'); $tag .= $this->getField('show-screen-name', null, 'boolean', '', 'data-show-screen-name'); $tag .= $this->getField('size', null, null, '', 'data-size'); $tag .= $this->getField('dnt', null, 'boolean', 'false', 'data-dnt'); $tag .= '>Follow @' . $username . '</a>'; return $tag; }
protected function getTagHtml() { JFBCFactory::addStylesheet('jfbconnect.css'); $tag = '<div class="g-plusone"'; if ($this->fields->exists('layout')) { $tag .= SCEasyTags::getShareButtonLayout('google', $this->fields->get('layout'), '"'); } else { $tag .= $this->getField('size', null, null, '', 'data-size'); $tag .= $this->getField('annotation', null, null, '', 'data-annotation'); } $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href'); $tag .= $this->getField('width', null, null, '', 'data-width'); $tag .= $this->getField('align', null, null, '', 'data-align'); $tag .= $this->getField('expandTo', null, null, '', 'expandTo'); $tag .= $this->getField('recommendations', null, 'boolean', 'true', 'data-recommendations'); $tag .= ' data-callback="plusone_callback"'; $tag .= '></div>'; return $tag; }
protected function getTagHtml() { JFBCFactory::addStylesheet('jfbconnect.css'); $tagButtonText = '<a href="http://twitter.com/share" class="twitter-share-button" '; $tagButtonText .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-url'); if ($this->fields->exists('layout')) { $tagButtonText .= SCEasyTags::getShareButtonLayout('twitter', $this->fields->get('layout'), '"'); } else { $tagButtonText .= $this->getField('data-count', 'data_count', null, '', 'data-count'); } $tagButtonText .= $this->getField('via', null, null, '', 'data-via'); $tagButtonText .= $this->getField('text', null, null, '', 'data-text'); $tagButtonText .= $this->getField('related', null, null, '', 'data-related'); $tagButtonText .= $this->getField('lang', null, null, '', 'data-lang'); $tagButtonText .= $this->getField('counturl', null, null, '', 'data-counturl'); $tagButtonText .= $this->getField('hashtags', null, null, '', 'data-hashtags'); $tagButtonText .= $this->getField('size', null, null, '', 'data-size'); $tagButtonText .= $this->getField('dnt', null, 'boolean', 'false', 'data-dnt'); $tagButtonText .= '>Tweet</a>'; return $tagButtonText; }