We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41406 ☆ A M B ☆
    • 30 Posts
    Sorry for the delay in replying! I really should update the email address linked to the forum!

    As I recently said in a post https://forums.modx.com/thread/87052/image-v2-2-roadmap#dis-post-479695 I've been trying to get a new release out with a load of bug fixes, but I keep getting distracted or delayed.

    Delevelopment towards the new release (still unsure if it will be 2.2 or 3.0 at this time) has come a long way, and if you feel comfortable building from source the current develop branch on github is a massive improvement from v2.1, just not fully release-ready yet.

    You can follow the progress of outstanding tasks (and get involved if you wish) on the github issues board, and there is half-finished documentation available here http://alanpich.github.io/tvImagePlus/
      • 47891
      • 3 Posts
      Hi!

      ImagePlus is very useful extra, but if it don't work with getResource it becomes unusable in 50% cases.

      Is here any way to get work imagePlus in getResource chunk?

      For example I have in chunk this code:

      <img src="[[+tv.image]]"/>


      Now in output it produced:
      <img src="{
        " sourceimg":="" {="" "src":="" "content="" uudised="" ipad.jpg",="" "width":="" 500,="" "height":="" 422,="" "source":="" 1="" },="" "crop":="" "x":="" 18,="" "y":="" 0="" "targetwidth":="" 130,="" "targetheight":="" "alttag":="" false="" }"="" alt="Test">


      What I need is:
      <img src="content/Uudised/iPad.jpg" alt="Test"/>

      Thanks in advance!
        • 30912
        • 463 Posts
        Did you set the TV type to ImagePlus also? it needs to have the custom type set on the TV - not just 'image'
          • 47891
          • 3 Posts
          Quote from: Tyreal2012 at Jun 06, 2014, 04:53 AM
          Did you set the TV type to ImagePlus also? it needs to have the custom type set on the TV - not just 'image'
          Yes, I have set Input Type and Output Type to ImagePlus, but this didn't help.

          If I use ImagePlus in getResource chunk, then in output instead of the path to the image I get JSON string.
            • 17249 ☆ A M B ☆
            • 165 Posts
            Make sure you are using

             &includeTvs=`1` 

            and
             &processTvs=`1` 


            In your getResources snippet call.
            That should fix it.

            Check the docs here for more information:
            http://rtfm.modx.com/extras/revo/getresources

            Quote from: vladoks at Jun 06, 2014, 05:23 AM
            Quote from: Tyreal2012 at Jun 06, 2014, 04:53 AM
            Did you set the TV type to ImagePlus also? it needs to have the custom type set on the TV - not just 'image'
            Yes, I have set Input Type and Output Type to ImagePlus, but this didn't help.

            If I use ImagePlus in getResource chunk, then in output instead of the path to the image I get JSON string.
              • 47891
              • 3 Posts
              Pablo, thank you for fast reply.

              I had already in my getResources call &includeTVs=`1`, but haven't &processTvs=`1`. I added it and my final getResources call is here:
              [[!getResources? &parents=`[[*id]]`&tpl=`Campaign_RowTpl` &showHidden=`1` &includeTVs=`1` &processTvs=`1` &showMore=`[[*link_attributes]]`]]


              But it didn't help. Output in webpage is the same JSON string:

              <img src="{
                " sourceimg":="" {="" "src":="" "content="" uudised="" ipad.jpg",="" "width":="" 500,="" "height":="" 422,="" "source":="" 1="" },="" "crop":="" "x":="" 18,="" "y":="" 0="" "targetwidth":="" 130,="" "targetheight":="" "alttag":="" false="" }"="" alt="Test">


              I use MODX Revolution 2.2.14-pl with phpThumbOf v 1.4.0 and Image+ v 2.2.0

              I have tried use Image+ without getResources just putted my TV into template in that way:
              <p> <img src="[[*news_img]]" alt="[[*pagetitle]]"/></p>



              TV Input Type is Image+
              TV Output Type is Image+

              Image+ output chunk: ImgPluss-tmpl

              ImgPluss-tmpl chunk content:

              [[+url]]



              In this case I get image in my site, it is scaled to width 130px, like I defined in TV Input options tab, but it not cropped.

              What I'm doing wrong and how can I get Image+ work?
                • 17249 ☆ A M B ☆
                • 165 Posts
                I recommend isolate the test to see if everything is working:
                I've just made a test and its working as intended.

                Template Varible: thumb
                input type: image+
                output type: image+
                input options: Target Width: 300, Target Height: 150
                Added this TV to my Template in the Template Access Tab.

                Created a chunk: imageplusTpl
                with this code:
                 <ul>
                     <li>Resource Title: [[+pagetitle]]</li>
                     <li>Image Thumb: <img src="[[+tv.thumb]]" alt=""></li>
                 </ul>
                


                Created a resources container and added some childs in it (make sure they are published)
                here is the getResources Call for the test

                [[!getResources? &includeTVs=`1` &processTVs=`1` &parents=`68` &tpl=`imageplusTpl`]]
                


                If you have problems after doing this i recommend uninstalling the extra and install it again.
                Clear cache and try again.
                  • 37914
                  • 89 Posts
                  How is the development going?
                  I'm having a problem with the tv not displaying properly on the backend.

                    • 49593
                    • 2 Posts
                    Yeah.. The problem is happening to me also. Also is there any documentation on how to use Imageplus with Migx ??
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      It's kind of awkward with MIGx. You set up the fields you want for each image in the MIGx configuration, so you might be able to use it with ""inputTV":"imagePlus" but MIGx would have a problem recognizing its fields. All of the images' data are stored together in a JSON string, so I'm not sure how the image+ data would be handled in there. [ed. note: sottwell last edited this post 11 years, 10 months ago.]
                        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