We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15914
    • 145 Posts
    I’ve combined Lightbox JS with phpThumb. You can see a working example on the product pages at this URL: http://www.limehost.net/

    Please read the attached [tt]readme.txt[/tt] before installing. One core file gets replaced, but don’t worry it’s just bug fixes found on this post.

    This only works if MODx is in your root directory. All paths are [tt]/assets/[/tt], etc. I will sort this in a later version.

    You must make sure [tt]/assets/snippets/phpThumb/cache/[/tt] is writeable too.
      Kunal Kapoor
      Technical Director
      Limesharp Internet Limited - Effective, Functional, Standards Compliant

      IRC Nick: KingKoopa
      Skype ID: KingKoopa16
      • 25317
      • 122 Posts
      Kewl  grin

      Just found a bug on the demo site, try removing a product from the shopping cart. Parse error results.

      « Execution of a query to the database failed - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?action=delete ) AND (sc.privateweb=0) LIMIT 1' at line 4 »
      SQL: SELECT sc.parent FROM `web18_modx`.modx_site_content sc LEFT JOIN `web18_modx`.modx_document_groups dg on dg.document = sc.id WHERE (sc.id=8?action=delete ) AND (sc.privateweb=0) LIMIT 1 
        • 15914
        • 145 Posts
        Thanks Robsta,

        That was a slight issue that I forgot to fix on that script. Luckily I sorted that before it went live for a customer.
          Kunal Kapoor
          Technical Director
          Limesharp Internet Limited - Effective, Functional, Standards Compliant

          IRC Nick: KingKoopa
          Skype ID: KingKoopa16
          • 32241
          • 1,495 Posts
          phpThumb looks really promising, but one thing that concern me though, will it have performance problem? Imagine if a photo album having 3 different sizes of image. SO when the user upload the image, it will be resize to that 3 different sizes and safed on a disk, so later when the visitor visit the photo album, they will directly fetch all images directly from the disk. While in phpThumb case, if 100 visitors visiting the photo album, it needs to use processing power that requires 100 times more than generating a thumbnail first during uploading the picture.

          It’s just a thought though, I think resizing the image first will be much better in terms of performance wise. Can we use phpThumb to do that? I mean by using the API to generate the thumbnail.
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 15914
            • 145 Posts
            It stores a cache if that’s what you mean?

            When phpThumb first resizes an image, it caches it in [tt]/assets/snippets/phpThumb/cache/[/tt]. Any subsequent calls from phpThumb to that image, it calls the cached file instead. Is that what you mean Wendy?

            Oh, by the way, I forgot to mention: you must make sure that [tt]/assets/snippets/phpThumb/cache/[/tt] is writeable.
              Kunal Kapoor
              Technical Director
              Limesharp Internet Limited - Effective, Functional, Standards Compliant

              IRC Nick: KingKoopa
              Skype ID: KingKoopa16
              • 32241
              • 1,495 Posts
              Hey Kunal, that will solve the problem of course. If that’s what phpThumb do, then it will works just fine. Thanks for telling me that, and pardon me for commenting out the system without knowing the full features that this thing offer.
                Wendy Novianto
                [font=Verdana]PT DJAMOER Technology Media
                [font=Verdana]Xituz Media
                • 15914
                • 145 Posts
                No worries Wendy. I hope that someone would find this useful. I’ve used it on two sites so far without any issues. phpThumb does all sorts from watermarking, to cropping, and even blurring images. I need to expand my snippet to use all of these functions. There’s not enough hours in the day I tell you.
                  Kunal Kapoor
                  Technical Director
                  Limesharp Internet Limited - Effective, Functional, Standards Compliant

                  IRC Nick: KingKoopa
                  Skype ID: KingKoopa16
                  • 26435
                  • 1,193 Posts
                  OK, I am a little confused.
                  I followed the directions in the post, creating the TV, snippet, and replacing the parser, but I am not sure how to call the image. I put "[[lightboxImage? &width=`100` &height=`100`]]" in the content of the page, but it gives me a blank page. I tried putting the URL to the image in the "Description" field of the TV, and also the path to the image, because the instructions said:


                  Description: This is the image you wish to appear in the Lightbox.

                  I love how this works on your site, but I don’t think I know enough about how this works yet to get it to work on my site. Any help is appreciated.

                  -sD-
                  scotty Delicious
                    Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                    All of the above... in no specific order.


                    I send pointless little messages
                    • 4095
                    • 372 Posts
                    Quote from: Kunal at Mar 02, 2006, 09:02 AM

                    No worries Wendy. I hope that someone would find this useful. I’ve used it on two sites so far without any issues. phpThumb does all sorts from watermarking, to cropping, and even blurring images. I need to expand my snippet to use all of these functions. There’s not enough hours in the day I tell you.

                    FYI, Product 1 on your site doesn’t work for me. The screen goes dark, the loading bar comes up and thats it (even left it for 10+ mins in the background)
                    http://www.limehost.net/index.php?id=7

                    However product 2 works perfectly smiley
                      [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
                      Admin Sandbox Login: sandbox Password: castle
                      • 15914
                      • 145 Posts
                      Quote from: ScottyDelicious at Mar 02, 2006, 02:14 PM

                      OK, I am a little confused.
                      I followed the directions in the post, creating the TV, snippet, and replacing the parser, but I am not sure how to call the image. I put "[[lightboxImage? &width=`100` &height=`100`]]" in the content of the page, but it gives me a blank page. I tried putting the URL to the image in the "Description" field of the TV, and also the path to the image, because the instructions said:


                      Description: This is the image you wish to appear in the Lightbox.

                      I love how this works on your site, but I don’t think I know enough about how this works yet to get it to work on my site. Any help is appreciated.

                      -sD-
                      scotty Delicious

                      Sorry... when you have created the TV and assigned it to a template, you then go to edit any document which uses that template. You’ll see underneath your Document Content edit box, a Lightbox Image box with an Insert button next to it. Use this to select the image you would like to use. (I then put that [tt][[lightboxImage]][/tt] snippet call inside my template somewhere. But you can just as well place it in your document content.)

                      I hope that makes it clearer. Do let me know.

                      Quote from: Briggsy at Mar 02, 2006, 02:33 PM

                      Quote from: Kunal at Mar 02, 2006, 09:02 AM

                      No worries Wendy. I hope that someone would find this useful. I’ve used it on two sites so far without any issues. phpThumb does all sorts from watermarking, to cropping, and even blurring images. I need to expand my snippet to use all of these functions. There’s not enough hours in the day I tell you.

                      FYI, Product 1 on your site doesn’t work for me. The screen goes dark, the loading bar comes up and thats it (even left it for 10+ mins in the background)
                      http://www.limehost.net/index.php?id=7

                      However product 2 works perfectly smiley

                      I cannot replicate this. Both products seem to work for me. Does anyone else have that issue?
                        Kunal Kapoor
                        Technical Director
                        Limesharp Internet Limited - Effective, Functional, Standards Compliant

                        IRC Nick: KingKoopa
                        Skype ID: KingKoopa16