public function addScripts($galleryid, $params)
 {
     parent::addScripts($galleryid, $params);
     $this->addScript('/plugins/content/sigplus/engines/boxplus/popup/js/boxplus.facebook.js');
     // include XFBML scripts
     //$language = JFactory::getLanguage();
     //$languagecode = str_replace('-', '_', $language->getTag());
     //$document = JFactory::getDocument();
     //$document->addScript('http://connect.facebook.net/'.$languagecode.'/all.js#xfbml=1');
 }
 public function addScripts($galleryid, SIGPlusGalleryParameters $params)
 {
     parent::addScripts($galleryid, $params);
     $this->addScript('/plugins/content/sigplus/engines/boxplus/popup/js/boxplus.facebook.like.js');
     // set Facebook language
     $language = JFactory::getLanguage();
     $languagecode = str_replace('-', '_', $language->getTag());
     // save Facebook language code into a variable for future use
     $this->addOnReadyScript('window.boxplusFacebookLanguageCode = "' . $languagecode . '";');
 }
 public function addScripts($galleryid, SIGPlusGalleryParameters $params)
 {
     parent::addScripts($galleryid, $params);
     $this->addScript('/plugins/content/sigplus/engines/boxplus/popup/js/boxplus.facebook.feed.js');
     // set Facebook Application ID
     $facebookappid = '';
     // MANDATORY: add your (typically 15-digit) Facebook App ID in between the quotes
     // set Facebook language
     $language = JFactory::getLanguage();
     $languagecode = str_replace('-', '_', $language->getTag());
     // make sure Facebook Application ID is set
     if (!$facebookappid) {
         throw new SIGPlusNotSupportedException();
     }
     // load Facebook SDK scripts and initialize the SDK
     $script = '<script>' . PHP_EOL . 'window.fbAsyncInit = function() {' . PHP_EOL . 'FB.init({' . PHP_EOL . 'appId: "' . $facebookappid . '",' . PHP_EOL . 'xfbml: true,' . PHP_EOL . 'version: "v2.1"' . PHP_EOL . '});' . PHP_EOL . '};' . PHP_EOL . '(function(d, s, id) {' . PHP_EOL . 'var js, fjs = d.getElementsByTagName(s)[0];' . PHP_EOL . 'if (d.getElementById(id)) {return;}' . PHP_EOL . 'js = d.createElement(s); js.id = id;' . PHP_EOL . 'js.src = "//connect.facebook.net/' . $languagecode . '/sdk.js";' . PHP_EOL . 'fjs.parentNode.insertBefore(js, fjs);' . PHP_EOL . '}(document, "script", "facebook-jssdk"));' . PHP_EOL . '</script>';
     $this->addCustomTag($script);
 }