RioBrewster
03-10-2015, 05:22 PM
1) Script Title: gfeedfetcher
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm
3) Describe problem: I have two feeds. One is updated monthly, the other is updated much more frequently, but pretty randomly.
What I want is to display and sort the most recent 6 items total - not the most recent 3 from each of the two feeds.
So I currently have 1 test message in the new monthly feed, (Sales Tax Allocations) and many messages in the original feed (Comptroller News).
If I set filterfeed to (6, date) I only get 4 messages. The test message from the new feed, then 3 messages from the original feed.
I will probably never want to display 3 messages from the new feed. The most would be 1 but it could possibly be zero.
I just want the 6 most recent messages regardless of which feed they are coming from.
Looking at the gfeedfetcher.js I can see where the code is figuring out how to distribute the messages among the feeds, but I can't figure out how to make it NOT do that. Can someone help?
The new feed goes live tomorrow. I can bump up the number under filterfeed as a hack for tomorrow, but of course that will break as soon as the second message comes through the Sales Tax Allocations feed.
Here's the page: http://www.window.state.tx.us/
but it doesn't have the second feed integrated yet.
Here's the code from the page on the dev server:
<script type="text/javascript">
var newsfeed=new gfeedfetcher("feed", "home-feed")
newsfeed.addFeed("Comptroller News", "https://public.govdelivery.com/topics/TXCOMPT_1007/feed.rss") //Specify "label" plus URL to RSS feed
newsfeed.addFeed("Sales Tax Allocations", "https://public.govdelivery.com/topics/TXCOMPT_1026/feed.rss")
newsfeed.displayoptions("datetime label")
newsfeed.setentrycontainer("li") //Display each entry as a paragraph
newsfeed.filterfeed(6, "date") //Show 6 entries, sort by date
newsfeed.init() //Always call this last
</script>
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm
3) Describe problem: I have two feeds. One is updated monthly, the other is updated much more frequently, but pretty randomly.
What I want is to display and sort the most recent 6 items total - not the most recent 3 from each of the two feeds.
So I currently have 1 test message in the new monthly feed, (Sales Tax Allocations) and many messages in the original feed (Comptroller News).
If I set filterfeed to (6, date) I only get 4 messages. The test message from the new feed, then 3 messages from the original feed.
I will probably never want to display 3 messages from the new feed. The most would be 1 but it could possibly be zero.
I just want the 6 most recent messages regardless of which feed they are coming from.
Looking at the gfeedfetcher.js I can see where the code is figuring out how to distribute the messages among the feeds, but I can't figure out how to make it NOT do that. Can someone help?
The new feed goes live tomorrow. I can bump up the number under filterfeed as a hack for tomorrow, but of course that will break as soon as the second message comes through the Sales Tax Allocations feed.
Here's the page: http://www.window.state.tx.us/
but it doesn't have the second feed integrated yet.
Here's the code from the page on the dev server:
<script type="text/javascript">
var newsfeed=new gfeedfetcher("feed", "home-feed")
newsfeed.addFeed("Comptroller News", "https://public.govdelivery.com/topics/TXCOMPT_1007/feed.rss") //Specify "label" plus URL to RSS feed
newsfeed.addFeed("Sales Tax Allocations", "https://public.govdelivery.com/topics/TXCOMPT_1026/feed.rss")
newsfeed.displayoptions("datetime label")
newsfeed.setentrycontainer("li") //Display each entry as a paragraph
newsfeed.filterfeed(6, "date") //Show 6 entries, sort by date
newsfeed.init() //Always call this last
</script>