Results 1 to 3 of 3

Thread: Question about RSS Ticker Script

  1. #1
    Join Date
    Oct 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Question about RSS Ticker Script

    Hi all,

    I'm using Dynamicdrive's RSS ticker script with Ajax invocation from http://www.dynamicdrive.com/dynamici...ajax/index.htm



    I have the script set up and it works well, but I'm woefully unfamiliar with javascript and ajax, and it's giving me quite the headache. If you look at the page I'm workin on http://www.newtonpolice.org/test/ I have the script running, but I want to add a link underneath the script, that basically takes the link from the news heading and copies it below the script where it says "read entire story". Ive tried messing with this for quite a few days now with no luck.



    Is anyone familiar enough with javascript or this script in particular to help with with this? Any help, even guesses would be appreciated at this point. Thanks in advance!

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

    Default

    You can in fact customize the arrangement of the various components of the RSS entry by going inside rssticker.js, and locating this portion of the script:

    Code:
    var linktitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">'+this.title[this.pointer]+'</a></div>'
    var description='<div class="rssdescription">'+this.description[this.pointer]+'</div>'
    var feeddate='<div class="rssdate">'+this.pubdate[this.pointer]+'</div>'
    if (this.logicswitch.indexOf("description")==-1) description=""
    if (this.logicswitch.indexOf("date")==-1) feeddate=""
    var tickercontent=linktitle+feeddate+description //STRING FOR FEED CONTENTS
    In your case, the changes would look something like:

    Code:
    var linktitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">'+this.title[this.pointer]+'</a></div>'
    var description='<div class="rssdescription">'+this.description[this.pointer]+'</div>'
    var readmoretitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">Read entire story</a></div>'
    var feeddate='<div class="rssdate">'+this.pubdate[this.pointer]+'</div>'
    if (this.logicswitch.indexOf("description")==-1) description=""
    if (this.logicswitch.indexOf("date")==-1) feeddate=""
    var tickercontent=linktitle+feeddate+description+readmoretitle //STRING FOR FEED CONTENTS
    Parts in red are new.

  3. #3
    Join Date
    Oct 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You are a genious! Thank you so much!

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
  •