We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14050
    • 788 Posts
    Use PHx.
      Jesse R.
      Consider trying something new and extraordinary.
      Illinois Wine

      Have you considered donating to MODx lately?
      Donate now. Every contribution helps.
      • 28033
      • 925 Posts
      I installed this snippet alright and everything, but when I try inserting the snippet call with a feed URL to a section of my MyBB forum, it won’t do anything. It makes the page load VERY slowly, and when I have the debug option set up, and click the button to see the debug info, I get a blank page.

      I installed /FeedX to assets/snipppets, and the snippet is installed like it should be. I dunno what’s going on here...
        My Snippets
        -> PopUpChunk v1.0
        • 14050
        • 788 Posts
        Snippet call?
          Jesse R.
          Consider trying something new and extraordinary.
          Illinois Wine

          Have you considered donating to MODx lately?
          Donate now. Every contribution helps.
          • 28033
          • 925 Posts
          Quote from: jesster444 at Sep 05, 2007, 10:04 PM

          Snippet call?

          Gah...I just realized I forgot the replacement for the = part. Sorry about that.
            My Snippets
            -> PopUpChunk v1.0
            • 11975
            • 2,542 Posts
            Hi ApoXX,

            is there any particular reason to prohibit from the regexp in the render function the "-" character ?
            preg_match_all(’#{{([^\(-]+)(\(([0-9]+),?([0-9]+)?\))?->([^}]+)}}#’, $tpl, $result);
            By default SMF feed tags name (xml format) contains "-" so Feedx fails to render the content.

            <smf:xml-feed xml:lang="fr-FR">
            	<recent-post>
            


            :-)
              Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
              • 28033
              • 925 Posts
              When I try to do this feed with FeedX...

              [!FeedX? &url=`http://news.google.com/news|xq|hl|xe|en|xa|ned|xe|us|xa|q|xe|%22Tales of the Abyss%22|xa|output|xe|rss` &preset=`rss`!]


              I get this error from MODx...


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

              PHP error debug
              Error: mysql_query(): Can’t connect to local MySQL server through socket ’/var/lib/mysql/mysql.sock’ (2)
              Error type/ Nr.: Warning - 2
              File: /hsphere/local/home/tales/tales.rpgplanet.gamespy.com/manager/includes/document.parser.class.inc.php
              Line: 1292
              Line 1292 source: $ds= @mysql_query($sql);

              Parser timing
              MySQL: 0.0066 s (6 Requests)
              PHP: 3.6014 s
              Total: 3.6080 s

              Any idea what’s wrong with the feed? It worked fine by adding in the real URL --- I’m thinking the %22 is messing it up (it’s the " marks to make sure Google gets the entire phrase, not just the individual parts of it. I tried replacin them with the real ", but it didn’t show up (although I didn’t get an error).
                My Snippets
                -> PopUpChunk v1.0
                • 22303 MODX Staff
                • 10,725 Posts
                Soshite:

                That error is not related to FeedX; it is a MySQL error. You seem to be having some database problems, either in general, or with a script that shares the page?
                  • 28033
                  • 925 Posts
                  Quote from: OpenGeek at Sep 06, 2007, 07:34 PM

                  Soshite:

                  That error is not related to FeedX; it is a MySQL error. You seem to be having some database problems, either in general, or with a script that shares the page?

                  The weird thing is that it ONLY occurs when I tried adding in that code. When I took it away, it didn’t show up.
                    My Snippets
                    -> PopUpChunk v1.0
                    • 23050
                    • 1,842 Posts
                    Hi,

                    I want to call a xml from a SMF forum.
                    This forum is in ISO-8859-1 and my MODx site in UTF-8.

                    In french language file, accents are encoded with html entities : &agrave; for ex.

                    This &agrave; invalids the xml so I changed it into à.

                    xml feed is now right, I get the à as I want but, when parsed by FeedX, the space juste before the à is deleted.

                    I should get Aujourd’hui à (Today at) and I get Aujourd’huià

                    Watching at the debug info, I see Aujourd’hui� so I guess it’s a problem with encoding.

                    Templates are encoded in UTF-8.

                    Here is my snippet call :
                    [!FeedX? &url=`http://www.histwar.com/forum/index.php|xq|action|xe|.xml` &debug=`1` &preset=`histwar` &convEntities=`0` !]


                    I did some test with &convEntities. If I put it on 1, I get an error on mb_convert_encoding. So I tried this fix and then : nothing shows up, I can’t get the xml feed displayed.

                    Don’t know what to do... Why the space between the à is deleted ? Why I get this error on mb_convert_encoding ? ... smiley
                      • 23050
                      • 1,842 Posts
                      Quote from: Perrine at Sep 07, 2007, 12:07 PM

                      I did some test with &convEntities. If I put it on 1, I get an error on mb_convert_encoding. So I tried this fix and then : nothing shows up, I can’t get the xml feed displayed.

                      I still use &convEntities=`1` and I’ve changed
                      return mb_convert_encoding($output, $modx->config['modx_charset'], 'auto');

                      into
                      return mb_convert_encoding($output, $modx->config['modx_charset'], 'iso-8859-1, utf-8');


                      Now, I get the output but the à is still sticked to Aujourd’hui. Snif ^^

                      If I change the à to a, it’s ok, I get Aujourd’hui a

                      Does the line with return mb_convert_encoding change the encoding for all the output of the feed ?