We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20364
    • 89 Posts
    Had a few people ask about this one, so here you go:

    http://www.weareakta.com/blog/modx/modx-tutorial-rssgen

    It’s still a little rough around the edges, so I would test thoroughly before putting in to production.

    FTA:

    RSS Feeds are a great way to open up your site content to various readers and aggregators around the web. We wanted to build a easy RSS generator for our MODx blog - enter RSSGen!

    This is a straight hack of Shaun McCormick’s GoogleSiteMap Package. Props to him!

    I personally haven’t bridged in to creating custom Transport Packages in Revo yet (and my super smart developers are a little busy at the moment), so if anyone wants to help wrap this in to a package, let me know in the comments! For now ...
      • 3749
      • 24,544 Posts
      Very nice. Thanks for sharing this. smiley
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 16702 ☆ A M B ☆
        • 536 Posts
        hello, nice tutorial, but i get this error with 2.1.2:

        Fatal error: Call to undefined method modX::getDocument() in /home/sdsd/public_html/core/components/rssgen/model/rssgen/rssgen.class.php on line 132
          palma non sine pulvere
          • 3749
          • 24,544 Posts
          That method is deprecated (and gone in the current version of MODX).

          The replacement is:

          $modx->getObject('modResource', $id);


          But if getDocument() is in there, there may also be other deprecated methods that crash things once that’s fixed.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 16702 ☆ A M B ☆
            • 536 Posts
            Quote from: BobRay at Jul 21, 2011, 05:52 AM

            That method is deprecated (and gone in the current version of MODX).

            The replacement is:

            $modx->getObject('modResource', $id);


            But if getDocument() is in there, there may also be other deprecated methods that crash things once that’s fixed.

            after replacement:

            Fatal error: Call to a member function getObject() on a non-object in /home/dfdf/public_html/core/components/rssgen/model/rssgen/rssgen.class.php on line 132
              palma non sine pulvere
              • 3749
              • 24,544 Posts
              Is the script running outside of MODX? I’m not familiar with it, but if that code is in a snippet or plugin, the $modx object and all its methods should be available. Be sure you have a capital O in getObject().
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 16702 ☆ A M B ☆
                • 536 Posts
                Quote from: BobRay at Jul 22, 2011, 03:08 AM

                Is the script running outside of MODX? I’m not familiar with it, but if that code is in a snippet or plugin, the $modx object and all its methods should be available. Be sure you have a capital O in getObject().

                hi, Bob,
                what mean outside? the tutorial is for snippet and outside .php file smiley you know i`m not developer and is hard to me smiley)) design is like sex, but developing is like hard Mountain climbing - for me grin grin
                  palma non sine pulvere