We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27519
    • 275 Posts
    I need to access the PHP API of MadMimi (a mailing list) using a snippet. This API requires a class file which is declared like:

    require(dirname(__FILE__) . '/../MadMimi.class.php');


    Where would I put this file within the MODX directory structures in order for my snippet to actually see it?

    Thanks.
      MODx Revolution / MAMP / OS X
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Wherever you want. Just put the proper path (absolute or relative to the index.php file) in your require directive.
        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
        • 27519
        • 275 Posts
        Thanks Susan, found a sample eventually and got it working. Also found a reference to what looked like a really handy snippet called "Include". Doesn't appear in the Package list however. Shame...
          MODx Revolution / MAMP / OS X