Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem making new InfoBox


Micke

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...