We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30107
    • 44 Posts
    Hi folks,

    I would like to integrate a Lightbox clone into modx. The thumbnail images which should use a Lightbox effect each get a class in TinyMCE, and a little javascript magic adds an "a" tag to these images. The "href" attribute points to a big size image. Here’s the problem: I need two images now. One thumbnail, which is automatically created by phpThumb (works already), and a second, bigger size image (how to get this?)

    phpThumb generates its images on the fly, when they are called the first time. It uses a hash in order to make it secure. This call is made on the server side.

    When I use JavaScript to call the bigger size image, this call is client side. The hash won’t be calculated, so no big size image will be created.

    I suppose a solution could be the following: I need some kind of plugin within modx which sits and waits for an image having the class "zoom". When such an image is detected, a bigger size image has to be calculated with phpThumb.

    I hope I made it clear... this problem is beyond my programming skills. I red the docs about plugins, but I don’t savvy :’(

    Maybe someone comes up with a better solution.
      • 26931
      • 2,314 Posts
      Hi there,

      have a look at the DirectResize plugin http://modxcms.com/forums/index.php/topic,19236
        • 30107
        • 44 Posts
        Quote from: sharkbait at Jan 22, 2010, 04:43 PM

        Hi there,

        have a look at the DirectResize plugin http://modxcms.com/forums/index.php/topic,19236

        Hi sharkbait,

        thank you very much! Seems to work on first sight. I’ll have to test it out, but it looks very promising.
        smiley