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() { $tag = '<div class="fb-share-button"'; $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href'); $tag .= $this->getField('width', null, null, '', 'data-width'); $tag .= $this->getField('layout', null, null, '', 'data-type'); $tag .= '></div>'; return $tag; }
protected function getTagHtml() { //Get the Comments Count string $tagString = '<div class="fb-comments-count"'; $tagString .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href'); $tagString .= '></div>'; SCStringUtilities::loadLanguage('com_jfbconnect'); $tag = JText::sprintf('COM_JFBCONNECT_COMMENTS_COUNT', $tagString); return $tag; }
protected function getTagHtml() { $tag = '<div class="fb-comments"'; $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href'); $tag .= $this->getField('width', null, null, '', 'data-width'); $tag .= $this->getField('num_posts', null, null, '', 'data-num-posts'); $tag .= $this->getField('colorscheme', null, null, '', 'data-colorscheme'); $tag .= $this->getField('mobile', null, 'boolean', 'false', 'data-mobile'); $tag .= $this->getField('order_by', null, null, '', 'data-order-by'); $tag .= '></div>'; return $tag; }
protected function getTagHtml() { $tag = '<div class="fb-send"'; $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href'); $tag .= $this->getField('colorscheme', null, null, '', 'data-colorscheme'); $tag .= $this->getField('ref', null, null, '', 'data-ref'); $tag .= $this->getField('width', null, null, '', 'data-width'); $tag .= $this->getField('height', null, null, '', 'data-height'); $tag .= $this->getField('kid_directed_site', null, 'boolean', 'false', 'data-kid-directed-site'); $tag .= '></div>'; return $tag; }
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() { JFBCFactory::addStylesheet('jfbconnect.css'); $tag = '<div class="fb-like"'; $tag .= $this->getField('href', 'url', null, SCSocialUtilities::getStrippedUrl(), 'data-href'); $tag .= $this->getField('show_faces', null, 'boolean', 'true', 'data-show-faces'); $tag .= $this->getField('share', 'show_send_button', 'boolean', 'true', 'data-share'); $tag .= $this->getField('layout', null, null, '', 'data-layout'); $tag .= $this->getField('width', null, null, '', 'data-width'); $tag .= $this->getField('action', null, null, '', 'data-action'); $tag .= $this->getField('colorscheme', null, null, '', 'data-colorscheme'); $tag .= $this->getField('ref', null, null, '', 'data-ref'); $tag .= $this->getField('kid_directed_site', null, 'boolean', 'false', 'data-kid-directed-site'); $tag .= '></div>'; 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; }
static function getExtraShareButtons($url, $dataCount, $showFacebookLikeButton, $showFacebookShareButton, $showTwitterButton, $showGooglePlusButton, $renderKeyString, $showLinkedInButton = false, $fbWidth = 50, $showPinterestButton = false, $pinnedImage = "", $pinnedText = "") { //Reset to FB value if from JLinked if ($dataCount == "top") { $dataCount = 'box_count'; } else { if ($dataCount == 'right') { $dataCount = 'button_count'; } else { if ($dataCount == 'none') { $dataCount = 'button'; } } } $extraButtonText = ''; if ($url == '') { $url = SCSocialUtilities::getStrippedUrl(); } if ($showLinkedInButton) { $extraButtonText .= '{JLinkedShare href=' . $url . " layout=" . $dataCount . $renderKeyString . '}'; } if ($showTwitterButton) { $extraButtonText .= '{SCTwitterShare href=' . $url . " layout=" . $dataCount . $renderKeyString . '}'; } if ($showGooglePlusButton) { $extraButtonText .= '{SCGooglePlusOne href=' . $url . " layout=" . $dataCount . $renderKeyString . '}'; } if ($showPinterestButton) { $extraButtonText .= '{SCPinterestShare href=' . $url . " layout=" . $dataCount . ' image=' . $pinnedImage . ' desc=' . $pinnedText . $renderKeyString . '}'; } if ($showFacebookLikeButton) { $shareString = $showFacebookShareButton ? "true" : "false"; $extraButtonText .= '{JFBCLike href=' . $url . " layout=" . $dataCount . ' share=' . $shareString . $renderKeyString . '}'; } return $extraButtonText; }
if (!JFile::exists($jfbcLibraryFile)) { echo "JFBConnect not found. Please reinstall."; return; } require_once $jfbcLibraryFile; require_once dirname(__FILE__) . '/helper.php'; $helper = new modJFBCSocialShareHelper($params); $fbClient = JFBConnectFacebookLibrary::getInstance(); $fbAppId = JFBCFactory::provider('facebook')->appId; $renderKey = $fbClient->getSocialTagRenderKey(); $renderKeyString = " key=" . $renderKey; //General $url = $params->get('url'); $href = ''; if (!$url) { $url = SCSocialUtilities::getStrippedUrl(); } if ($url) { $href = ' href=' . $url; } $layout = $params->get('layout_style'); $orientation = $params->get('orientation'); $position = $params->get('position'); $margin = $params->get('margin'); $padding = $params->get('padding'); $backgroundColor = $params->get('background_color'); $floatTop = trim($params->get('float_position_top')); $floatLeft = trim($params->get('float_position_left')); //Advanced $userIntro = $params->get('user_intro'); //Facebook
public static function getCurrentUrlTag() { $url = SCSocialUtilities::getStrippedUrl(); return $url; }