We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46353
    • 4 Posts
    Hi Guys,
    Whats the syntax to resize images upward please in pthumb. I was expecting

    [[+tv.news-image:pthumb=`w=150&h=149&zc=1&aoe=1`]]


    to do it..
    Also for some reason phpthumbof wont render images for me in a template or chunk hence i am trying pthumb. Ive used it loads of times and I'm following everything here http://rtfm.modx.com/extras/revo/phpthumbof.....cache is 777, output text etc...In fact phpthumbsup wont work for me either. I only have luck with pthumb.

    Any ideas please?

    PHP Version 5.5.3-1ubuntu2.1
    Apache/2.4.6 (Ubuntu)
    mysql 5.5.34
    revo 2.2.10
      • 38723
      • 165 Posts
      Quote from: howsterwtf at Jan 21, 2014, 08:55 PM
      Hi Guys,
      [[+tv.news-image:pthumb=`w=150&h=149&zc=1&aoe=1`]]


      From the pThumb extras installation details page:

      pThumb uses the same namespace, settings and snippet name as phpThumbOf, so after it's installed any code using phpThumbOf will automatically use the new version instead.

      So you should call it as follows:

      [[+tv.news-image:phpThumbOf=`w=150&h=149&zc=1&aoe=1`]]
      


      Is this call from inside a chunk? Have you checked your hosting has the correct modules enabled? The pThumb GitHub page has details of what's required for each part )and for the most part thesea re the same requirements as phpThumb of [or indeed phpThumbsUp]

      https://github.com/oo12/phpThumbOf#new-pthumb-features
        • 46353
        • 4 Posts
        I actually set up the server with lamp myself and can't see why phpthumbof ain't working. Image tv out is text, folder have the permissions. Gd and imagmagick installed. Maybe it's the php versions as I've used phpthumbof a lot in the past in similar server scenarios. Thanks
          • 18608
          • 112 Posts
          Quote from: howsterwtf at Jan 23, 2014, 05:35 AM
          I actually set up the server with lamp myself and can't see why phpthumbof ain't working. Image tv out is text, folder have the permissions. Gd and imagmagick installed. Maybe it's the php versions as I've used phpthumbof a lot in the past in similar server scenarios. Thanks

          I had some issues with this in the past on some servers. Modx' phpthumb.class.php doesn't detect the ImageMagick install and fallback to GD. GD doesn't support the aspect operations like far and aoe.

          For the 2.2.10 install you can fix it by this solution:
          https://forums.modx.com/thread/81134/error-with-phpthumbof-force-aspect-ration#dis-post-447063

          For 2.2.11 I haven't found a way to getting it to work yet because the phpthumb.class has been updated...
            Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
            • 46353
            • 4 Posts
            Thanks - phpthumbof won't work under any circumstances for me; aoe or simpler calls. Only pthumb will. Hmmm. Weird
              • 27708 MODX Staff
              • 2,502 Posts
              pthumb, if I understand correctly uses it's own class for phpThumb vs most of the other thumbnail tools that use MODX's phpthumb.class.php. This may account for it's working where others are not. We'd love to get to the bottom of these issues and resolve asap.
                Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
                • 38547
                • 98 Posts
                Just found this post after making this post
                https://forums.modx.com/thread/88895/phpthumbof-partly-stopped-working-any-ideas#dis-post-488864

                The only thing I done that could have caused me issues was update from 2.2.10 to 2.2.11 so I dot know if this is the issue, I am a non technical user and have no idea how to work out whats wrong.

                Cheers
                  • 35150 ☆ A M B ☆
                  • 191 Posts
                  Quote from: smashingred at Jan 23, 2014, 01:49 PM
                  pthumb, if I understand correctly uses it's own class for phpThumb vs most of the other thumbnail tools that use MODX's phpthumb.class.php.

                  No, for phpThumb it uses the class included with MODX (core/model/phpthumb/phpthumb.class.php). I don't know for sure, but I think the version included with 2.2.11 has some problems if you give it a relative path, which phpthumbof and phpthumbsup will do. pThumb always sends absolute paths to phpThumb. I think this is why it continues to work ok with 2.2.11.
                    Extras :: pThumb • Resizer • imageSlim • setPlaceholders
                    • 46353
                    • 4 Posts
                    Ya it's weird. Try pthumb.
                    [[+tv.img:pthumb=`w=150&h=149&zc=1&aoe=1`]]