|
|||
|
Hallo,
ich m?chte mir grad ein Newssystem Einbauen, m?chte aber das die News nicht in einer Box sondern in jeweils einer eigenen Box erscheinen. Kann mir da vielleicht jemand schnell einen Tipp geben. Code:
<?php
$latest_news_query = tep_db_query('SELECT * from ' . TABLE_LATEST_NEWS . ' WHERE status = 1 ORDER BY date_added DESC LIMIT ' . MAX_DISPLAY_LATEST_NEWS);
if (!tep_db_num_rows($latest_news_query)) { // there is no news
echo '<!#' . TEXT_NO_LATEST_NEWS . ' -->';
} else {
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
'text' => TABLE_HEADING_LATEST_NEWS);
new contentBoxHeading($info_box_contents);
$info_box_contents = array();
$row = 0;
while ($latest_news = tep_db_fetch_array($latest_news_query)) {
$info_box_contents[$row] = array('align' => 'left',
'params' => 'class="smallText" valign="top"',
'text' => '<b>' . $latest_news['headline'] . '</b> - <i>' . tep_date_long($latest_news['date_added']) . '</i><br>' . nl2br($latest_news['content']) . '<br>');
$row++;
}
new contentBox($info_box_contents);
}
?>
W?re echt froh. Gruss Xony |
|
||||
|
du hast die erzeugung der box au?erhalb deiner while schleife, wenn die innerhalb der schleife ist, hast du f?r jede news ne box.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
![]() |
| Lesezeichen |
| Stichworte |
| anpassung, brauche, code, hilfe, kleine |
| Themen-Optionen | |
| Ansicht | |
|
|