We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    Working on a responsive image slider and trying to incorporate pThumb and aside from numerous obstacles, I am noticing that when I use pthumb in my chunk, the resulting source code has phpthumbof, and the images generated are stored in my assets/components/phpthumbof/cache. Is that normal? Just trying to determine if pthumb is working as expected before I troubleshoot the other issues I'm having.

    I only installed the add-on pthumb. Never installed phpThumbOf.

    More to the saga:
    I am attempting to integrate MIGx with Fotorama jQuery slider and the use pthumb to generate the various sizes and then Foundation 5 Interchange to determine which to load.

    There's Good News and Bad News.
    The good news, after days and days of struggling with it, I have images loading on the page and sliding through. Plus, Safari Web Inspector shows no errors. Yahoo!

    Now for the bad news, I have to click several times before the image switches. It's as if each click is going through each available option I have set up in the chunk. I count 3 clicks. But there are actually four options. Additionally, the smaller images are not getting inserted when I reduce the browser window. Maybe interchange does not work that way. PicutureFill would recalculate and deliver based on window size.

    The various image files are getting created and stored in assets/components/phpthumbof/cache
    Still confused about that. My system setting for pthumb cache is assets/image-cache. I created the directory, but nothing is being inserted there.

    If anyone has any tips, they would be greatly appreciated. Meantime, I might see if I can get pictureFill to work now that I've figure out how to structure the chunk to be used with MIGx for fotorama. [ed. note: mmcgee last edited this post 9 years, 5 months ago.]
    • pthumb is a drop-in replacement for phpthumbof. The pthumb package provides a 'phpthumbof' snippet that is exactly the same as the 'pthumb' snippet. It also uses the same names for its cache directories. This is for backwards compatibility with sites that were built using phpthumbof.

      As far as getting it to work with any given Javascript slider, that is a matter of adjusting the chunk tpls of whatever listing snippet you are using to generate a list of images.
        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
        • 19872
        • 1,078 Posts
        Hi Susan:

        It seems like pthumb is working fine then, though not with my fotorama slider.

        As a test, I set up a simple, single image and confirmed that pthumb was resizing the image and interchange was delivering the correct size based on the browser window. So I know it works.

        With my slider though, I can get the big image to load, but there is no resizing occurring and I have to click several times to get the slider to change slides. The slider works fine if I hard code each image. But when it comes to trying to integrate pthumb and interchange using MIGx, it's become a real pickle. I fear there is some kind of conflict between the js for the slider and js for interchange. Although, my Safari Web Inspector is not alerting to any errors.

        I'll keep working on it. Thanks for the feedback. At least I know I'm OK with pThumb.