Guest Posted February 25, 2005 Share Posted February 25, 2005 Can someone help I am trying to add RSS to my web site. I am running BTS I have the RSS contribution installed but I am having a problem coding the Box. If you look at my site at http://www.estore4you.com you will see in the left colum the news box and below it the actual box which I want the information inside. I cannot figure out what I am doing wrong to get the news inside the actual box. Any ideas this is the code for the rssnews.php box <?php /* $Id: information.php,v 1.6 2003/02/10 22:31:00 hpdl Exp $ modified by paulm_nl 2003/12/23 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ $boxHeading = BOX_HEADING_RSSNEWS; $corner_left = 'square'; $corner_right = 'square'; $box_base_name = 'News'; // for easy unique box template setup (added BTSv1.2) $box_id = $box_base_name . 'Box'; // for CSS styling paulm (editted BTSv1.2) define('MAX_CHARACTERS', '90'); define('MAX_ARTICLE', '5'); include(DIR_WS_FUNCTIONS . 'rss_reader.php'); $boxContent = array(); $boxContent[] = array('text' => BOX_HEADING_RSSNEWS); $text = array(); if (isset($rss_channel["ITEMS"])) { if (count($rss_channel["ITEMS"]) > 0) { $maxLength = MAX_CHARACTERS; $maxCount = (count($rss_channel["ITEMS"]) > MAX_ARTICLE) ? MAX_ARTICLE : count($rss_channel["ITEMS"]); $text_string = '<div class="smallText" style="color: #000000;">'; for($i = 0;$i < $maxCount; $i++) { $text_string .= tep_image(DIR_WS_IMAGES . "infobox/cat_arrow_right.gif", "", "5", "8") . ' <b>' . $rss_channel["ITEMS"][$i]["TITLE"] . '</b><br>'; $length = strlen(html_entity_decode($rss_channel["ITEMS"][$i]["DESCRIPTION"])); $snip = substr(html_entity_decode($rss_channel["ITEMS"][$i]["DESCRIPTION"]),0, ($length > $maxlength) ? $maxLength : $length); $text_string .= $snip; if ($length > $maxLength) { $text_string .= '...<br>'; //$text_string .= '<a target="_blank" href="' . $rss_channel["ITEMS"][$i]["LINK"] . '"><font color="#dd0000">[see article]</font></a><hr>'; $text_string .= '<a href="' . tep_href_link("rssnews.php", "", "NONSSL") . '"><font color="#dd0000">'. BOX_RSSNEWS_MORE .'</font></a>'; } else $text_string .= '<br>'; } $text_string .= '</div>'; if (count($rss_channel["ITEMS"]) > 5) $text_string .= '<br><div class="smallText" align="center"><a href="' . tep_href_link('rssnews.php', '', 'NONSSL') . '"><font color="#dd0000">'. BOX_RSSNEWS_ARTICLE .'</font></a></div>'; } } $boxContent = array(); $boxContent[] = array('text' => $text_string); new infoBox($boxContent); // bof BTSv1.2 if(file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php')) { // if exists, load unique box template for this box from templates/boxes/ require(DIR_WS_BOX_TEMPLATES . $box_base_name . '.tpl.php'); } else { // load default box template: templates/boxes/box.tpl.php require(DIR_WS_BOX_TEMPLATES . TEMPLATENAME_BOX); } // eof BTSv1.2 ?> This is driving me crazy, lol Thanks Tom T newbie at large :thumbsup: 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.