PDA

View Full Version : Pausing RSS scroller help please



Bashy
11-05-2007, 08:30 PM
Hello all

I would like a little help with this great script please?

I have it working and have had it working for some time..
I have just tried today to add a further box on the same page
although the adding the second box is not the issue, this issue
is the content of the RSS feed, its showing as html code,

Please see here and its the box at the bottom of the page....
http://www.bashys-place.com/weather/

Yours hopefully

Regards

bashy

ddadmin
11-06-2007, 04:07 AM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

What's the URL to the actual feed?

Bashy
11-06-2007, 07:04 AM
My apologies

Pausing RSS scroller
http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/index.htm

The feeds in question are:
http://www.netweather.tv/rss/extra/nwfc.rss
http://www.netweather.tv/rss/nwalert.rss

Sorry again

Regards

Bashy

ddadmin
11-06-2007, 09:55 PM
As I suspected, the contents in your RSS feeds have all been parsed by default for conversion to HTML entity where applicable (ie: "<" becomes "b&gt;") etc. Most RSS feeds do not do this.

Assuming your server is running PHP 4.3 or above, you can use the function html_entity_decode() (http://ca.php.net/manual/en/function.html-entity-decode.php) to easily reverse HTML entities. Inside scrollerbridge.php, try changing the below function at the very end with the changes in red:


function slashit($what){ //Encode text for storing in JavaScript array
$newstring=str_replace('&apos;', '\'', $what); //replace those half valid apostrophe entities with actual apostrophes
$newstring=html_entity_decode($newstring) //undo HTML entities
return rawurlencode($newstring);
}

Bashy
11-06-2007, 09:57 PM
Thank you, i will give this a go in the morning, much appreciated

regards

Bashy