Micke Posted March 17, 2008 Share Posted March 17, 2008 Hi All! I'm trying to make an infobox to the news_blog system for osCommerce. It all works very well ( :blink:? ) 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! <?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 //--> //Micke Quote Link to comment Share on other sites More sharing options...
Micke Posted March 18, 2008 Author Share Posted March 18, 2008 This is the part that does not work.. // while ($date = tep_db_fetch_array($date_query)) { '<a href="' . tep_href_link(FILENAME_NEWS, 'date=' . $date['month_date']) . '">' . $date['month_date'] . '</a><br>' . // } I had to comment out the while clause as it does not work as a part of the.. $info_box_contents[] = array('text' => ... is ti possible to make the looping though the months as a separate routine or something that works? //Micke Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.