We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29902
    • 72 Posts
    I am coding a module for newsletter and I need a way to make a thumbnail with border and rounded corners from a image in a template variable and save it on the server so I can get an absolute url to the thumbnail since it is going to be in an email. I usually use phpthumb to do this, but that is in chunks and snippets.

    How can I call phpthumb to make a thumbnail from inside the module?
      ...I believed it was Friday...
      • 8930
      • 44 Posts
      It seems that I’ve a problem quite similar : I would like to use the phpthumb in the core like this :
      <img id="PhotoMembre" src="connectors/system/phpthumb.php?w=110&src=[[getResourceField? &id=`[[*createdby:userinfo=`phone`]]` &isTV=`1` &field=`ImageTV`]]" title="" alt=""/>

      To help you understand this line of code : each membre has a resource with an image field (and many other informations, like a full profile. In the classical user profile, the field "phone" is used to put the ID of member’s ressource. I can’t use a filter output because the image name come from a getResourceField call.

      This code was perfectly working before MODx 2.0.8 . Since this release (the same for 2.1RC4), it shows a blank picture.

      The other solution I see is to transform phpthumb output filter as a snippet?

      Any other idea?

      Many thanks in advance
        Equilibre Webdesign - Conception et r