OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Problem making new InfoBox
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Contribution Development
Micke
Hi All!

I'm trying to make an infobox to the news_blog system for osCommerce.
It all works very well ( blink.gif? ) 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 //-->


//Micke
Micke
This is the part that does not work..
CODE
    // 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..
CODE
$info_box_contents[] = array('text' =>
... is ti possible to make the looping though the months as a separate routine or something that works?
//Micke
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.