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.