We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25483
    • 741 Posts
    I know I am able to show a rss feed on a page in modx, but I want something extra. I want to be able to create a document of every item so that I can use my site as a archive.

    The idea is to create a "Lifestream" on my website and fetch information from feeds like twitter and flickr. I got the idea from SweetCron which you can see live here: http://www.yongfook.com/
      with regards,

      Ronald Lokers
      'Front-end developer' @ h2o Media

      • 1122
      • 209 Posts
      Steps for doing this idea may look like (for one specific rss channel):
      1) obtain rss data through fopen(’url_of_your_rss_channel’) function - it will return XML document,
      2) split obtained XML data into two formal arrays with xml_parse_into_struct() function - it returns index and values of all tags (see PHP manual for details),
      3) now apply some logic - taking advantage of index and values built in step 2) retrieve values from tags of your interest,
      4) form a HTML code/document for displaying on your page.
      ------------
      Repeat for each rss channel to be imported.
      (Writing a class for doing this task should be an excellent idea.)
        • 11954
        • 58 Posts
        Unless I’m misunderstading what you require there is product called carp_se_4 which would fit the bill. This lovely piece of software takes an rss feed and converts it via a database into content which you can put onto your site, you can even blend content from multiple rss streams.
          • 25483
          • 741 Posts
          Quote from: heimdall at Oct 02, 2008, 08:19 PM

          Unless I’m misunderstading what you require there is product called carp_se_4 which would fit the bill. This lovely piece of software takes an rss feed and converts it via a database into content which you can put onto your site, you can even blend content from multiple rss streams.

          I think that this is what I need... But I want it to be opensource so that I can change it for use with MODx and release it.

          I think I have to find a php class which fetches rss feeds and then change it to put the data into a modx folder and set a template variable with the name of the source (so that I can define a icon for each feed smiley) Is there somebody who can help me a bit on this one? My php skills are not good anymore, didn’t touch it for a few years...
            with regards,

            Ronald Lokers
            'Front-end developer' @ h2o Media

            • 25483
            • 741 Posts
            Quote from: ganeshXL at Oct 03, 2008, 07:44 AM

            Actually... I see one potential pitfall/problem: How are you going to check if you already did fetch a particular feed-item? You would have to constantly check the publish-date xml-nodes, and compare those with your documents’ meta-data. Otherwise you’d end up with too many duplicates.

            hmz... I think I need a database which keeps a record of the fetched items, so that it can check for duplicates
              with regards,

              Ronald Lokers
              'Front-end developer' @ h2o Media

              • 20207
              • 22 Posts
              i am looking for this function too. sad Did you already found a solution?
                • 25483
                • 741 Posts
                Nope sorry... Didn’t have the time yet to create something like this!
                  with regards,

                  Ronald Lokers
                  'Front-end developer' @ h2o Media

                • I believe you will find half your work done for you in using feedx
                  http://www.stanback.net/code/modx/feedx.html

                  All you have to do is assign a template to the page and call the snippet.

                  It pulls a vast number of feeds of various types. I have only had issues when someone included & in the title of the feed.
                    Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

                    Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
                    • 25483
                    • 741 Posts
                    Yes, but I need to import the feeds as documents. I don’t think feedx can handle that part for me.
                    I need this to combine multiple feeds sorted on date in a paginated overview
                      with regards,

                      Ronald Lokers
                      'Front-end developer' @ h2o Media

                    • I remember reading somewhere (to far back to remember) of someone pulling a bunch of feeds into a single feed and then pulling that.

                      Another option, would be to have feedx called multiple times on a page.

                      Are you trying to archive these feeds for a long period of time, or is there another purpose?
                        Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

                        Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com