We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18373 ☆ A M B ☆
    • 3,141 Posts
    Ah you put in the html directly. That works, though I was thinking of this (note that I placed a space between the htt and p:// cause the forum is messing things up a bit here):

    <?php
    return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt p://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="htt p://www.w3.org/1999/xhtml">
     
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Appointment Scheduler</title>
    </head>
     
    <body>
    <div> 
    <iframe src="htt p://www.TheLocationOfMySoftareIndex.php"
     scrolling="yes" width="100%" height="600">
    </iframe></div>
     
    </body>
    </html>';


    Please note the forum is building links out of the ht
      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • 32025
      • 305 Posts
      I will try it this way a little later tonight. First with "echo" and then with "return" And of course the closing of a php page has to be: ?> (I read just enough to make me dangerous)

      Perhaps this will solve my problem.
        Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
        • 18373 ☆ A M B ☆
        • 3,141 Posts
        First with "echo" and then with "return" And of course the closing of a php page has to be: ?>

        Correct on the closing, but really, use return cause that's the way it needs to be. Using echo you will probably get the same results you have right now. wink
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 32025
          • 305 Posts
          That worked perfectly! So this is the code that worked:
          <?php
          return ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml">
          <head>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
          <title>Appointment Scheduler</title>
          </head>
          
          <body>
          <div> 
          <iframe src="http://www.MYWEBSITE.com/core/components/MYSCRIPT/index.php" scrolling="yes" width="100%" height="600">
          </iframe></div>
          
          </body>
          </html>';
          ?>


          Would have never even gotten close without you, this is awesome. Now that I can run external PHP scripts directly into MODx, this give me lots of tools that might not be available via add-on.

          I just have one easy question now. Do I have to install these programs directly in the core/components/MYPROGRAM folder or can I install them outside of the MODx folders but then call them in via the iFrame file? My only concern with having them directly inside MODx is that when I add the Javascript to the front end pages of the website, the script location will shows which perhaps makes MODx less secure. Maybe I am wrong I don't know. This would be the Javascript code I add to the front end pages:

          <link href="http://www.MYWEBSITE.com/core/components/MYSCRIPT/index.php?controller=Front&action=css&cid=1" type="text/css" rel="stylesheet" />
          <link href="http://www.MYWEBSITE.com/core/components/MYSCRIPT/index.php?controller=Front&action=loadCss&cid=1" type="text/css" rel="stylesheet" />
          <script type="text/javascript" src="http://www.MYWEBSITE.com/core/components/MYSCRIPT/index.php?controller=Front&action=loadJs"></script>


          Would this be a security concern?
            Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            As long as the iframe points to the right url, the location of that doesn't matter.

            It's probably easiest in the long run to keep your action controllers in core/components, though it doesn't *really* matter. You can put it whereever you want really.
              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 32025
              • 305 Posts
              I was looking at the setup and I think it's best where it's at now inside the core/components area. As long as it is not a security concern it seems like the logical place for these scripts to reside. Once again thank you so much for your help, this is great that I can run my scripts in MODx. Talk about flexibility!
                Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/