We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10395
    • 96 Posts
    Hi,

    Is there anyway that i can use RSS to import an RSS feed into ModX and use the imported information as news items?

    Also, can i select information from a database seperate from ModX’s? Say i have database modx with all of modx’s tables, then i have a seperate database called forums with the forum tables. Can i select things from the forum database from within modx?

    Thanks.
      • 32963
      • 1,732 Posts
      Quote from: Gaia at Oct 11, 2006, 03:09 PM

      Is there anyway that i can use RSS to import an RSS feed into ModX and use the imported information as news items?

      Try this link:
      http://modxcms.com/NewsParserX-601.html

      You can also have a quick look inside the repository. I think there might be other snippets that allows you to read RSS feeds.


      Also, can i select information from a database seperate from ModX’s? Say i have database modx with all of modx’s tables, then i have a seperate database called forums with the forum tables. Can i select things from the forum database from within modx?

      Sure you can. To do so using the $modx->db object you must first ensure that the database user id that you used to setup has access to your forums database. Once this is done you can then use MODx to access the tables:

      $ds = $modx->db->select('*','database_name.table_name'); 
      // where database_name is the name of your forum datbase and table_name is the name of your forum table


      The other option is to create a new DBAPI connection to your database:

      $db = new DBAPI($host,$database, $uid,$pwd);
      $ds = $db->select('*','table_name');
      



        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
        • 10395
        • 96 Posts
        Thanks ^_^.

        If i did want to create a new DBAPI, where would i place/create it?

        Thanks again.
          • 32963
          • 1,732 Posts
          Quote from: Gaia at Oct 12, 2006, 10:11 AM

          Thanks ^_^.

          If i did want to create a new DBAPI, where would i place/create it?

          Thanks again.

          You can place it inside a snippet, a module or use @EVAL within a TV
            xWisdom
            www.xwisdomhtml.com
            The fear of the Lord is the beginning of wisdom:
            MODx Co-Founder - Create and do more with less.
            • 10395
            • 96 Posts
            Thanks, i’ll look over those options smiley.