Results 1 to 6 of 6

Thread: Advanced RSS Ticker (Ajax invocation)

  1. #1
    Join Date
    Apr 2006
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Advanced RSS Ticker (Ajax invocation)

    Hello,

    1) Script Title: Advanced RSS Ticker (Ajax invocation)

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

    3) Describe problem: it is possible to put a limit of a number of words they are displays in the script?

    bye

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

    Default

    Edit: Erroneous code. Removed. See below for correct changes.
    Last edited by ddadmin; 01-22-2008 at 04:18 AM.

  3. #3
    Join Date
    Apr 2006
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    re,

    i try this:

    Code:
    var tickercontent=linktitle.substring(0, 20)+description //STRING FOR FEED CONTENTS
    but nothing appears after that.. error of syntax? (i have remove feeddate for my utilisation)

    bye

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

    Default

    Ah yes, forget what I said above, the substring() function should be called on earlier, before the entire HTML is returned already. So something like:

    Code:
    var linktitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">'+this.title[this.pointer].substring(0, 20)+'</a></div>'
    var description='<div class="rssdescription">'+this.description[this.pointer].substring(0, 100)+'</div>'

  5. #5
    Join Date
    Apr 2006
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    thanks

    so, last question: how to put a limit of the number of articles published of the feed ?

    bye

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

    Default

    Limiting the number of feeds that get returned, among other things, is controlled by LastRSS. Inside bridge.php, try adding the below line in red:

    Code:
    $rss->date_format = 'M d, Y g:i:s A'; //date format of RSS item. See PHP date() function for possible input.
    $rss->items_limit = 5 ; //return 5 items only
    See here for more info: http://lastrss.oslab.net/

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
  •