コード例 #1
0
<?php

// no direct access
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once dirname(__FILE__) . '/helper.php';
$list = modHGLatestPostsHelper::getList($params);
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
$parentGrid = filter_var($params->get('gridlist', 12), FILTER_SANITIZE_NUMBER_INT);
//$boxSize = round($parentGrid/$params->get('perrow',3), 0, PHP_ROUND_HALF_DOWN);
$boxSize = floor($parentGrid / $params->get('perrow', 3));
$style = $params->get('modstyle', 1);
switch ($style) {
    case 1:
        $layout = 'default';
        break;
    case 2:
        $layout = 'style2';
        break;
    case 3:
        $layout = 'style3';
        break;
    case 4:
        $layout = 'accordion';
        break;
}
require JModuleHelper::getLayoutPath('mod_hg_latestposts', $layout);
コード例 #2
0
ファイル: style3.php プロジェクト: quyip8818/joomla
    echo '<a href="' . JRoute::_('index.php?Itemid=' . $params->get('link')) . '" class="viewall">' . $params->get('link_label') . '</a>';
}
?>
	<ul class="posts">
	<?php 
foreach ($list as $item) {
    ?>
	<?php 
    $images = json_decode($item->images);
    ?>
		<li class="post">
			<?php 
    if ($images->image_intro) {
        ?>
			<a href="#" class="hoverBorder pull-left"><img src="<?php 
        echo JURI::base(true) . '/cache/' . modHGLatestPostsHelper::createThumb($images->image_intro, 54, 54, 3, true);
        ?>
" alt="<?php 
        echo $item->title;
        ?>
"></a>
			<?php 
    }
    ?>
			<h4 class="title"><a href="<?php 
    echo $item->link;
    ?>
"><?php 
    echo $item->title;
    ?>
</a></h4>