We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8168
    • 1,118 Posts
    Hi I have installed this but dont really understand how to incorporate its usage into my workflow...

    I want to use it within a TV i have created for an image I have

    could anyone suggest what I need to do to make this work?



    Many thanks

    dubbs
      • 5340
      • 1,624 Posts
      This is how I use it with Wayfinder or Ditto

      Basically I’m creating a thumb only if a thumb was not uploaded:

      [+showcaseItemThumb:len:gt=`5`:then=`<img  src="[+showcaseItemThumb+]" height="50"/>`:else=`<img  src="[+showcaseItemImg:phpthumb=`w=75&h=50&q=95&zc=1`+]" />`+]

      this is using PHx

      Maybe you can tell us more about what do you want to do.

        • 8168
        • 1,118 Posts
        I am building out a bespoke eShop which uses Template Variables to allow user to input details and a photo of a new product to the eShop site. Therefore I would like some way of creating a thumbnail at a percentage size of the original from the original photo they upload via the template variable input.

        Is this possible? I am not overly technical so would appreciate a walked through explanation... ;]


        Thanks!
          • 5340
          • 1,624 Posts
          Should be exactly like this for Wayfinder and Ditto

          <img  src="[+showcaseItemImg:phpthumb=`w=75&h=50&q=95&zc=1`+]" />


          In a template should be

          <img  src="[*showcaseItemImg:phpthumb=`w=75&h=50&q=95&zc=1`*]" />


          the above displays a thumb of the image with the w:75, h:50 and quality 95.\

          PS: just replace showcaseItemImg with you TV name.
            • 8168
            • 1,118 Posts
            Thanks! Although when i use the sample code in my template it does not work - it creates a broken image placeholder when viewed within the front end site. The code i am using is

            <img  src="[*Product_Photo:phpthumb=`w=75&h=50&q=95&zc=1`*]" />


            Should this work? I have noticed no call to the phpthumb snippet or plugin is on the page? is that correct?



            Thanks ;]

              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Plugins aren’t called from the document; their code is automatically inserted into the parsing process at the point specified in the the plugin’s System Events tab.
                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
                • 8168
                • 1,118 Posts
                Thanks - so then the plugin must have not installed correctly if this is not working?
                  • 5340
                  • 1,624 Posts
                  Have you done this step?
                  "-Create a new snippet called phx:phpthumb and paste the contents of snippet_phx_phpthumb.php"
                  from INSTALL.txt

                  Also do you have PHx installed?
                    • 8168
                    • 1,118 Posts
                    Yep - but perhaps its not installed correctly? only thing i can assume must be wrong..?