We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    This is an auto-generated topic for phpThumbOf 1.0.0-rc1 by splittingred.

    Brief Description:


    A custom, secure output filter for phpThumb. Any phpThumb-compatable config options can be passed into parameter of the filter.
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 27985
      • 54 Posts
      not working for me, get this in error.log:

      [2010-11-03 13:18:29] (ERROR @ /index.php) Could not load class: modPhpThumb from modphpthumb.
      [2010-11-03 13:18:29] (ERROR @ /index.php) [phpThumbOf] Could not load modPhpThumb class.

      idears?
        MODx 2.0.6
        PHP 5.3.3
        MySQL 5.1.50
        • 28215
        • 4,149 Posts
        Upgrade Revo to 2.0.4.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 27985
          • 54 Posts
          eggselent grin thanks.

          Any idea why I am getting a crazy path back? (/assets/components/phpthumbof/cache/var/www/vhosts/xxx/xxx.xxx.com/htdocs/assets/components/phpthumbof/cache/assets_images_papericon.jpg.44a3e177ce23da9b0c3708f158b746e0.png)

          "/assets/components/phpthumbof/cache" should be sufficient and "/var/www/vhosts/xxx/xxx.xxx.com/htdocs/..." is my system mapping. Not sure how/why this would happen. Any idea?

          Update (workaround): [[*thumbnail:phpthumbof=`w=195`:replace=`/var/www/vhosts/xxx/xxx.xxx.com/htdocs/assets/components/phpthumbof/cache==`]]
            MODx 2.0.6
            PHP 5.3.3
            MySQL 5.1.50
            • 3583
            • 2 Posts
            Thanks for this plugin!
            I am not sure if this is a bug of this plugin or I am using the wrong options. I want to resize portrait/landscale images differently with these options:
            [[phpthumbof? &input=`[[+myimagepath]]` &options=`&f=jpeg&q=75&wl=800&hp=600`]]


            My problem is, that all images are resized to 800x600 with an added white background. The scale/crop of the image is correct, but how can i get rid of the additional background fill?

            Another problem I noticed is, that the cached images are not deleted when I clear the site cache.
              • 28215
              • 4,149 Posts
              First off, this is an output filter, so you should be calling it like so:

              [[!+myimagepath:phpthumbof=`&f=jpeg&q=75&wl=800&hp=600`]]
              


              Secondly, the cache images are automatically handled by phpthumb. I’ll have to look into adding a plugin to get the site cache to clear this cache as well. Can you file that here: http://github.com/splittingred/phpthumbof/issues/
                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 14368
                • 56 Posts
                Is it possible to use this filter in conjunction with the Gallery plugin (I’m using Revo 2.0.4-pl2)?

                I’m trying to do this:
                [[!+galitem.image:phpthumbof=`&f=jpeg&q=75&wl=800&hp=600`]]


                which is just copy-pasted from your above example but this outputs nothing.
                Leaving out the phpthumb filter outputs the image as expected:
                <a href="/assets/components/gallery/connector.php?action=web/phpthumb&w=500&h=500&zc=0&far=0&src=%2Fassets%2Fcomponents%2Fgallery%2Ffiles%2F2010%2F11%2Fstarfish.jpg">
                  • 7557
                  • 61 Posts
                  Hi.I used only one parameter (w). Images with smaller dimensions are increased, but it should not be happening? I also use a parameter aoe = 0, but still smaller images are increased.
                  thx
                    • 25284
                    • 141 Posts
                    Hi,
                    I’ve got phpthumbof working fine for most of the things I want to do, however I can’t seem to get the filter section to work correctly.
                    I’m actually trying to watermark an image, but in the interests of tracking down where I’m going wrong I have tried a simple flip,

                    <image src='[[*image:phpthumbof=`fltr[]=flip|y`]]'/>


                    I just get the original image.

                    I’ve also read in a thread about phpthumb and modx that the [] should be changed to {},

                    <image src='[[*image:phpthumbof=`fltr{}=flip|y`]]'/>


                    but that’s not working either.

                    Can the ’fltr’ array be passed by phpthumbof? Can anyone see what I’m doing wrong here?

                    Thanks
                    Robin
                      • 33987 ☆ A M B ☆
                      • 197 Posts
                      I’m having some performance issues with the cache. It takes my server 0.25 seconds to find and load the cached file. The problem here lies in this line:

                      /* ensure we have an accurate and clean cache directory */
                      $phpThumb->CleanUpCacheDirectory();
                      


                      If I omit this line of code it speeds up the proces from 0.25 secs per thumb to 0.01 secs per thumb, which is awesome smiley The question is however: does this result in any problems on the long term?

                      We’re going in production with this particular site and I thought it might be an idea to schedule a daily/hourly cronjob to execute this cache cleaning proces.

                      Any thoughts on this?
                        Sterc Internet & Marketing | MODX Founding Partner | Chairman of the MODX Advisory Board

                        In need of a MODX consult? Try our MODX Developers Experts!