How to remove image_fulltext in the latest + news?

Hi - please help me
I want the latest news module, when the image_intro image is not available, does not display image_fulltext.
In the absence of the image_intro image, only the default image will be displayed.

How do I modify this code?

$list = modLatestNewsHelperPlusDate::getList($params);
$n = 0;
foreach($list as $index => $item)
{
if($numofintrotext>0) {

if ($showthumb ) {

/* The code lines bellow are added to support intro and fulltext image in article parameter - schro added 13/11/2012 */
$images = json_decode($item->images);
/* First find image in intro text parameter - added 14/11/2012 */
if ( !empty($images->image_intro) ) {
$item->image = htmlspecialchars($images->image_intro);
$item->imgtitle = ($images->image_intro_caption) ? htmlspecialchars($images->image_intro_caption) : '';
$item->imgalt = htmlspecialchars($images->image_intro_alt);
} elseif ( empty($images->image_intro) && !empty($images->image_fulltext) ) {
/* If no image in introtext can be found, then find out image in full text parameter */
$item->image = htmlspecialchars($images->image_fulltext);
$item->imgtitle = ($images->image_fulltext_caption) ? htmlspecialchars($images->image_fulltext_caption) : '';
$item->imgalt = htmlspecialchars($images->image_fulltext_alt);
} elseif( empty($images->image_intro) && empty($images->image_fulltext) ) {
/* If still no image in fulltext parameter can be found, then find out image inserted inside text editor */
/* end added - schro */
$html = $item->introtext;
$html .= "alt='...' title='...' />";
$pattern = '/<img[^>]+src[\\s=\'"]';
$pattern .= '+([^"\'>\\s]+)/is';

if ( preg_match($pattern, $html, $match) ) {
$item->image = "$match[1]";
$item->imgtitle = '';
$item->imgalt = 'Thumbnail';
} else {
$item->image = "0";
$item->imgtitle = '';
$item->imgalt = 'Thumbnail';
}
}
} // end of thumbnail processing

if($introtext_limit){
$item->displayIntrotext = preg_replace("/{[^}]*}/","",$item->introtext);
//$item->introtext = modLatestNewsHelperPlusDate::lnd_limittext($item->introtext,$allowed_tags,$introtext_limit);
$item->displayIntrotext = modLatestNewsHelperPlusDate::_cleanIntrotext($item->introtext);
$item->displayIntrotext = $show_introtext ? modLatestNewsHelperPlusDate::truncate($item->displayIntrotext, $introtext_limit) : '';
} else {
$item->introtext = null;
}

$list[$index] = $item;
$numofintrotext--;
} else {
$item->introtext = null;
$item->image = '';
}
}
[img]http://dl.holsyan.com/images/aaa.jpg[/img]
7 years 2 months ago #1 by kolmedx

Please Log in or Create an account to join the conversation.

I want to delete the image_fulltext code in the mod_latestnewsplusdate.php file. How do I delete this code?
Please help me
7 years 2 months ago #2 by kolmedx

Please Log in or Create an account to join the conversation.

  • Posted by TemplatePlazza (5263) Offline
Hi, There are quite alot codes you need to change in the mod_latestnewsplusdate.php and helper.php file. But basically you just need to remove and change the part where the $images->image_fulltext is not empty.
7 years 2 months ago #3 by TemplatePlazza

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum