Your IP : 216.73.216.240
<?php
/**
* @package mod_geekfacebookembed
* @version 1.2.0
*
* @copyright Copyright (C) 2015 - 2017 JoomlaGeek. All Rights Reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author JoomlaGeek <admin@joomlageek.com>
* @link http://www.joomlageek.com
*/
defined('JPATH_BASE') or die;
require_once dirname(__FILE__).'/helper.php';
if(!defined('MOD_GEEKFACEBOOKEMBED_ASSETS')) {
define('MOD_GEEKFACEBOOKEMBED_ASSETS', 1);
JHtml::_('jquery.framework', true);
$doc = JFactory::getDocument();
$doc->addStyleSheet(JUri::base(true).'/modules/mod_geekfacebookembed/assets/style.css');
$doc->addScriptDeclaration("
(function($){
$(document).ready(function(){
if(!$('#fb-root').length) {
$('body').append('<div id=\"fb-root\"></div>');
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = \"//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.2\";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
}
});
})(jQuery);
");
}
try {
$helper = new modGeekFacebookEmbedHelper($params);
$cacheid = md5($module->id);
$cacheparams = new stdClass;
$cacheparams->cachemode = 'id';
$cacheparams->class = $helper;
$cacheparams->method = 'getData';
$cacheparams->methodparams = $params;
$cacheparams->modeparams = $cacheid;
//$items = $helper->getData();
$items = JModuleHelper::moduleCache($module, $params, $cacheparams);
$width = (int) $params->get('width', 500);
if($width < 350) {
$width = 350;
} elseif ($width > 750) {
$width = 750;
}
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx', ''));
require JModuleHelper::getLayoutPath($module->module, $params->get('layout', 'default'));
} catch (Exception $e) {
echo $e->getMessage();
}