We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    You might want to take a look at FeedX for flexible parsing needs..


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 1535
      • 84 Posts
      Thanks for the tip.

      FeedX does however seem to be more limited in other ways, such as not being able to show feed logo and description. At least not in a way I could figure out.
      Looks promising though.

      BTW, I managed to disable the feed title by commenting out these lines at line 158 in newsparserx.inc.php:

      $this->flag = true;
      $this->level = 1;
      $this->state = 1;
      break;


      As for getting the feed title into the doc title, I expect it to be possible and will try to figure it out.

      EDIT:
      I discovered a better way to disable the feed title.

      At around line 362, comment out the following:

      $outbuffer .= '<a class="rssChannelLink" href="' . $this->channel["link"] . '">' 
      . $this->channel["title"] . '</a>';


      Cheers,

      Andreas
        • 7923
        • 4,213 Posts
        Quote from: AndreasT at Jun 07, 2007, 04:23 PM

        Thanks for the tip.

        FeedX does however seem to be more limited in other ways, such as not being able to show feed logo and description. At least not in a way I could figure out.
        Looks promising though.
        It certainly can show logos and descriptions if they are in the xml feed. You can make the output be completely what you want by using templates in it. But great that you got this working the way you like too!


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 1535
          • 84 Posts
          OK, thanks, I will have a look at the templates. I could not find any parameters to pass to the snippet to enable these items. I just used the RSS template, but did not really look into the templates at all.

          Thanks again,

          Cheers.
            • 27330
            • 884 Posts
            pardon the n00b question, but is there a way to add target="_blank" to the feeds list?
              • 33002
              • 17 Posts
              Quote from: WeBe at May 04, 2007, 09:53 AM

              I can’t get the diacritical marks displayed in the right way. They show up as blocks and the rest of the word is not displayed. Apostrophs are displayed as questionmarks.

              When I look at the source code of the rss source page, utf-8 encoding is used. But when I look at the source code of my site the diacritics are not utf-8 encoded, but literally in the source.

              To demonstrate the problem, I give you the link to the rss source and how it is displayed on my site.

              Can someone help me to solve this problem?

              Hi,

              I’ve had the same problem. The feed I wanted to display was encoded in ISO-8859-1 and I needed UTF-8.

              Adding

              $output = iconv("ISO-8859-1","UTF-8",$output);


              to the snippet-code (just before the return call at the end of the snippet-code) solved it for me.

              Btw: it would be nice to have input and output encoding as optional parameters for the snippet call.
                ...whatever...
                • 19257
                • 141 Posts
                Quote from: Gaia at Oct 12, 2006, 12:26 PM

                Ok, It worked with the .xml URL, but i am trying to import RSS from an IPB forum.

                This is what i am using, yet it gives me a file not found error

                [[ForumNews? &url=`http://www.boredawards.com/community/index.php?act=rssout&id=1`]]
                


                ( The ForumNews snippet name is correct ).


                « MODx Parse Error »
                MODx encountered the following error while attempting to parse the requested resource:
                « PHP Parse Error »

                PHP error debug
                Error: file(http://www.boredawards.com/community/index.phpac) [function.file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
                Error type/ Nr.: Warning - 2
                File: /home/gaia/public_html/boredawards/assets/snippets/newsparserx/newsparserx.inc.php
                Line: 426
                Line 426 source: $data = @file($this->URL) or die ("Could not open a feed called: " . $this->URL);

                Parser timing
                MySQL: 0.0019 s s (3 Requests)
                PHP: 0.6681 s s
                Total: 0.6700 s s

                I’m trying to just post an .xml RSS news feed from bbc.co.uk and I’m getting the same exact error on my page.
                I followed susan ottwell’s instructions and OpenGeek’s instructions http://modxcms.com/forums/index.php/topic,2366.0.html, and whenever I call the newsparserx snippet this error comes out.
                Please help! huh
                  • 33002
                  • 17 Posts
                  Have you ever read what’s in this error message? Looks like the feed’s address gets messed up or you’ve entered the wrong address.

                  http://www.boredawards.com/community/index.phpac
                    ...whatever...
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Once again, you cannot use ?, & or = in a tag string. It should be:

                    [[ForumNews? &url=`http://www.boredawards.com/community/index.php|xq|act|xe|rssout|xa|id|xe|1`]]
                      • 22303 MODX Staff
                      • 10,725 Posts
                      You’re server does not allow inclusion of foreign content via URL, as the error describes. This is something you’ll need to take up with your hosting provider; or you might be able to try another news feed component like FeedX. It might use a different method to read the feed that does work on your server.