We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3109 ☆ A M B ☆
    • 894 Posts
    So I'm trying to finish working on my next release for NivoGallery and I hit a wall with phpThumbOf.

    In order to fix one of the bugs NivoGallery is having with Firefox, Chrome and Safari I need to get the images loading absolute, I have managed to get the absolute images working but they do not resize, they maintain their original width and height.

    So I need to figure out why this code doesn't work in order to fix this if not I will have to remove the resizing options in NivoGallery, something I don't want to do.

    <img src="[[+image_absolute:phpthumbof=`w=200&h=200`]]" />
    


    Thanks in advance for you help.
      Benjamin Marte
      Interactive Media Developer
      Follow Me on Twitter | Visit my site | Learn MODX
      • 28107
      • 230 Posts
      syntax is correct.
      does the phpthumbof do anything?
        CONIN Werbeagentur . Köln
        http://www.conin.de
        • 3109 ☆ A M B ☆
        • 894 Posts
        The image display fine problem is it's not resizing to the width or height I specify.

        It works if I use:

        <img src="[[+image:phpthumbof=`w=200&h=200`]]" />
        


        But then the flickering bug rears it's head in again, I need to be able to use absolute paths to the images otherwise I can't fix this annoying bug.

        Thanks for checking.
          Benjamin Marte
          Interactive Media Developer
          Follow Me on Twitter | Visit my site | Learn MODX
          • 19604 ☆ A M B ☆
          • 179 Posts
          How does your "image_absolute" path look like? Do you start at the system root (the unix "/") or is it the webserver's root?
            MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
            http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
            • 3109 ☆ A M B ☆
            • 894 Posts
            Guys,

            The problem is not displaying the absolute image that works fine, the problem is it's not resizing based on the phpthumbof options specified.

            Thanks.
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX
              • 9102 ☆ A M B ☆
              • 318 Posts
              Nonetheless, I would like to know exactly what the difference between the placeholders
              [[+image]]
              and
              [[+image_absolute]]
              is. There must be something about the difference between these placeholders that is preventing phpthumbof from working properly. It is possible that the format of the absolute URL is such that the browser can display it, but phpthumbof can't open the file to resize it.

              Also, what is the output of
              [[+image_absolute:phpthumbof=`w=200&h=200`]]
              ? You say it displays, but what exactly is it displaying -- is it the orignial image file, or is it an image in the phpthumbof cache that's just not sized properly?
                • 3109 ☆ A M B ☆
                • 894 Posts
                @freejung

                The placeholder

                [[+image_absolute]]


                Displays the original image uploaded to MODx and

                [[+image]]


                Uses a phpthumbof generated image as the source.

                I need to get phpthumbof using the absolute image as the source.

                I also tried

                <img src="[[+image:phpthumbof=`w=200&h=200&src=[[+image_absolute]]`]]" />
                


                But that doesn't seem to fix the flicker glitch.

                I might just have to remove the re-sizing of the gallery images and the user will have to make sure the images they upload are all the same size.

                It seems like this is the only way to fix NivoGallery at the moment.

                  Benjamin Marte
                  Interactive Media Developer
                  Follow Me on Twitter | Visit my site | Learn MODX
                  • 19604 ☆ A M B ☆
                  • 179 Posts
                  Sorry, Ben, but why don't you give us a concrete example of what you are doing or trying to do? WHAT EXACTLY is the content of
                  [[+image]]
                  and
                  [[+image_absolute]]
                  ? Then we can start testing and reproduce the bug. After that the solution might come up.
                    MINDEFFECTS – DESIGN for PRINT, WEB and MEDIA
                    http://twitter.com/mindeffects · http://www.facebook.com/mindeffects · http://www.youtube.com/mindeffects/ · skype://mindeffects_oliver
                    • 3109 ☆ A M B ☆
                    • 894 Posts
                    @mindeffects

                    I was using that code as a rowTpl for my gallery call.

                    After playing around with it last night and with the help of Mark Hamstra we got it working, the code was correct for some odd reason it wasn't working on my local dev server but it worked on my live server.

                    So I packaged it up and installed it on the local dev server and it works now on both kind of weird but it's working thanks for your help in trying to solve the issue guys.
                      Benjamin Marte
                      Interactive Media Developer
                      Follow Me on Twitter | Visit my site | Learn MODX
                      • 3109 ☆ A M B ☆
                      • 894 Posts
                      Ok I take it back it works fine in revo 2.1.1 but not in revo 2.1.2 gonna test in 2.1.3 now and see how that fares.
                        Benjamin Marte
                        Interactive Media Developer
                        Follow Me on Twitter | Visit my site | Learn MODX