echo "<div id=\"jahl-newsitem\">\n"; //$image = modJaNewsHelper::replaceImage ($firstnew, $align, 0, 0, 1 ); echo "<div class=\"ja-newscontent\">\n"; //echo $image. "\n"; echo "<a href=\"{$link}\" class=\"ja-newstitle\" title=\"" . trim(htmlentities($firstnew->title)) . "\">{$firstnew->title}</a>\n"; echo "{$firstnew->introtext}\n</div>\n"; echo "<a href=\"{$link}\" class=\"readon\">Read more</a>"; echo "</div>\n</div>\n</div></div></div>\n"; echo "<span class=\"article_seperator\"> </span>"; } } if ($cols > 0) { echo "<div class=\"ja-newscatwrap\">"; $modwidth = round(100 / $cols, 2); $l = 0; $modStyle = modJaNewsHelper::calModStyle($cols); $isrowopen = false; for ($k = 0; $k < count($catids); ++$k) { $query = "SELECT a.*, cc.title as cattitle, cc.description as catdesc," . "\n CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug," . "\n CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(':', cc.id, cc.alias) ELSE cc.id END as catslug" . "\n FROM #__content AS a" . "\n LEFT JOIN #__content_frontpage AS f ON f.content_id = a.id" . "\n INNER JOIN #__categories AS cc ON cc.id = a.catid" . "\n WHERE ( a.state = 1 AND a.sectionid > 0 " . "\n AND ( a.publish_up = '{$nullDate}' OR a.publish_up <= '{$now}' )" . "\n AND ( a.publish_down = '{$nullDate}' OR a.publish_down >= '{$now}' )" . ($access ? "\n AND a.access <= " . $user->get('aid', 0) . " AND cc.access <= " . $user->get('aid', 0) : '') . ($catids ? "\n AND ( a.catid = {$catids[$k]} )" : "") . (isset($headlineid) ? "\n AND a.id <> {$headlineid}" : "") . "\n AND cc.published = 1 )" . "\n ORDER BY a.created DESC limit " . ($linksitem + 1); $database->setQuery($query); $temp = $database->loadObjectList(); $rows = array(); if (count($temp)) { foreach ($temp as $row) { $rows[] = $row; } } unset($temp); if (count($rows)) { $bs = $mainObject->getBlogSectionCount(); $bc = $mainObject->getBlogCategoryCount();