PDA

View Full Version : More RSS Display boxes on 1 page



Startzone
03-05-2007, 05:43 PM
1) Script Title: RSS Display Boxes

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

3) Describe problem: Hi, i'm new into RSS and i got the script up and running:

http://www.deanderekantvan.nl/rss/demo.htm,

But how do i get 2 the off the same boxes to work on 1 page? with a different feed?

Thanks!

Erik

ddadmin
03-05-2007, 11:13 PM
Did you check out demo.htm (http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/demo.htm) inside the included zip file? It demonstrates showing 3 RSS boxes on the same page. :)

Startzone
03-06-2007, 08:17 PM
I got the demo.htm up and running.

But when i put two the off the same boxes below each other on 1 page only the firstone startsup the 2e one doesn't do anything.

Can you put two or more RSS boxes? Or do i have to make different pages an d load them with an i-frame?

ddadmin
03-06-2007, 10:04 PM
I'm not sure I understand. As shown in the demo, you can have multiple RSS boxes on the same page (in the demo, there are 3). When including more than 1 RSS box, be sure that you use unique identifiers for each one on the page. For example:


<h3>Example 1 (CSS Drive):</h3>
<script type="text/javascript">
//MAIN FUNCTION: rssdisplaybox("rssfeed_id", "rssbox_id", "rssbox_class")
var cssdrivebox=new rssdisplaybox("cssdrive", "cssdriveid", "someclass")
cssdrivebox.set_items_shown(4) //Fetch and display first 4 entries
cssdrivebox.set_template("default") //Use "default" template, which outputs title + description + date
cssdrivebox.start() //Required: start script
</script>

<br /><br />


<h3>Example 2 (BBC News):</h3>
<script type="text/javascript">
//MAIN FUNCTION: rssdisplaybox("rssfeed_id", "rssbox_id", "rssbox_class")
var showbbc=new rssdisplaybox("bbc", "bbcid", "someclass")
showbbc.set_items_shown(10, 5) //Fetch 10 entries, but display only 5 at a time (pagination links auto created)
showbbc.setpagination("auto", "top") //Auto generate pagination interface, position it to the top of the RSS box
showbbc.set_template("titles") //Use "titles" template, which outputs title + category
showbbc.start() //Required: start script
</script>

The code in red highlights the differences between each instance of a RSS box on your page.

Startzone
03-06-2007, 10:22 PM
I will try to tell my problem

In this example you use 2 different RSS boxes, but i want to use the same type of RSS box.

So in this example i want:



<h3>Example 1 (CSS Drive):</h3>
<script type="text/javascript">
//MAIN FUNCTION: rssdisplaybox("rssfeed_id", "rssbox_id", "rssbox_class")
var showbbc=new rssdisplaybox("cssdrive", "bbcid", "someclass")
showbbc.set_items_shown(10, 5) //Fetch 10 entries, but display only 5 at a time (pagination links auto created)
showbbc.setpagination("auto", "top") //Auto generate pagination interface, position it to the top of the RSS box
showbbc.set_template("titles") //Use "titles" template, which outputs title + category
showbbc.start() //Required: start script
</script>

</script>

<br /><br />


<h3>Example 2 (BBC News):</h3>
<script type="text/javascript">
//MAIN FUNCTION: rssdisplaybox("rssfeed_id", "rssbox_id", "rssbox_class")
var showbbc=new rssdisplaybox("bbc", "bbcid", "someclass")
showbbc.set_items_shown(10, 5) //Fetch 10 entries, but display only 5 at a time (pagination links auto created)
showbbc.setpagination("auto", "top") //Auto generate pagination interface, position it to the top of the RSS box
showbbc.set_template("titles") //Use "titles" template, which outputs title + category
showbbc.start() //Required: start script
</script>


To show the CCSDRIVE CCS in the same type of RSSBOX as BBC.

ddadmin
03-06-2007, 10:52 PM
Well, even if you want two RSS boxes on the page that are identical in every way except the feed shown inside each box, you still need to use unique identifiers in the manner I had posted above. Everything else as far as style, # of feeds shown, pagination can be the same as far as one mimicking the other, but you must tell the script that these are two separate boxes, and you do that through unique identifiers.