PDA

View Full Version : Adding XML feeds to Pausing RSS scroller



CaribbeanOS-X
09-26-2007, 04:54 AM
1) Script Title: Pausing RSS scroller

2) Script URL (on DD): RSS Pause Scroller (http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/index.htm)

3) Describe problem: First off, i have never created an RSS feed.
I have uploaded the script to my server... it works.

Now... my goal is to get it to display an XML feed from an icecast2 server...
it exports the playlist of what is currently playing on the Radio.

My questions are what do i call this XML file from the icecast2 server, what
file do i edit in the DD script,( the rsspausescroller.js). I believe it should
be as easy as renaming an id or instance!

Where is the info that this Scroller is displaying?
{new rsspausescroller("dynamicdrive", "pscroller2", "rssclass", 3000, "", "date+description")}
these seem to be the source but i want them to be my XML export.

Hope this is clear.

Regards,

CaribbeanOS-X

CaribbeanOS-X
09-26-2007, 05:24 AM
If i am not mistaken, I can edit the scrollerbridge.php file and add what xml files i want it to display.

// Define your list of RSS URLs- "RSS_id"=> "URL to RSS feed"
$rsslist=array(
"cnn" => "http://rss.cnn.com/rss/cnn_topstories.rss",
"bbc" => "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml",
"news.com" => "http://news.com.com/2547-1_3-0-5.xml",
"slashdot" => "http://rss.slashdot.org/Slashdot/slashdot",
"dynamicdrive" => "http://www.dynamicdrive.com/export.php?type=new",
);

If there is anything else i need to be aware of, please post it.

Appreciate the help.

Kindest Regards,

CaribbeanOS-X

ddadmin
09-26-2007, 08:12 AM
Yep, the adding of RSS feeds is done within scrollerbridge.php. This is explained on the DD script page. For example:


// Define your list of RSS URLs- "RSS_id"=> "URL to RSS feed"
$rsslist=array(
"cnn" => "http://rss.cnn.com/rss/cnn_topstories.rss",
"bbc" => "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml",
"news.com" => "http://news.com.com/2547-1_3-0-5.xml",
"slashdot" => "http://rss.slashdot.org/Slashdot/slashdot",
"dynamicdrive" => "http://www.dynamicdrive.com/export.php?type=new",
"myfeed" => "http://www.mysite.com/news.rss",
);

Then, to display the feed "myfeed", your initalization code on your page may look like:


new rsspausescroller("myfeed", "pscroller1", "rssclass", 3000, "_new", "description+date")

CaribbeanOS-X
09-26-2007, 02:16 PM
Appreciate the help...

Great, i will be trying this out today!

Thanks for the quick reply... great site!

Regards,

CaribbeanOS-X

CaribbeanOS-X
09-26-2007, 04:17 PM
Then, to display the feed "myfeed", your initalization code on your page may look like:


new rsspausescroller("myfeed", "pscroller1", "rssclass", 3000, "_new", "description+date")

DDadmin: I am getting closer, i have a test .rss file on my server. I can subscribe to it via FF.

When i add "test" (instead of "myfeed") in the demo.htm the scrolling box only says "Ajax Pagination script" and does not scroll any longer.

new rsspausescroller("test", "dynamicdrive", "pscroller2", "rssclass", 3000, "", "date+description")

And i added "test" into the bottom line of the scrollbridge.php


// Define your list of RSS URLs- "RSS_id"=> "URL to RSS feed"
$rsslist=array(
"bbc" => "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml",
"news.com" => "http://news.com.com/2547-1_3-0-5.xml",
"slashdot" => "http://rss.slashdot.org/Slashdot/slashdot",
"dynamicdrive" => "http://www.dynamicdrive.com/export.php?type=new",
"test" => "http://www.mysite.com/sub/scrollphp/test.rss",
);

Each time i add an instance to the demo.htm page, it just stops...
i think it is pulling info from "dynamicdrive" => "http://www.dynamicdrive.com/export.php?type=new",
This is one of the msg's it feeds out as it scrolls:
"This script lets you include content from multiple
pages and display them on demand, using Ajax. Pagination
links are automatically created, with each page downloaded
only when requested."

I can't get it to even feed the "bbc" or "cnn" (as in the example) but those, including mine work within my browser FF as a valid .rss.

<script type="text/javascript">
//new rsspausescroller(RSS_id, divId, divClass, delay, linktarget, optionalswitch)
new rsspausescroller("cnn", "pscroller1", "rssclass", 3000, "_new", "description+date")
</script>

Your next step?

Kindest regards,

CaribbeanOS-X

CaribbeanOS-X
09-26-2007, 07:15 PM
I will end this thread:
Simply put, throughly check the code and all the names and id's.

This is my answer to my problem:

new rsspausescroller("test", "pscroller2", "rssclass", 3000, "_new")

Works great now.

Love the script, good work.

rcw
01-07-2008, 10:15 PM
here is the feed I want:

http://www.lung.ca/rss_e.php

where do I make changes to scrollbridge.php and to my demo file to get this to feed?

TIA

rcw
01-07-2008, 10:21 PM
I just figured it all out....my editor was doing screwy things...notepad worked bettter. By the way . I now need to edit all the "look of the scroll box" ....is that in scrollbridge.php? instructions anywhere?

ddadmin
01-07-2008, 10:59 PM
By the way . I now need to edit all the "look of the scroll box" ....is that in scrollbridge.php? instructions anywhere?

By look, do you mean the colors, dimensions of the box? That's all done with CSS, which by default is this code inside your page:


<style type="text/css">

/*Example CSS for the two demo scrollers*/

#pscroller1{
width: 450px;
height: 1.2em;
border: 1px dashed black;
padding: 5px;
background-color: lightyellow;
}

#pscroller2{
width: 400px;
height: 150px;
border: 1px solid black;
padding: 5px;
background-color: #F0F0F0;
}

.rssclass .rsstitle{
font-weight: bold;
}

.rssclass .rssdate{
color: gray;
font-size: 85%;
}

.rssclass a{
text-decoration: none;
}

</style>

rcw
01-07-2008, 11:23 PM
yes that what I mean. but the scroller does not keep the title of the feed anywherer such as "CNN" just outside the scroller box? How can I get that?

TIA

ddadmin
01-08-2008, 11:55 AM
Hmmm you're going to have to elaborate what you mean by:


does not keep the title of the feed anywhere such as "CNN" just outside the scroller box?

rcw
01-08-2008, 12:40 PM
I just have a box with a feed scrolling through it. There is no title for it , just outside the box, to let people know where the feed is coming from for example "CNN News" or "NEJM Feed "