Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Advanced RSS Ticker (Ajax invocation)

  1. #1
    Join Date
    Mar 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Advanced RSS Ticker (Ajax invocation)

    1) Script Title:

    RSS Ticker

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...ajax/index.htm

    3) Describe problem:

    Trying to put on another site to read the rss feed but doesn't seem to be able to work.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Are you syndicating? That is do you have the Advanced RSS Ticker files on one domain and the page that uses them on another? If so you need the absolute path to bridge.php in rssticker.js:

    Code:
    //Absolute URL syntax. Uncomment below line if you wish to use an absolute reference:
    //var lastrssbridgeurl="http://"+window.location.hostname+"/lastrss/bridge.php"
    Only that's not how it should be done exactly. That window.location.hostname part will still only work if the page using the script is on the same domain as the script. Say the Advanced RSS Ticker files are on one.com and the page using them is on two.com, it should be like:

    Code:
    //Absolute URL syntax. Uncomment below line if you wish to use an absolute reference:
    var lastrssbridgeurl="http://www.one.com/lastrss/bridge.php"
    If that's the correct path. If there are other folders involved, include them in the path.

    If that's not the situation (syndication), and/or you're still having problems and want more help:

    Please include a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If I uncomment the absolute path, is still doesn't work for syndication and also stops working on my site.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It must still reflect an accurate path to the bridge.php file. If it stops working on your site, it obviously isn't doing that.

    But - Whoops, this is AJAX. I don't think there is any way to syndicate it because the page showing the ticker(s) must be able to make a same domain request to the bridge.php file. There's no way that can happen unless the page and bridge.php are both on the same domain.

    Best you can do on that score with this script is to use an iframe on the remote domain to show working page on the primary domain.

    An alternative that can be syndicated is:

    http://www.dynamicdrive.com/dynamici...ller/index.htm
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This version syndicates great. But the formatting for the bottom shown here http://fxanimation.com/rss/demo.htm is messy. The script that didn't syndicate has a nice format shown here http://fxanimation.com/rssticker/demo.htm Is there a way to get that formatting back?

    Thank you for all your help?

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The one you like is in quirks mode (no DOCTYPE) and the one you don't is in standards mode. This may account for some of the differences.

    The one you like is wider - that's set in the on page css (from the one you don't like):

    Code:
    #pscroller2{
    width: 400px;
    height: 200px;
    border: 1px solid black;
    padding: 5px;
    background-color: #F0F0F0;
    }
    Increase it.

    Also, the one you like employs table for formatting. I assume those are in the feed itself and are somehow being stripped out of the one you don't like. I'm not sure how that's happening, or if they're even being stripped, some other mechanism might account for the difference, but I'm 100% sure there are tables in the one you like and not in the one you don't.

    Also, the one you like (ticker) adapts its height to the content size of each item. The scroller needs to have its height set, and that height has to accommodate the tallest possible expected content for any given item, thus showing a gap at the bottom for shorter items.

    In order to do that, the ticker has no height set for it, only width. As a result, it would make the rest of the page below it (if there were any content there) jump around. It could be positioned absolute to avoid that, but then room would have to be allocated so that it wouldn't cover content below it when it gets tall. This would result in the same sort of gap described for the scroller.

    Even with no content below, it looks a little odd as it's changing its height with each different sized content.

    So, unless there's some way to get the scroller to behave differently in this regard than that and differently than it currently does, there will be trade offs there.

    And the one you don't like has trailing garbage, and lacks the FX logo. The former is something in the script and/or how lastRSS is being used. The latter is css again. In the one you like that FX logo is set as background for the container of each feed.

    In any case, I don't really like lastRSS for this. I have a version of the scroller with other improvements that uses simplepie. It has an allowtags option, we can try putting all the table elements (table, tbody, tr, th, td) into that variable so it can show the tables if in fact they're in the feed.

    Give me the feed url and I'll see what I can work out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Mar 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is the feed url http://fxanimation.com/clip/rss/recent

    Thank you,
    Bob

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Try this demo out:

    Attachment 4479

    For syndication you will have to configure the absolute path to scrollerbridge.php in the rsspausescroller.js file. I think that's the only place that needs it.

    Notice that the linktarget is now configured in the on page call to the scroller. I already set it to _blank. This affects both the title and description links. The tagsallowed and feeds are already setup as well. For your information though, they're in scrollerbridge.php in the simplepie folder. That file is much as it was in the lastRSS version of the scroller script.

    You might want some other tweaking as to style, etc. Let me know if you cannot handle it on your own.

    I cropped the logo to the size of the visible image so it would be easier to position.



    BTW - That feed, according to several of my browsers (Opera 11, Firefox 12, IE 9), is an invalid feed, and so won't show directly in any of them (showing Opera's error message, it's the most informative):

    XML parsing failed

    XML parsing failed: syntax error (Line: 4, Character: 0)

    Reparse document as HTML
    Error:
    XML declaration not at beginning of document
    Specification:
    http://www.w3.org/TR/REC-xml/
    1:
    2:
    3:
    4: <?xml version='1.0' encoding='UTF-8'?>
    5:
    6: <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
    7: <channel>
    Doesn't seem to bother any of the feed parsers used by these scripts though. Still you might want to look into correcting that.
    Last edited by jscheuer1; 06-12-2012 at 02:33 AM. Reason: improved css in the archive
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Mar 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Wow. That's works great! Thank you so much.

  10. #10
    Join Date
    Mar 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Can you recommend a good script for emailing rss feeds?

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
  •