We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7923
    • 4,213 Posts
    Quote from: One_PHANTOM at Nov 02, 2009, 10:34 PM

    Quote from: doze at Nov 02, 2009, 10:52 AM

    Well.. If you take a look at your phpThumb demo page, it says ’missing hash’.. that makes me think that you have not extracted the vanilla phpThumb files to your assets/snippets/phpthumb/ folder or you have modified some of the settings. There is either problem in your phpThumb installation or with your server.
    Hi Doze,

    Isn’t this regarding the demo images as the file paths point to images of a pineapple etc. I on’t have the demo images installed so this is why they arn’t showing here. Should somewhere on this demo page be showing my images?
    Yes, now your phpThumb installation seems to work after you reinstalled it. The error for missing images is ok, because the phpThumb demo images are not part of it’s install. Previously it errored about missing hash, like I said above.

    So now if you take a look at this url, you see that phpThumb is working fine. Now you just have to create the chunck to your snippet call like previously instructed.

    EDIT: Hit enter in the location bar after you have opened that link above to see the image


      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
      • 25260
      • 156 Posts
      I’m also getting the "does (doze tongue) not exist" thing, but I’m sure that images exist, because if I remove the phx thing everything is working.

      What should I do? sad

      Cheers,

      Roberto
        • 7923
        • 4,213 Posts
        Do you have link to the site?

        You probably need to add [(base_url)] to the image paths.


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 25260
          • 156 Posts
          There is [(base_url)] both in the gallerypicturetpl and in the snippet phx:phpthumb sad
            • 22253
            • 54 Posts
            Hi Doze,
            ok I can see that is working now which is great. So I had a look on the page once I created the chunk and for a minute thought it had worked but I realised I still had my custom css for the thumbnails with a div around them (for when I was trying to achieve square thumbnails without phpthumb) so I removed this from the css and I am still getting the same code showing up on the page. The link is here:

            http://www.squaredgepictures.co.uk/cmstemp/index.php?id=25

            My gallery chunk looks like this: (it is called myGalleryPictureTpl)

            <li>
               <a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="lightbox[image[+maxigallery.pageinfo.id+]set]" title="[+maxigallery.picture.title:htmlent+] - [+maxigallery.picture.descr:htmlent+]">	
                  <img src="[+phx:input=`[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]`:phpthumb=`&h=100&w=100&zc=1&q=95`+]" class="thumbnail" title="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" alt="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" />
               </a>
               <p style="width: [+maxigallery.picture_width_thumb+]px;">
                  [+maxigallery.picture.title:htmlent+]
               </p>
            </li>


            The maxigallery callout is as follows:

            [!MaxiGallery? &galleryPictureTpl=`myGalleryPictureTpl` &display=`embedded` &embedtype=`slimbox` &max_pic_size=`500` &quality_pic=`100` &max_thumb_size=`80` &quality_thumb=`100` &pics_per_page=`16`!]


            The phxthumb is as follows: (it is called phx:phpthumb)

            <?php
            $output = '[(base_url)/assets/snippets/phpthumb/phpThumb.php?src=' . $output . $options;
            return str_replace('&', '&', $output);
            ?>


            Really sorry for this still not beng resolved. Feels like its been going on for ages. Thanks for all your help so far. Hopefully this is close to being resolved.
              • 25260
              • 156 Posts
              Quote from: One_PHANTOM at Nov 03, 2009, 01:53 PM

              <?php
              $output = '[(base_url)/assets/snippets/phpthumb/phpThumb.php?src=' . $output . $options;
              return str_replace('&', '&', $output);
              ?>


              I think you are just missing a ] and a useless / it’s there

              $output = ’[(base_url)]assets/snippets/phpthumb/phpThumb.php?src=’ . $output . $options;
                • 25260
                • 156 Posts
                Quote from: Roberto at Nov 03, 2009, 01:20 PM

                I’m also getting the "does (doze tongue) not exist" thing, but I’m sure that images exist, because if I remove the phx thing everything is working.

                What should I do? sad

                Cheers,

                Roberto

                I quote myself to say that on the demo page pictures #5, #53 and the second one of #pathinfo are working, the rest are not. Can I deduce that is a path issue?
                  • 22253
                  • 54 Posts
                  Quote from: Roberto at Nov 03, 2009, 02:10 PM

                  Quote from: One_PHANTOM at Nov 03, 2009, 01:53 PM

                  <?php
                  $output = '[(base_url)/assets/snippets/phpthumb/phpThumb.php?src=' . $output . $options;
                  return str_replace('&', '&', $output);
                  ?>


                  I think you are just missing a ] and a useless / it’s there

                  $output = ’[(base_url)]assets/snippets/phpthumb/phpThumb.php?src=’ . $output . $options;

                  Oh my god! Thank you so much. That was it. I kept replacing this code with the code posted here previously but there must have been a slight typo and not having a clue what any of it means, I didn’t notice. What with that and my phpthumb not being installed properly as discovered by Doze this was turning into a right nightmare.

                  Now I just need to work out the parameters of phpthumb! smiley

                  Thanks again for everyones help on this. Really appreciate it. laugh
                    • 7923
                    • 4,213 Posts
                    @Roberto:

                    Don’t care about the phpthumb demo page.. it shouldn’t work after a normal phpThumb installation as the demo images are not part of the installation.

                    You can test phpThumb by writing a url like this to your browser location bar:

                    http://<modxaddress>/assets/snippets/phpthumb/phpThumb.php?src=<modxbaseurl>/assets/galleries/<docid>/<imagefile>&h=50&w=50&zc=1&q=95


                    Where:

                    <modxaddress> = url to your modx installation
                    <modxbaseurl> = path where modx is installed if not in your web server doc root
                    <docid> = some maxigallery document id
                    <imagefile> = some maxigallery image filename

                    for example (where modx is installed in a subfolder called "modx"):
                    http://www.mydomain.com/modx/assets/snippets/phpthumb/phpThumb.php?src=/modx/assets/galleries/25/waterfall.jpg&h=50&w=50&zc=1&q=95


                    If that returns a square image 50px by 50px, phpThumb works and the problem is in your maxigallery template chunk. If it doesn’t return a picture, phpThumb should return an error picture saying what the problem is.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 25260
                      • 156 Posts
                      Tomorrow I’ll test wink

                      Thanks