Results 1 to 6 of 6

Thread: Advanced RSS Ticker - Display Date next to Topic!

  1. #1
    Join Date
    Feb 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Advanced RSS Ticker - Display Date next to Topic!

    Hey,

    I just installed your RSS ticker and I love it! However, I would like to include the date of the past next to the topic name instead of under it. Is there any way to do this?

    I'd greatly appreciate your help!

    Philipp

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

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format for asking a question.

    You can basically format the ticker contents any way you want just by edditing the relevant code block inside rssticker.js. In this case, open up rssticker.js, and locate the line:

    Code:
    var feeddate='<div class="rssdate">'+this.pubdate[this.pointer]+'</div>'
    Change that to something like:

    Code:
    var feeddate=' <span class="rssdate">'+this.pubdate[this.pointer]+'</span>'
    That should do it.

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

    Default

    Hey,

    sorry about not including the link. The script is at:

    http://www.emotionp.com/


    I tried your code, however, the date is still being displayed under the topic instead of next to it.

    Do you have any other suggestions?

    Thank you

    Philipp

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

    Default

    Ah yes, the span tag needs to go inside the DIV tag above it if you don't want a line break between the description and title. So instead of the current:

    Code:
    var description='<div class="rssdescription">'+this.description[this.pointer]+'</div>'
    var feeddate=' <span class="rssdate">'+this.pubdate[this.pointer]+'</span>'
    Change it to something like:

    Code:
    var description=this.description[this.pointer]
    var feeddate=' <span class="rssdate">'+this.pubdate[this.pointer]+'</span>'
    Then locate the line:

    Code:
    var tickercontent=linktitle+feeddate+description //STRING FOR FEED CONTENTS
    and change that to:

    Code:
    var tickercontent=linktitle+'<div class="rssdescription">'+description+feeddate+'</div>'
    Basically all I"m doing is changing the output of the HTML so the <span> tag for the title does inside the <div> tag of the description, the way to prevent a line break between the two items.

  5. #5
    Join Date
    Feb 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey again,

    I followed your advise and changed it as you said, but still there is still that line break. :-(

    Could you take one more look at it for me?

    I really appreciate it!

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

    Default

    Hi:
    Ok, lets just try and directly modify the HTML for the RSS titles to include the date. So change "var linktitle=..." inside the script to:

    Code:
    var linktitle='<div class="rsstitle"><a href="'+this.link[this.pointer]+'">'+this.title[this.pointer]+'</a> <span style="font-weight: normal; color: gray">'+this.pubdate[this.pointer]+'</span></div>'
    For "var feeddate=..." that follows inside the script, set it to blank:

    Code:
    var feeddate=""
    That should do it. Please note that all I'm doing is playing around with the output HTML. If you know HTML well enough, you should be able to change things around to format the ticker exactly as you wish.

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
  •