$bgcolor = $params->get('bgcolor', "#F9F9F9");
$textcolor = $params->get('textcolor', '#666666');
$title_text = $params->get('text', 'Highlighter');
$showbutton = $params->get("show_arrows", 1);
$interval = $params->get("interval", '5000');
$fxduration = $params->get('fxduration', '1000');
$effects = $params->get('effects', 'cover-inplace-fade');
$transition = $params->get("transition", "Sine.easeOut");
$date_format = $params->get('date_format', 'DATE_FORMAT_LC2');
$showtitle = $params->get('showtitle');
$linkable = $params->get('linkable', 1);
$slider_width = $width - $button_width;
$linkcolor = $params->get('linkcolor', "#047aac");
$linkhover = $params->get('linkhover', "#039ee1");
$arrows = $params->get('arrows', "style1.png");
$titleas = $params->get('titleas', 1);
$titlelimit = $params->get('titlelimit', 20);
$content_source = $params->get('content_source', 'joomla');
$css = "#sp-nh{$uniqid} {width:{$width}px;color:{$textcolor};background:{$bgcolor}}.sp-nh-item{background:{$bgcolor}}";
$css .= ".sp-nh-buttons {width:{$button_width}px}a.sp-nh-link {color:{$linkcolor}}a.sp-nh-link:hover {color:{$linkhover}}";
$css .= ".sp-nh-buttons,.sp-nh-item,.sp-nh-prev,.sp-nh-next {height:{$height}px;line-height:{$height}px}";
$css .= ".sp-nh-prev,.sp-nh-next{background-image: url(" . JURI::base(true) . "/modules/mod_sp_news_highlighter/assets/images/{$arrows})}";
$document = JFactory::getDocument();
$document->addStyledeclaration($css);
$document->addStyleSheet(JURI::base(true) . '/modules/mod_sp_news_highlighter/assets/css/style.css', 'text/css');
$document->addScript(JURI::base(true) . '/modules/mod_sp_news_highlighter/assets/js/sp_highlighter.js');
// Include the syndicate functions only once
$modhelper = $content_source == "joomla" ? 'helper.php' : 'k2helper.php';
require_once dirname(__FILE__) . '/' . $modhelper;
$list = modNewsHighlighterHelper::getList($params);
require JModuleHelper::getLayoutPath('mod_sp_news_highlighter');
Exemplo n.º 2
0
" class="sp-nh-next"></div>
		<?php 
}
?>
	</div>	
	<div id="sp-nh-items<?php 
echo $uniqid;
?>
" class="sp-nh-item">
		<?php 
foreach ($list as $item) {
    ?>
			<div class="sp-nh-item">
				<?php 
    if ($showtitle) {
        $title = '<span class="sp-nh-title">' . modNewsHighlighterHelper::getText($item->title, $titlelimit, $titleas) . '</span>';
    }
    if ($date_format != 'disabled') {
        $date = ' - <span class="sp-nh-date">' . JHTML::_('date', $item->date, JText::_($date_format)) . '</span>';
    }
    $text = $title . $date;
    $newstext = $linkable ? '<a class="sp-nh-link" href="' . $item->link . '">' . $text . '</a>' : $text;
    echo $newstext;
    ?>
	
			</div>
		<?php 
}
?>
	</div>
	<div style="clear:both"></div>