Base Directory:
/home/ecedu/public_html/cce/Views/layouts
0 && $type > 0) {
$news = $controller->getNewsById($type, $id);
$controller->increaseViewCount($type, $id);
}
// Initialize default values
$src = "";
$extra = "";
$news_tag = "";
$html_news = '';
$title = "";
$description = "";
$imagePath = "";
$author = "";
$dateStr = "";
$news_link = '';
$views = 0;
$comments = 0;
$isVideo = false;
// Extract news data if available
if (!empty($news)) {
$title = getLocalizedTitle($news, $lang);
$description = getFullHtmlDescription($news, $lang, $functions);
$imagePath = getImagePath($news, $type);
$author = getAuthor($news);
$dateStr = formatNewsDate($news);
$news_link = $news['news_link'] ?? '';
$isVideo = !empty($news_link);
}
// Set the label using switch
$label = $L['news']; // Default label
switch ($typeId) {
case 1:
$label = $L['news'];
break;
case 2:
$label = $L['conferences'];
break;
case 3:
$label = $L['activities'];
break;
case 4:
$label = $L['publications'];
break;
case 5:
$label = $L['research_articles'];
break;
case 6:
$label = $L['events_participations'];
break;
case 7:
$label = $L['education_list'];
break;
default:
$label = readMenu($menu, $typeId, $lang);
break;
}
// Get list of news by type
$list_news = ($type > 0) ? $controller->getNewsByType($type) : [];
?>
= $extra ?>
= $label; ?>
= playIcon($news,$lang,$type) ?>
=$L['list_comment']; ?>