Viewing an image incorrectly marks the prior and next images as viewed

  • When I view one image, as long as there is an image before it and after it, Joomgallery marks all three images as viewed.


    You can see what I mean if you select any image from any of my galleries at https://disney.dansmith.ca. Go to the Album view and select any page, then click on an image and then click on the detail view. The image will open in a Slimbox window. Then go back to the page view and look at the number of hits (views) below each image. Each image will show it had '1' view, even though I only viewed the middle image, therefore causing inaccurate viewing statistics.


    This has been an ongoing problem with many prior versions and I believe is a bug that I'm hoping can be fixed in subsequent versions.


    Is anyone aware of this? I posted on this very issue a few years ago and I don't think got a definitive response on if/when it was going to be fixed, or even acknowledgement that it was an issue.


    I love Joomgallery... I've got several websites going with a lot of images! Many thanks for your consideration!

  • dan40

    Hat den Titel des Themas von „Viewing an image marks the prior and next images as viewed“ zu „Viewing an image incorrectly marks the prior and next images as viewed“ geändert.
    • Offizieller Beitrag

    Ok, I looked into that. The problem is the following:

    Everytime an image which is not the thumbnail image is requested from the frontend using the view=image and format=raw the views are counted up.

    As you can see in the network log of the browser, the slimbox is requesting the image plus the previous and the next image. That is why all three images get a new view even if only one image is really viewed by the user.


    The code line responsible for that is the following:
    https://github.com/JoomGallery…s/image/view.raw.php#L192


    I dont really see a possibility to change that behavior. From my point of view slimbox is doing wrong by requesting the other two images. My proposition is to use another Popup-Plugin which does not do that misbehavior.

  • Thanks for that, I've just installed and enabled Fancybox and Shadowbox and went to view an image, and both of these plugins exhibit the same behaviour. Can the code in Joomgallery be adjusted so that it doesn't do this? I only viewed the centre image.



    The attached example shows what's happening with Shadowbox.


    EDIT: Highslide JS, DHTML Container, JavaScript Window and Thickbox 3 do not do this. Lightbox 2, Shadowbox, Slimbox and Prettyphoto do. Fancybox, when I click on an image, marks that image, the next one and the third images as viewed.

    • Offizieller Beitrag

    Can the code in Joomgallery be adjusted so that it doesn't do this?

    As said, the code of the popup plugin needs to be changed such that only this image is really loaded by the javascript. The code of the JoomGallery component behaves correctly in my opinion.

  • Thanks very much for your timely responses. Much appreciated. I'll just use Highslide JS for my image pop-up handler going forward, until a new version of the others is released.