Results 1 to 9 of 9

Thread: Set descript length in Pausing RSS Scroller

  1. #1
    Join Date
    Jun 2005
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up Set descript length in Pausing RSS Scroller

    1) Script Title: Pausing RSS Scroller

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

    3) Describe problem: I would like to know how to set the description length

    Hi. I love this script and it works great. But there is a problem on the blogger side. I can either get the headings of my blog to display or the full description. Until they fix the bug on the blogger size, I thought if I could just set the text length of the message displayed in the RSS scroller, that would solve the problem. I'm sure I just need to add a mslength tag somewhere but I'm not sure where and I don't want to mess up the whole script.

    Can someone tell me how to do this?

    Thanks

  2. #2
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Are you trying to change the text size or the actual container width?
    If you're trying to change the container width, all you have to do is adjust the style on the according DIV tag:
    Code:
    style="width:100px;"
    - Mike

  3. #3
    Join Date
    Jun 2005
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    No, I'm not trying to change either one of those things. I want to truncate the actual amount of text that is being retrieved and displayed. The blogger end SHOULD be truncating it to a short description but it is not. I wanted to work around that problem by truncating the length of what is displayed. It seems like there should be a tag called msglength or something like that.

  4. #4
    Join Date
    Jun 2005
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I think what I need is the correct syntax to use in document.write to set the length of the descrip message.

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Try using this at the end of the variable/string:
    Code:
    .toString().substring(0,length);
    That will truncate from 0 to the length desired.
    - Mike

  6. #6
    Join Date
    Jun 2005
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Here is the string:
    var description='<div class="rssdescription">'+unescape(rsscontent.description)+'</div>'

    Would I make it:
    var description='<div class="rssdescription">'+unescape(rsscontent.description).substring(0,250)+'</div>'

  7. #7
    Join Date
    Jun 2005
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thanks. That worked for the substring length. Now I just have to figure out why it isn't parsing the html.

  8. #8
    Join Date
    Jun 2005
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I spoke too soon. I don't have the substring variable set exactly write. it is truncating but every now and then throws in a &#37;2. I fixed it so it is parsing the html correctly. That was a dumb mistake.

    But still need help setting the substring length if anyone has a second. Probably just a matter of where I have my periods and paranthesis.

    var description='<div class="rssdescription">'+unescape(rsscontent.description.substring(0,250))+'</div>'

  9. #9
    Join Date
    Jun 2005
    Posts
    22
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I've got it all figured out. Thanks. No more help needed.
    var description='<div class="rssdescription">'+unescape(rsscontent.description)+'</div>'
    var description=description.substring(0,250)+ '....Select title to read more'

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
  •