Jump to content
xt:Commerce Community Forum

Brauche Kleine Hilfe Zur Code Anpassung


xOnY

Recommended Posts

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.

<?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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...