We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4273
    • 356 Posts
    Can we use serverside include type calls in modx
    ie
    using the following to pull in from another dir outside of modx ?

    < ? php include "path/outside/modx/"; ? >

    i tried to put it in the doc but didn’t work, also tied it as a snippet
      SMF Bookmark Mod - check it out
      http://mods.simplemachines.org/index.php?mod=350
      • 7923
      • 4,213 Posts
      Yes you can.. In snippets, just use normal php include or include_once functions at the snippet code..(no need to put the <?php ?> tags). At documents, you need to use some snippet to inlude files, look at these:

      php include
      Include any file within the document.
      Include snippet by sottwell (also look at the post above)

      I’m sorry to see that you haven’t kept your promises. Please allways search before you ask! Over 50% of your post (and that’s alot) are in General Support forum, and to 99% of the questions there is allready an answer in the forums.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 4273
        • 356 Posts
        cool thanks,

        was attempting to pull in phplist subscribe page no luck though, can pull in the subscribe page but not the whole subscribe/unsubscribe process. think there’s a way from the phplist end but could be a complicated one
          SMF Bookmark Mod - check it out
          http://mods.simplemachines.org/index.php?mod=350
          • 42842
          • 12 Posts
          Hi guys!

          My Question is related to this here so I post it here:
          I want to display this content: http://heartandtruelove.com/vimeo.php?id=123456

          So i created the php into a snippet:
          <?php
          $imgid = $_GET['id'] . $id;
          $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid.php"));
          echo $hash[0]['thumbnail_medium'];
          ?>
          

          and i can load the snippet like this:
          [[!vimeo_thumb? &id=`123456`]]

          BUT, here comes the problem, I don't get the same thumbnail link like here:
          http://heartandtruelove.com/vimeo.php?id=123456

          My guess was, that I am doing something wrong in the php code, what could it be?
          thanks for fast response! =)
            • 7923
            • 4,213 Posts
            Try to print the values to see what's in them, for example replace:

            echo $hash[0]['thumbnail_medium'];


            with:

            return print_r($hash, true);


            On a side note, this is quite an old thread (6 years) and about different subject, so you better create a new thread.


              "He can have a lollipop any time he wants to. That's what it means to be a programmer."