We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9022
    • 4 Posts
    Nope im using backticks..
    Is there any problem with the advanced editor?
    Might it convert things in a wrong way?
    i saw this in the "none" editor..
    [[NewsParserX?&url=`http://www.mil.se/rss/forsvarsmakten/index.html`]]

    I tried to remove the space between ? and & signs but same "connection was reset".
      • 22303 MODX Staff
      • 10,725 Posts
      Sounds to me like you are being blocked from connecting to external sites via your PHP configuration, or else blocked from accessing the feed. When I access the feed here locally, it comes up with no problems; here is the exact call I’m using...

      [!NewsParserX? &url=`http://www.mil.se/rss/forsvarsmakten/`!]


      The & being converted to & by the RTE should not be preventing it from working, but is one reason why I never use RTE’s in places where I’m going to be inserting/editing MODx tags very often. Instead, I limit RTE editing to specific TV’s I have defined within my content where MODx tags are not likely to appear but the markup and content should be mutable.
        • 9022
        • 4 Posts
        Quote from: OpenGeek at Feb 20, 2007, 10:44 AM

        Sounds to me like you are being blocked from connecting to external sites via your PHP configuration, or else blocked from accessing the feed.

        Can i verify the php config settings in some simple way?
        Im not the admin on the server so i dont have access to the accutal files.
          • 7923
          • 4,213 Posts
          You could try the pieX if that works any better..

          EDIT: LOL, nevermind this post.. didn’t notice that there were a second page in this thread too..


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 34162
            • 1 Posts
            Hi, I’m trying to get this snippet to work, but I keep getting a parsing error.

            This is the url of the feed I want to use: http://kvk.nl/rss/rssfeed.asp?sectieID=14
            This is the snippetcall:
            [[NewsParserX?&url=`http://kvk.nl/rss/rssfeed.asp|xq|sectieID|xe|14`]]


            and this is the error I get:
            « MODx Parse Error »
            MODx encountered the following error while attempting to parse the requested resource: 
            « PHP Parse Error » 
              
            PHP error debug 
              Error:  Unknown(assets/snippets/newsparserx/newsparserx.inc.php): failed to open stream: No such file or directory   
              Error type/ Nr.:  Warning - 2   
              File:  /home/vhosts/someurl/httpdocs/manager/includes/document.parser.class.inc.php(748) : eval()'d code   
              Line:  80   
              
            Parser timing 
              MySQL:  0.0019 s (6 Requests) 
              PHP:  0.0424 s   
              Total:  0.0443 s   
            


            I checked newsparserx.inc.php is in the asset/snippets/newsparserx directory and this is correct.

            What am I missing?
              • 22303 MODX Staff
              • 10,725 Posts
              @WeBe: you wouldn’t happen to be running PHP 5.0.4 with open_basedir restrictions in effect, would you (via Plesk)? Otherwise, I can’t imagine why it can’t find that file if it’s there (double-check the case of the directory names/files, Linux is case-sensitive if you are deploying on a Linux server).
                • 7923
                • 4,213 Posts
                or try to change:

                if (!class_exists("RSS_feed")) { include "assets/snippets/newsparserx/newsparserx.inc.php"; }

                to

                if (!class_exists("RSS_feed")) { include $modx->config[’base_path’]."assets/snippets/newsparserx/newsparserx.inc.php"; }


                  "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                  • 34162
                  • 1 Posts
                  Thank you for your quick reply!

                  I checked again and I found the error.

                  Apparently I’m working on too many sites. It doesn’t work when you put the snippet directory on the wrong server.

                  Quite embarrassing embarrassed

                  Now I just have to figure out how to get the accents on characters right. Now they look like chinese characters shocked
                    • 34162
                    • 1 Posts
                    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?
                      • 1535
                      • 84 Posts
                      Hi.

                      Thanks for sharing this snippet.

                      Is there an easy way to exclude the main feed title from the result?
                      Or better yet, make the feed title appear as the doc title?

                      I tried to disable the title, but then I lost all the titles grin

                      Cheers,

                      Andreas