I'm trying to make an infobox to the news_blog system for osCommerce.
It all works very well (
? ) exept for the stuff I have to comment out in the code below.Probably I have to pull out that code and put it in again somewhere else... argh!
Please some coder out there! Help me out!
CODE
<?php
/*
$Id: news_blog.php 1739 2007-12-20 00:52:16Z hpdl $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
$date_query = tep_db_query("select distinct month_date from " . TABLE_NEWS . " order by month_date asc limit " . NEWS_MONTH_ROWS);
?>
<!-- news_blog //-->
<tr>
<td><?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_NEWS_BLOG);
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();
$info_box_contents[] = array('text' =>
// while ($date = tep_db_fetch_array($date_query)) {
'<a href="' . tep_href_link(FILENAME_NEWS, 'date=' . $date['month_date']) . '">' . $date['month_date'] . '</a><br>' .
// }
'<a href="' . tep_href_link(FILENAME_NEWS, 'viewall=viewall' ) . '">' . VIEW_ALL . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_RSS) . '">' . tep_image(DIR_WS_IMAGES . 'rss.png', SUBSCRIBE) . '</a><br>');
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- news_blog_eof //-->
/*
$Id: news_blog.php 1739 2007-12-20 00:52:16Z hpdl $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
$date_query = tep_db_query("select distinct month_date from " . TABLE_NEWS . " order by month_date asc limit " . NEWS_MONTH_ROWS);
?>
<!-- news_blog //-->
<tr>
<td><?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_NEWS_BLOG);
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();
$info_box_contents[] = array('text' =>
// while ($date = tep_db_fetch_array($date_query)) {
'<a href="' . tep_href_link(FILENAME_NEWS, 'date=' . $date['month_date']) . '">' . $date['month_date'] . '</a><br>' .
// }
'<a href="' . tep_href_link(FILENAME_NEWS, 'viewall=viewall' ) . '">' . VIEW_ALL . '</a><br>' .
'<a href="' . tep_href_link(FILENAME_RSS) . '">' . tep_image(DIR_WS_IMAGES . 'rss.png', SUBSCRIBE) . '</a><br>');
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- news_blog_eof //-->
//Micke
