We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10816
    • 28 Posts
    Thank you very much for this useful snippet!!
      • 30546
      • 46 Posts
      I got a bit of trouble to read out a RSS feed from my IPB forums. This is the URL

      http://gamerscollective.com/forums/index.php?act=rssout&id=3

      return $modx->runSnippet('NewsParserX',array('url'=>'http://gamerscollective.com/forums/index.php?act=rssout&id=3'));


      This is what I get when I call the snippet: http://stage.server02.com/modx/index.php?id=39 (please look at the link)

      It is a valid RSS feed, since my RSS reader picks it up no problem. Only am concerned about the "?act=" part in the URL. Any thoughts on how to kill this bird ??

        • 22303 MODX Staff
        • 10,725 Posts
        Quote from: Trance at Mar 22, 2006, 01:05 PM

        I got a bit of trouble to read out a RSS feed from my IPB forums. ...
        It is a valid RSS feed, since my RSS reader picks it up no problem. Only am concerned about the "?act=" part in the URL. Any thoughts on how to kill this bird ??

        Hmmm, same result when I try to load it as well. I’ll have to look into the problem, but I’m a little swamped today. If you don’t hear from me in a couple of days, feel free bump this thread to remind me. Of course if you figure out the issue in the meantime, I’m sure you’ll share that as well...
        wink
          • 8164
          • 51 Posts
          I’m well on my way to proving my complete stupidity...but, I’m getting nowhere being stubborn and trying to figure this out on my own.

          I can’t seem to wrap my brain around this whole process. I followed the instructions in the original message, and got...nothing.

          I then followed Susan Ottwell’s followup procedure, and at least got "no entries found" to display. undecided

          That’s where I’ve been for 2 hours now.

          So, here’s what I’ve done:

          1. I put the contents of the zip file into /assets/snippets/newsparserx

          2. I created a new snippet called NewsParserX and pasted the newslisting.snippet.txt into it.

          Then, I put [[NewsParserX]] into the template.

          Nothing.

          So, I followed the slightly different procedure spelled out by Susan Ottwell, and created a snippet called "parseNews" with the return $modx->runSnippet line as it’s only content, and put [[parseNews]] into my template. That gets me the "no entries found" output.

          I can’t seem to figure out, step by step, what I should be doing. And, the original instructions from Jason seem substantially different from what Susan did. What goes where? And, what should I put in the template?

          Thanks. Sorry to be dumb.

          Duane

            • 10487 MODX Staff
            • 1,535 Posts
            Hi Duane,

            Are you passing a URL in the snippet call? If [[NewsParserX]] returns ’No Entries Found’ then, for all intents and purposes, I think the snippet is working. You just need to tell it where to get the feed wink

            So, something like this should work:
            [[NewsParserX? &url=`http://domain.tld/feed_url`]]
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 8164
              • 51 Posts
              Quote from: garryn at Mar 28, 2006, 03:40 PM

              Hi Duane,

              Are you passing a URL in the snippet call? If [[NewsParserX]] returns ’No Entries Found’ then, for all intents and purposes, I think the snippet is working. You just need to tell it where to get the feed wink

              So, something like this should work:
              [[NewsParserX? &url=`http://domain.tld/feed_url`]]


              Thanks for the quick reply, Garry.

              In order to try and eliminate as many variables in my troubleshooting as possible, I used the exact structure of Susan’s snippet call (figuring modx forums were a known source of a feed). So, as she spelled out, I created a snippet called "parseNews" with this content:

              return $modx->runSnippet('NewsParserX',array('url'=>'http://modxcms.com/forums/index.php?sa=recent;type=rss2;action=.xml&limit=6'));


              Then, I put [[parseNews]] into my template. This is what yields the "no entries" display.

              So, the URL I’m passing is the identical one to Susan’s.

              Duane
                • 10487 MODX Staff
                • 1,535 Posts
                Hmm, from the error messages my local install is giving me and just reading some of the previous posts in this thread - I think NewsParserX has an issue with RSS feeds that have a question mark in them (it’s actually crashing Apache for me, lol!)

                Could you try a URL that doesn’t have a question mark, just to see if this is the issue - I know the BBC RSS feeds are okay (www.bbc.co.uk)

                Thanks, Garry
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 8164
                  • 51 Posts
                  Quote from: garryn at Mar 28, 2006, 04:23 PM

                  Hmm, from the error messages my local install is giving me and just reading some of the previous posts in this thread - I think NewsParserX has an issue with RSS feeds that have a question mark in them (it’s actually crashing Apache for me, lol!)

                  Could you try a URL that doesn’t have a question mark, just to see if this is the issue - I know the BBC RSS feeds are okay (www.bbc.co.uk)

                  Thanks, Garry

                  Here’s the content of my snippet now:

                  return $modx->runSnippet('NewsParserX',array('url'=>'http://www.bbc.co.uk'));


                  Sadly, the same result: "no entries found"

                  ~sigh

                    • 10487 MODX Staff
                    • 1,535 Posts
                    Sorry Duane, my fault. I meant get an RSS feed off the BBC website:

                    Try the one below:
                    http://www.bbc.co.uk/go/homepage/int/ne/nrss/log/i/-/news/rss/newsonline_uk_edition/front_page/rss.xml
                      Garry Nutting
                      Senior Developer
                      MODX, LLC

                      Email: [email protected]
                      Twitter: @garryn
                      Web: modx.com
                      • 8164
                      • 51 Posts
                      Thanks for all the help, Garry. I abandoned NewsParserX and used the old etomite snippet, which worked right off the bat.

                      Quote from: garryn at Mar 28, 2006, 04:47 PM

                      Sorry Duane, my fault. I meant get an RSS feed off the BBC website:

                      Try the one below:
                      http://www.bbc.co.uk/go/homepage/int/ne/nrss/log/i/-/news/rss/newsonline_uk_edition/front_page/rss.xml


                      Same result.

                      Just to re-orient, here’s how things are set up:

                      1. In /assets/snippets/newsparserx, I placed the files contained in the zip on the orginal post (a php and a txt file).

                      2. I pasted the latest code from the newslisting snippet into the newslisting snippet in the resources tab, and uploaded the snippet txt file to /assets/snippets/newslisting.

                      3. I created a snippet called newsParser and pasted this code which came from Susan’s post:
                      return $modx->runSnippet('NewsParserX',array('url'=>'http://www.bbc.co.uk/go/homepage/int/ne/nrss/log/i/-/news/rss/newsonline_uk_edition/front_page/rss.xml'));


                      4. I put [[newsParser]] into my xhtml template code in the div where it’s placed in the layout.

                      What I get is two "no entries found" lines displaying. If you want to take a look, the URL is:

                      http://www.ideabankpreview.com/acn (it’s at the bottom of the page, center column).

                      This is still on the staging server, and I’m just beginning to construct the page.

                      Thanks again,
                      Duane