We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    Hi, I am trying to implement the MIGx, flexslider solution following the tutorial by Mark Hamstra (forgot the link to tutorial https://www.markhamstra.com/modx/2012/04/managing-galleries-with-migx/), all works well, but when I assing the image migx tv to a media source, no image shows up. Here s what is inserted inside the opening and closing li:

    <img src="<br />
    <b>Warning</b>:  file_get_contents(/home/psww137927/domains/hosteltralalasalento.com/public_html/Lighthouse.jpg) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in <b>/home/psww137927/domains/hosteltralalasalento.com/public_html/core/model/phpthumb/phpthumb.class.php</b> on line <b>3210</b><br />
    " alt="vuurtoren" />
      <p class="flex-caption">vuurtoren</p>
    t

    From the image TV when trying to browse forn an image, it does open the upload folder I created (assets/images/uploads) and basepath and baseurl are assets/images/uploads/
    And I see images. What s happening?

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

    [ed. note: franklos last edited this post 13 years, 2 months ago.]
      • 4172
      • 5,888 Posts
      are you using getImageList or another snippet to show the images?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 10076
        • 1,024 Posts
        Quote from: Bruno17 at Aug 03, 2013, 03:16 PM
        are you using getImageList or another snippet to show the images?

        Using Mark s snippet:

        1
        2
        3
        4
        5
        6
        7
        8
        $input = $modx->fromJSON($input);
        $output = array();
        if (!$input || empty($tpl)) return 'no stuff';
        foreach ($input as $row) {
          if (isset($set) && !empty($set) && ($set != $row['set'])) continue;
          $output[] = $modx->getChunk($tpl, $row);
        }
        return implode("\n", $output);
          • 4172
          • 5,888 Posts
          I think Mark's snippet doesn't know anything about the mediasource used by your image-field and you may need to build the image-path by yourself in the tpl.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 18373 ☆ A M B ☆
            • 3,141 Posts
            Quote from: Bruno17 at Aug 03, 2013, 04:24 PM
            I think Mark's snippet doesn't know anything about the mediasource used by your image-field and you may need to build the image-path by yourself in the tpl.

            ^ that's correct.

            Use getImageList or prefix the path in your tpl.
              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.
              • 10076
              • 1,024 Posts
              Thanks. As as far as I understand it should be in this TPL (mh.images.gallery.tpl).
              <li>
                <img src="[[+image:phpthumbof=`w=323&h=234&zc=1`]]" alt="[[+description:htmlentities]]" />
                <p class="flex-caption">[[+description]]</p>
              </li>


              If I add eg
              /home/psww137927/domains/hosteltralalasalento.com/public_html/assets/images/uploads
              before the
              [[+image: phpthumboff....

              Nothing positive happens? Is there a tutorial on MIGx or getImageList?
              • discuss.answer
                • 4172
                • 5,888 Posts
                you can try:

                [[+image:add_before=`assets/images/uploads/`:phpthumbof=`w=300&h=300&zc=1`]]


                snippet add_before:

                <?php
                return $options.$input; 
                
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 10076
                  • 1,024 Posts
                  Bruno, brilliant, that did the trick.