We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36754
    • 21 Posts
    Hey AlanPich, that would be great. Anything found so far? need a betatester?
    d

      • 37743
      • 49 Posts
      Hey Dom, sorry for the delay, you know how it is...
      After looking through the source it became apparent that while the user experience was good, the architecture and process in my existing project is totally flawed and uses several depreciated practices that will probably cause havoc in 2.3 and later.
      As a result I have started working from the ground up for v2 and will hopefully have a beta package available soon. You can follow the repo (if you want) at http://github.com/alanpich/tvImagePlus and I'll put a link in the readme page once I have a transport package
        • 41294
        • 34 Posts
        Hi, i started using MODX Revolution few months ago and very much interested on using awesome plugins to improve its usability. So i found this plugin [TV-Input-Type] ImagePlus which is very interesting for me and a great addition to MODX, just found few issues though using version 2.1.

        Issues i found:

        1. The assigned custom media resource on TV wont work, as you hit the image uploader and open a file uploader, the media source is the original 'Filesystem' not the custom media source i assigned on TV. Also, all media sources created will display on the file uploader even if you only assigned 1 media source to that TV.

        2. Image displays good if the TV called on the template like '[[*image]]', but if its on chunk so i use something like this '[[+tv.image]]', it displays array as a result instead of path, sample output shown below:
        sourceimg":="" {="" "width":="" 650,="" "height":="" 378,="" "src":="" "blog="" gym.jpg",="" "source":="" 2="" },="" "crop":="" "x":="" 0,="" "y":="" 0="" "targetwidth":="" "targetheight":="" "alttag":="" false="" }



        I don't really know if that issues existed cause i missed something. This plugin is a great help. If someone could enlighten me about the issues i found will be greatly appreciated. Thanks smiley


        • Quote from: aerosko0315 at Feb 27, 2013, 08:11 PM

          1. The assigned custom media resource on TV wont work, as you hit the image uploader and open a file uploader, the media source is the original 'Filesystem' not the custom media source i assigned on TV. Also, all media sources created will display on the file uploader even if you only assigned 1 media source to that TV.

          This is an issue with the MODx file browser rather than Image+... One of a few flaws with it that will hopefully be sorted out in future versions. I hear rumours of a new, replacement file manager down the line

          Quote from: aerosko0315 at Feb 27, 2013, 08:11 PM

          2. Image displays good if the TV called on the template like '[[*image]]', but if its on chunk so i use something like this '[[+tv.image]]', it displays array as a result instead of path, sample output shown below:
          sourceimg":="" {="" "width":="" 650,="" "height":="" 378,="" "src":="" "blog="" gym.jpg",="" "source":="" 2="" },="" "crop":="" "x":="" 0,="" "y":="" 0="" "targetwidth":="" "targetheight":="" "alttag":="" false="" }

          I'm guessing by [[+tv.image]] you are using it via getResources? If so, did you call &processTVs=`1` in your getResources call? This needs to be there so that the TV output can be generated
            • 30912
            • 463 Posts
            Hey, this is a very promising addon, however I cannot seem to get it to parse through getResources

            ive set it all up and can use it fine in the back end but as soon as I call it through i get a blank field.

            my call is as follows:

            [[getResources? &parents=`-1` &resources=`[[*Featured_News]]` &tpl=`Featured_News` &includeHidden=`1` &includeTVs=`1` &processTVs=`1` ]]
            


            with my chunk as

             <div class="news-featured">
                           <div class="featured-title">Featured Article</div> <div class="featured-date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</div>
                           <div class="clear"></div>
                           <div class="featured-image"><img src="[[+tv.Feat-Image]]" /></div>
              <div class="news-main-title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></div>
             
              <div class="news-main-content"> [[+introtext]]...</div><div align="right" style="margin-top:5px;"> <a href="[[~[[+id]]]]"><img src="assets/templates/portal/images/read-more.png" border="0" /></a> </div>
            </div>


            If i use a normal image tv it comes through fine with tv. as the prefix but nothing from image +

            cheers
            • Is the TV output type set to Image+ as well?
                • 30912
                • 463 Posts
                /facepalm

                That might be it.

                Thanks
                • Jason Sonderman Reply #28, 11 years ago
                  having an odd issue with using this as a getResources placeholder ([[+tv.articleImg]] which is the name of my TV). When left blank, it saves this to the db
                  { "sourceImg": { "width": 0, "height": 0, "src": "", "source": 1 }, "crop": { "width": 0, "height": 0, "x": 0, "y": 0 }, "targetWidth": 800, "targetHeight": 0, "altTag": "" }

                  which in turns it output to the frontend.

                  If an image is saved to the TV, it renders out fine, although I can never remove that image (will always default back to the last value)

                  First, why would getResource be outputing the JSON string if the src value is empty, and second, why can I not remove the image and make the TV blank?
                  • getResources will always output the json string unless the TV output is set to image+ and processTVs is set on the getResources call. If that doesn't work there may be a wider bug.

                    Resetting a tv to empty is a good shout, I'll add it as a feature request for the next version
                      • 41294
                      • 34 Posts
                      Hey AlanPich,

                      This is great work. But i was wondering if custom media source already work with image+?

                      I recently downloaded version 2.1, but when i create a custom media source for image directory, it will still open the root directory not the media source i assigned to it.


                      Great Work!

                      Thanks