Пример #1
0
// no direct access
defined( "_JEXEC" ) or die( "Restricted access" );

require_once (dirname(__FILE__).DS.'helper.php');

$urlPath = JURI::base() . "modules/mod_itpsocialbuttons/";
$moduleClassSfx = htmlspecialchars($params->get('moduleclass_sfx'));
$doc = JFactory::getDocument();
/** $doc JDocumentHTML **/

// Loading style.css
if($params->get("loadCss")) {
    $doc->addStyleSheet($urlPath . "style.css");
}

$link  	 	= JURI::getInstance()->toString();
$title  	= $doc->getTitle();

$title      = rawurlencode($title);
$link       = rawurlencode($link);

// Short URL service
if($params->get("shortUrlService")) {
    $link = ItpSocialButtonsHelper::getShortUrl($link, $params);
}

$stylePath = $urlPath . "images/" . $params->get("style");

require JModuleHelper::getLayoutPath('mod_itpsocialbuttons', $params->get('layout', 'default'));