Results 1 to 7 of 7

Thread: Article Images in SAG Content Scroller

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

    Default Article Images in SAG Content Scroller

    1) Script Title: SAG Content Scroller

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex2/sagscroller.htm

    3) Describe problem:

    First wanted to thank you for this fantastic script.
    I am using this script without being able to present images of the news, i want samething like the display news of yahoo rss used in the demo.
    Is there any way to adapt the script without having to change the rss of my site?

    My ticker:
    http://www.impresapublishing.pt/rss/.../index_om.html

    The rss for my site:
    http://aeiou.expresso.pt/manchetes_feed.rss

    The yahoo rss that works well with the script:
    http://rss.news.yahoo.com/rss/topstories

    Thanks in advance for your help

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

    Default

    Hmm as far as I'm know the only way to show images is to include the image(s) inside the DESCRIPTION element of each entry. That's the syntax required by Google Feeds API, which upon retrieving your RSS feeds returns that information in the structure described here. As you can see, only a predetermined set of elements are returned, such as author, entries[x], entries[x].content etc. It doesn't let you return the contents of a custom element within entries[x], in your case, entries[x].image. This means unfortunately you'll need to modify the structure of your RSS feed so the images are embedded inside the DESCRIPTION element.
    DD Admin

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

    Default

    Thanks for your help!
    i will try now to change the rss structure.

    keep on the good work.

  4. #4
    Join Date
    Oct 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi DD Admin,
    it´s working fine, the images are displaying and i´m working now to insert a select list of diferent rss, can you help me to translate the rss displayoptions: 'datetime label description', to Portuguese? sorry i´m new in js, please help.
    You can see here what i´m doing (if you have a better way, advise me):
    http://aplicacoes.expresso.pt/inquer...te_select.html

    Thanks in advance.

  5. #5
    Join Date
    Oct 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi DD,
    the images links are not openning in a new page like the news title tag:

    +(/description/.test(rssdata.displayoptions) ? entries[i].content : entries[i].contentSnippet)


    Can you help me to do it please?

    Thanks in advance.

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

    Default

    This is untested but should work. Inside the .js file, try finding the below line:

    Code:
    +(/description/.test(rssdata.displayoptions)? entries[i].content : entries[i].contentSnippet)
    and replace it with:

    Code:
    +(/description/.test(rssdata.displayoptions)? entries[i].content.replace(/href="([^"]+)/g, "href=\"$1\" target=\"_new") : entries[i].contentSnippet)
    DD Admin

  7. #7
    Join Date
    Oct 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your help, it´s working fine.

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
  •