#1 (permalink)  
Alt 04.10.2003, 20:38
 
Registriert seit: 07.09.2003
Beiträge: 4
Standard

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 04.10.2003, 21:36
Benutzerbild von mzanier
xt:Commerce GmbH, Geschäftsführung
 
Registriert seit: 18.04.2003
Beiträge: 27.414
Rotes Gesicht

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
###
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
anpassung, brauche, code, hilfe, kleine

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 04:01 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand