File: /home/centralexf/www/modules/mod_janews2/tmpl/blog_item.php
<?php
/*
# ------------------------------------------------------------------------
# JA News2 module for Joomla 1.5
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license - PHP files are GNU/GPL V2. CSS / JS are Copyrighted Commercial,
# bound by Proprietary License of JoomlArt. For details on licensing,
# Please Read Terms of Use at http://www.joomlart.com/terms_of_use.html.
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com
# Redistribution, Modification or Re-licensing of this file in part of full,
# is bound by the License applied.
# ------------------------------------------------------------------------
*/
//get Itemid of category
/*
if ($catorsec) {
$catlink = JRoute::_(ContentHelperRoute::getCategoryRoute($rows[0]->catslug, $rows[0]->sectionid));
}else{
$catlink = JRoute::_(ContentHelperRoute::getSectionRoute($rows[0]->sectionid));
$cattitle = ($catorsec) ? $rows[0]->cattitle:$rows[0]->sectitle;
$catdesc = ($catorsec) ? $rows[0]->catdesc:$rows[0]->secdesc;
}*/
$rows = $cat->contents;
$cid = $cat->category->id;
$slug = $cat->category->slug;
$ctitle = $cat->category->title;
$cdesc = $cat->category->description;
$clink = JRoute::_(ContentHelperRoute::getCategoryRoute($slug, $sid));
$cls_sufix = trim($params->get('blog_theme',''));
if($cls_sufix) $cls_sufix = '-'.$cls_sufix;
?>
<div class="ja-box column ja-zintheme<?php echo $cls_sufix;?>">
<div class="inner clearfix">
<?php if ($showcattitle) : ?>
<div class="ja-zincat clearfix">
<h3>
<a href="<?php echo $clink;?>" title="<?php echo trim(strip_tags($cdesc));?>">
<span><?php echo $ctitle;?></span>
</a>
</h3>
</div>
<?php endif; ?>
<?php
$i = 0;
while($i < $s_introitems && $i<count($rows)) {
$row = $rows[$i];
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid));
$image = $helper->replaceImage ($row, $img_align, $autoresize, $maxchars, $s_showimage, $img_w, $img_h, $hiddenClasses);
//Show the latest news
?>
<div class="ja-zincontent clearfix">
<?php if ($s_showimage && $image) : ?>
<div class="ja-zinimg" style="width:<?php echo $img_w;?>px;height:<?php echo $img_h;?>px;">
<?php echo $image; ?>
</div>
<?php endif; ?>
<h4 class="ja-zintitle"><a href="<?php echo $link;?>" title="<?php echo strip_tags($row->title);?>"><?php echo $row->title;?></a></h4>
<?php if ($showcreater||$showdate) : ?>
<div class="ja-zinmeta clearfix">
<?php if ($showdate) : ?>
<span class="createdate"><?php echo JHTML::_('date', $row->created, JText::_('DATE_FORMAT_LC4'));?> <?php if ($showcreater) : ?> | <?php endif; ?> </span>
<?php endif; ?>
<?php if ($showcreater) : ?>
<span class="createby"><?php echo $row->creater;?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php
if($maxchars > strlen($row->introtext1)) {
echo $row->introtext;
} else {
echo $row->introtext1;
}
?>
<?php if ($showreadmore) : ?>
<a href="<?php echo $link; ?>" class="readon" title="<?php echo JText::sprintf('READ MORE...');?>"><span><?php echo JText::sprintf('READ MORE...');?></span></a>
<?php endif; ?>
</div>
<?php
$i++;
}
if (count ($rows) > $i) {
echo "<div class=\"ja-zinlinks\">\n";
echo "<strong>".JTEXT::_('MORE:')."</strong>\n";
echo "<ul>\n";
while (count ($rows) > $i) {
$row = $rows[$i];
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catslug, $row->sectionid.""));
?>
<li>
<a title="<?php echo trim(strip_tags($row->title), '"'); ?>" href="<?php echo $link; ?>">
<?php echo $row->title; ?></a>
</li>
<?php
$i++;
}
echo "</ul></div>\n";
}
?>
</div>
</div>