PDA

View Full Version : Resolved RSS Display Boxes displays no content



major_tom
03-15-2009, 02:47 PM
1) Script Title: RSS Display Boxes

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/index.htm

3) Describe problem:

Hi there,

i like to display rss feeds on a static page with RSS Display Boxes, i set up the scripts as far as i know properly but there ist no content shown. the template generatet by the outputbody.php is there (outer div and inner div with specified classname and id)

when i call the main.php with an id an the url and setted up the debug code
error_reporting(E_ALL);

there comes a blank page:

http://www.service4me.at/software/includes/rssbox/main.php?id=major
without id comes:

Notice: Undefined index: id in /home/.sites/29/site325/web/software/includes/rssbox/main.php on line 20
Error: Can't find requested RSS in list.

Firebug konsole gives me an error :

[Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///C:/Programme/Mozilla%20Firefox/components/nsSessionStore.js :: sss_saveState :: line 1909" data: no]
[Break on this error] this._writeFile(this._sessionFile, oState.toSource());

cache chmod is set to 777, rest of files is set to 755, filepaths should be right (99,5%percent sure :-) )

i set up the demopage without changes here:
http://www.service4me.at/test2/rss/demo.htm,

as you can see, there is only the bbc feed shown, the rest not.

content of main.php:

<?php
error_reporting(E_ALL);
//Function for ouputting the body of each RSS item displayed (inside loop)- DynamicDrive.com

require('../simplepie/simplepie.inc'); //Specify path to simplepie.inc on your server (by default located inside "simplepie" directory)
$feed = new SimplePie();
$feed->cache_location('cache'); //Specify path to cache directory on your server relative to this file
$feed->handle_content_type();
require('outputbody.php'); //Path to custom "outputbody.php" file relative to this file

//Specify list of RSS URLs
$rsslist=array(
"mozilla" => "http://www.mozilla-europe.org/de/news.rdf",
"open_office" => "http://de.openoffice.org/news.xml",
"major" => "http://www.majors-welt.net/photoblog/rss/majors_photoblog.rss" //no trailing comma after last RSS URL!!
);

////Beginners don't need to configure past here. Edit outputbody.php to format the output of each RSS item's body ////////////////////

$rssid=$_GET['id'];
$rssurl=isset($rsslist[$rssid])? $rsslist[$rssid] : die("<b>Error:</b> Can't find requested RSS in list.");
$cachetime=isset($_GET["cachetime"])? (int)$_GET["cachetime"] : 30; //Get cachetime. Default to 30 if not specified
$feednumber=isset($_GET["limit"])? (int)$_GET["limit"] : ""; //Get number of items to fetch. If not specified (""), all is fetched.

$templatename=isset($_GET["template"])? $_GET["template"] : ""; //get name of template, which is used by if/else logic within function outputbody()
if ($templatename!="" && !preg_match("/^(\w|-)+$/i", $templatename)) //Template name can only contain alphanumeric characters, underscore or dash (-)
die ("<b>Error:</b> Template name can only consist of alphanumeric characters, underscore or dash");

$feed->cache_max_minutes($cachetime);
$feed->feed_url($rssurl);
$feed->init();
$max = $feed->get_item_quantity($feednumber);


function outputitems(){
global $feed, $feednumber, $templatename;
$max = $feed->get_item_quantity($feednumber);
for ($x = 0; $x < $max; $x++){
$item = $feed->get_item($x);
outputbody($item, $templatename); //call custom outputbody() function
}
}

?>

<?php
if ($feed->data){
outputitems();
}

?>


Heres where the script should run:

http://www.service4me.at/software/

the feed is in the div wich is served with the Animated Collapsible DIV at "mehr Information" next to the screenshot

im sure its just a..... small dot somewhere or something like this....

please help me

kind regards

tom

major_tom
03-17-2009, 07:24 PM
i spent the last two days for a solution... seems not to be any, so im looking for an other script.

greets

tom