Пример #1
0
        <div class="<?php echo $params->get('displayIcons');?>">
        <?php if($params->get("displayDelicious")) {
          echo ItpSocialButtonsHelper::getDeliciousButton($title, $link, $stylePath);
        }
        if($params->get("displayDigg")) {
            echo ItpSocialButtonsHelper::getDiggButton($title, $link, $stylePath);
        }
        if($params->get("displayFacebook")) {
            echo ItpSocialButtonsHelper::getFacebookButton($title, $link, $stylePath);
        }
        if($params->get("displayGoogle")) {
            echo ItpSocialButtonsHelper::getGoogleButton($title, $link, $stylePath);
        }
        if($params->get("displaySumbleUpon")) {
            echo ItpSocialButtonsHelper::getStumbleuponButton($title, $link, $stylePath);
        }
        if($params->get("displayTechnorati")) {
            echo ItpSocialButtonsHelper::getTechnoratiButton($title, $link, $stylePath);            
        }
        if($params->get("displayTwitter")) {
            echo ItpSocialButtonsHelper::getTwitterButton($title, $link, $stylePath);
        }
        if($params->get("displayLinkedIn")) {
            echo ItpSocialButtonsHelper::getLinkedInButton($title, $link, $stylePath);
        }
        ?>
        <?php echo ItpSocialButtonsHelper::getExtraButtons($title, $link, $params); ?>
        </div>
   </div>
</div>
Пример #2
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'));