";
$image_path = $params->get( 'image_path', 'images/stories' );
$document=& JFactory::getDocument();
if($document->getType() == 'html') {
global $mainframe;
$document->addCustomTag('');
}
if($show_introtext) {
if ($thumb_embed) {
/* Regex tool for finding image path on img tag - thx to Jerson Figueiredo */
preg_match_all("#
#", modLatestNewsHelperPlusDate::unhtmlentities(html_entity_decode(htmlentities($item->introtext))), $txtimg);
if (!empty($txtimg[0]))
{
foreach ($txtimg[0] as $txtimgel)
{
$item->introtext = str_replace($txtimgel,"",$item->introtext);
if ( strstr($txtimgel, $image_path) ) {
if (strstr($txtimgel, 'src="/')) {
preg_match_all("#src=\"\/" . addslashes($image_path) . "\/([\:\-\/\_A-Za-z0-9\.]+)\"#",$txtimgel,$txtimgelsr);
}
else {
preg_match_all("#src=\"" . addslashes($image_path) . "\/([\:\-\/\_A-Za-z0-9\.]+)\"#",$txtimgel,$txtimgelsr);
}
if (!empty($item->images)) {
$item->images = $txtimgelsr[1][0] . "\n" . $item->images;
}
else {
$item->images = $txtimgelsr[1][0];
}
}elseif (preg_match_all("#http#",$txtimgel,$txtimelsr,PREG_PATTERN_ORDER) > 0) {
preg_match_all("#src=\"([\-\/\_A-Za-z0-9\.\:]+)\"#",$txtimgel,$txtimgelsr);
if (!empty($item->images)) {
$item->images = $txtimgelsr[1][0] . "\n" . $item->images;
}
else {
$item->images = $txtimgelsr[1][0];
}
}
}
}
} // end of thumbnail processing
$item->introtext= preg_replace("/{[^}]*}/","",$item->introtext);
// stripped html by default
$item->introtext = strip_tags(modLatestNewsHelperPlusDate::unhtmlentities($item->introtext),$allowed_tags);
if($limit > 0) {
$item->introtext = modLatestNewsHelperPlusDate::lnd_limittext($item->introtext,$limit);
}
echo '';
if ($loadorder == 1)
{
echo modLatestNewsHelperPlusDate::lnd_showThumb($item->images,$item->image,$params,$item->itemid,$item->id);
}
echo '
'.$item->text.'';
echo '
';
if($show_date_in_introtext) {
if($show_date==1) {
switch($show_date_type) {
case 1:
echo "
";
echo date("d F Y", strtotime($item->created));
echo "
";
break;
case 2:
echo "
";
echo date("H:i", strtotime($item->created));
echo "
";
break;
default:
echo "
";
echo date("d F Y H:i", strtotime($item->created));
echo "
";
break;
}
}
}
if ($loadorder == 0)
{
modLatestNewsHelperPlusDate::lnd_showThumb($item->images,$item->image,$params,$item->itemid,$item->id);
}
echo html_entity_decode(htmlentities($item->introtext));
echo '
';
echo '';
}
echo '';
$show_date = $params->get( 'show_date', 0 );
$show_date_type = $params->get( 'show_date_type', 0 );
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
$item = $list[$n];
?>
-
if($show_date==1) {
switch($show_date_type) {
case 1:
echo date("d F Y", strtotime($item->created));
break;
case 2:
echo date("H:i", strtotime($item->created));
break;
default:
echo date("d F Y H:i", strtotime($item->created));
break;
}
}
?>
if($show_more_in) {
$database =& JFactory::getDBO();
if($catid) {
$catids = explode( ',', $catid );
JArrayHelper::toInteger( $catids );
$where = "AND ( id=" . implode( " OR id=", $catids ) . " )";
if($where) {
$query = "SELECT * FROM #__categories WHERE published=1 AND count>=1 AND (section>=1 OR section='com_content') AND access <= " . (int) $my->gid ." $where";
$database->setQuery($query);
}
$rows = $database->loadObjectList();
if(count($rows)) {
echo '';
echo "
More in: ";
foreach($rows as $row) {
$_Itemid = "";
if ($_Itemid == "") {
$database->setQuery( "SELECT sectionid, catid "
."FROM #__content WHERE id='$row->id'" );
$iid = null;
$database->loadObject( $iid );
if($show_more_type) {
$database->setQuery("SELECT id "
."FROM #__menu "
."WHERE type='content_blog_category' AND published='1' AND link='index.php?option=com_content&task=blogcategory&id=$row->id'");
$_Itemid = $database->loadResult();
} else {
$database->setQuery("SELECT id "
."FROM #__menu "
."WHERE type='content_category' AND published='1' AND link='index.php?option=com_content&task=category§ionid=$row->section&id=$row->id'");
$_Itemid = $database->loadResult();
}
$row->itemid = ($_Itemid)?"&Itemid=$_Itemid":"Itemid=0";
if($show_more_type) {
$link = JRoute::_('index.php?view=category&layout=blog&id='.$row->id.':'.$row->title.$row->itemid);
$more[] = '
'.$row->title.'';
} else {
$link = JRoute::_('index.php?view=category&id='.$row->id.':'.$row->title.$row->itemid);
$more[] = '
'.$row->title.'';
}
}
}
echo implode( ', ', $more );
echo '
';
}
} else {
if($secid) {
$secids = explode( ',', $secid );
JArrayHelper::toInteger( $secids );
$where = "AND ( section=" . implode( " OR section=", $secids ) . " )";
if($where) {
$query = "SELECT id, title, section FROM #__categories WHERE published=1 AND count>=1 AND section>=1 AND access <= " . (int) $my->gid ." $where";
$database->setQuery($query);
}
$rows = $database->loadObjectList();
if(count($rows)) {
echo '';
echo "
More in: ";
foreach($rows as $row) {
$_Itemid = "";
if ($_Itemid == "") {
$database->setQuery( "SELECT sectionid, catid "
."FROM #__content WHERE id='$row->id'" );
$iid = null;
$database->loadObject( $iid );
if($show_more_type) {
$database->setQuery("SELECT id "
."FROM #__menu "
."WHERE type='content_blog_category' AND published='1' AND link='index.php?option=com_content&task=blogcategory&id=$row->id'");
$_Itemid = $database->loadResult();
} else {
$database->setQuery("SELECT id "
."FROM #__menu "
."WHERE type='content_category' AND published='1' AND link='index.php?option=com_content&task=category§ionid=$row->section&id=$row->id'");
$_Itemid = $database->loadResult();
}
global $Itemid;
$row->itemid = ($_Itemid)?"&Itemid=$_Itemid":"Itemid=0";
if($show_more_type) {
$link = JRoute::_('index.php?view=category&layout=blog&id='.$row->id.':'.$row->title.$row->itemid);
$more[] = '
'.$row->title.'';
} else {
$link = JRoute::_('index.php?view=category&id='.$row->id.':'.$row->title.$row->itemid);
$more[] = '
'.$row->title.'';
}
}
}
echo implode( ', ', $more );
echo '
';
}
}
}
}
?>