Results 1 to 6 of 6

Thread: More RSS Display boxes on 1 page

  1. #1
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default More RSS Display boxes on 1 page

    1) Script Title: RSS Display Boxes

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ybox/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

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Did you check out demo.htm inside the included zip file? It demonstrates showing 3 RSS boxes on the same page.

  3. #3
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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?

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    <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.

  5. #5
    Join Date
    Mar 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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:

    Code:
    <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.

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •