We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29387
    • 40 Posts
    Rossco, I just stumbled upon your earlier series of posts on this topic (from January). It looks like the writer there had the right idea:

    Quote from: ganeshXL at Jan 23, 2008, 04:13 PM

    @rossco:
    The thing with such an XML file as this is: It’s not written in one of the official RSS formats. It doesn’t follow the 0.9, 0.9.1, 1.0, 2.0 or Atom specs, it doesn’t even provide its own schema on top. Regular feed-readers don’t know how to interpret this set of data. You’ll have to "tell" the app what to do with each node, sub-node, attribute etc.

    Hence, no matter if you write your own parser for this XML in PHP from scratch, or if you use a script such as feedX or SimplePie: You’ll end up with much more work than with a regular RSS-feed.

    You might also run into troubles because that XML contains some characters that are supposed to be surrounded by CDATA tags, e.g. ~ERR~Legend.


    As that person said, you’ll just need to tell the app what to do with each node, sub-node, etc. -- probably best done by stripping down your code to only a few elements and then adding others, one at a time.

    The debug console shows you the feed data and how to access each item, so you can just take it from there.

    Good luck!
      • 21978
      • 59 Posts
      Hello,

      Has anybody tried to get FeedX work with FeedMySearch?

      http://feedmysearch.com/
      http://feedmysearch.com/?q=wedding+photographer&where=web

      I have tried and gave up. Could any experienced user/coder take a look at that?

      Thanx
      Greg
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        [!FeedX? &url=`http://feedmysearch.com/|xq|q|xe|wedding+photographer|xa|where|xe|web` &preset=`rss` &caheTime=`3600`!] 

        Works fine for me. Notice that the ?, = and & in the URL have to be replaced with the appropriate placeholders (not to be confused with MODx placeholder tags!)
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 21978
          • 59 Posts
          Hi,

          Thanks. It must have been too late yesterday smiley

          Thx
          Greg
            • 21978
            • 59 Posts
            RSS channel contains <description> tag. What should I do to modify the content of this tag before displaying it? Let’s say I have the following content in the RSS channel:
            <description><![CDATA[<em>wszystkie posty na blogu: http://<b>fotografia</b>-<b>slubna</b>-<b>poznan</b>.blogspot.com - nasza   strona internetowa<b>...</b></em>
            <p>Url : <a href='http://fotografia-slubna-poznan.blogspot.com/'>http://fotografia-slubna-poznan.blogspot.com/</a> <small><em>
            <a href='http://www.google.com/search?q=cache:UgHNcBGkvJkJ:fotografia-slubna-poznan.blogspot.com'>Cache</a></em></small>
            </p><p><em>(Ranked #10)</em></p>]]></description>


            ... and I would like to remove the whole content between "<p>Url :" and ")</em></p>"

            How to do that?

            Thx
            Greg
              • 21978
              • 59 Posts
              Hi there,

              Do You have any suggestions concerning the question I’ve asked above?

              Thx
              Greg
                • 10913
                • 66 Posts
                Hi!

                Had some problems with my feed, so I made some changes to the code. This change creates htmlentities from all else, but html-tags. I had to do this because in my feed scandinavian letters were dropped from the output.

                So here it is.
                feedx.class.inc.php
                function execute ()
                line number 103 (about)
                // Get the htmlspecialchars_decode to work in PHP4
                if ( !function_exists('htmlspecialchars_decode') ) {
                    function htmlspecialchars_decode($text) {
                        return strtr($text, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
                    }
                }
                
                /*
                    This could be done sweeter, but thats the way, aha aha, i like it aha aha!
                                
                    Modifies the feed to show htmlentities from everything else but html-tags.
                */
                
                $output = htmlspecialchars_decode(htmlentities($output));
                
                if (function_exists('mb_convert_encoding'))  // Convert output encoding, if available
                    return mb_convert_encoding($output, $modx->config['modx_charset'], 'auto');
                else
                    return $output;
                


                Hopefully someone else needs this also.

                  The sun always shines for tough guys.
                  • 25080
                  • 175 Posts
                  Hi,

                  I would like to see if it’s possible to generate one url with the title of the article, and this url will be one page where there will be desctiption and linke of the article ?
                    • 25080
                    • 175 Posts
                    I retry.

                    Is it possible with Feedx, that when i parse one site whitch is "this-site.com" whitch publish an article "title of the article", i have the liste of his news like this :

                    News on this-site.com
                    -title of the article
                    -title of the article2
                    -title of the article3

                    etc

                    And, when i clic on the news, i stay (for the moment) on my web site, and i have article’s description like this :

                    Title of the article (is the link for the complete news)
                    description description description description description description description

                    And, that the url of this page is :
                    my-website.com/title-of-article.html

                    And all the news will be archive for keep the urls and not have 404.

                    (sorry for my english...)
                      • 12379
                      • 460 Posts
                      I’m trying to embed this feed but it’s not working:

                      http://webservice.weatherzone.com.au/rss/rss2.php?code=9250&obs=1&fc=1&warn=1

                      Getting the warining "[ERROR RETRIEVING FEED]" in debugging console...
                        Mostly harmless.