Ersetz den Code durch das Snippet Modul "Anynews". Installiere Anynews, editiere die index.php des templates und entferne diesen Code hier:
<?php
// Specify the Group(id) you want to read the news from or 0 for all groups
$group = 0;
// Specify number of newsitems
$limit=10;
// Specify read more text
$readmore = "Read more";
// Specify news text
$news = "Latest News";
// Query for obtaining stuff from a group
$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE group_id = $group and active = 1 ORDER BY position DESC LIMIT 0, 10;";
// Query for all groups ;)
if ($group<1 ) {
$query = "SELECT * FROM ".TABLE_PREFIX."mod_news_posts WHERE active = 1 ORDER BY position DESC LIMIT 0, 10;";
}
// No changes needed here, maybe for output!
global $database;
$result = $database->query($query);
$total = $result->numRows(); // how many items are there?
if ($total>1) { // at least 2 needed for 2 news items
$data = $result->fetchRow() ; // get left item
$data2 = $result->fetchRow() ; // get right item
echo '<span style="font-size: 12px; color: #000; display: block; font-weight: bold; border-bottom: 1px solid;">'.$news.'<br /></span>';
echo '<p style="border-bottom: 1px solid #000; font-weight: bold; font-size: 10px; color: #000;">'.$data['title'].'</p><p style="font-size: 12px; text-align: justify; color: #000;">'.$data['content_short'].'<a href="'.WB_URL.PAGES_DIRECTORY.$data['link'].PAGE_EXTENSION.'">'.$readmore.'</a><br /></p>';
echo '<p style="border-bottom: 1px solid #000; font-weight: bold; font-size: 10px; color: #000;">'.$data2['title'].'</p><p style="font-size: 12px; text-align: justify; color: #000;">'.$data2['content_short'].'<a href="'.WB_URL.PAGES_DIRECTORY.$data2['link'].PAGE_EXTENSION.'">'.$readmore.'</a><br /></p>';
}
else {
echo '<span style="font-size: 12px; display: block; font-weight: bold; border-bottom: 1px solid;">No News yet ...</span>';
}
?>
Dafür setzt Du dann den Anynews Aufruf rein.
Gruß
Klaus