Results 1 to 2 of 2

Thread: Pausing RSS scroller - Show only fresh last news

  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pausing RSS scroller - Show only fresh last news

    1) Script Title:
    Pausing RSS scroller

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

    3) Describe problem:
    This is a request, not a problem and it does concern the RSS concept itself

    Talking about the RSS source: a news site or either a blog, it may be alive since ages and for this reason its articles are getting older. In other words (as example) it does not make sense to read such a news "Firefox 1.5 is available for download" while Firefox is now version 3.5.x...

    The request is about how to limit the feed items listing on an amount base or (more sophisticate) on the publishing date.
    I mean as examples that the RSS feed box should scroll/read/list only the last 10 news (10 should be a variable to set in the script) or scroll only news that have a publishing date not older than 6 months (having as reference date server TODAY date and again posts age should be a variable).

    Thank you for any suggestion, answer or thank you to DD if you implement this feature. This suggestion/request could apply to any RSS box "reader".

    Kind regards

    Ciao

    Robert

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The documentation for lastRSS has moved, it is now here:

    http://lastrss.oslab.net/index.php?q=doc

    and may be of some interest. Please note that there have probably been several updates to lastRSS since the version that comes with the DD script.

    Anyways, in the version that comes with the script, it has (near the beginning):

    Code:
    	// -------------------------------------------------------------------
    	// Public properties
    	// -------------------------------------------------------------------
    	var $default_cp = 'UTF-8';
    	var $CDATA = 'nochange';
    	var $cp = '';
    	var $items_limit = 0;
    	var $stripHTML = False;
    	var $date_format = '';
    You may set that to like 10 and it will only fetch 10. I believe these are already sorted by default in most cases on the remote RSS server by date, so these would probably be the most recent 10 items.

    There doesn't appear to be any simple way via the lastRSS to limit the date range though. If you feel you still need that, I think something can probably be worked out on the javascript side. It would require that the date info be fetched from the feed (I think that's the default), and, if you've changed the date format, I would need to know the format your dates are in.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •