We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38666
    • 98 Posts
    I have a stand alone recipe database management program that I would like to incorporate into Modx Revo 2.3.x Can anyone give me some guidance as to how best carry out this operation. In the past I have used on old etomite wrapper but am sure there is a must better way to do this. If successful in this instance I would like to use the same procedures on two other applications on different websites.

    I suspect that include() or require() may be the key but am uncertain as to how to proceed.

    Suggestions and guidance most appreciated.

    This question has been answered by sottwell. See the first response.

      Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      A snippet with include or require directives for the script's starting .php file might be a place to start. Another idea could be to use the .php files as AJAX request processors.

      Any SESSION handling would need to be modified to use the MODX session rather than starting its own sessions.

      Echo and print statements in snippets can have unexpected results, so some editing to change those to returns might be necessary.

      Database access might be a problem, as MODX has its own PDO database connection, which isn't compatible with mysqli functions. Would you be using the same database, or a separate database?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 38666
        • 98 Posts
        Thanks Susan, certainly several points to consider. I'll delve into them later today. The database is a relatively minor (I hope) issue as all the database calls appear to be in a single script and after the past month I'm beginning to feel comfortable with PDO so conversion isn't as daunting a task as it would have been earlier.

        I may be back with more questions or hopefully an update.

        Cheers
          Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.