[Photoswipe] Multiples comptages pour 1 clic
Bonjour,
Je me sers de photoswipe pour afficher une galerie
Photoswipe fonctionne bien évidemment mais dans le href d'une image, je fais appel à un module php qui met à jour le nombre de clics.
J'ai mis en place une trace dans ce module et pour 1 clic sur une photo il enregistre un clic sur 4 photos...
Si quelqu'un peut m'éclairer, merci d'avance
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| echo'<div class="pswp-gallery" id=gallery style="max-width: 1100px; margin: 0 auto; padding: 0 14px;">';
affichage_caches(0, $poslecture);
while ($data_photos=mysqli_fetch_assoc($req_photos)) {
$inb++;
$style=init_style_li($d_images.$data_photos['photo']);
$cls="";
if (NavDetectSmartPhone())
$cls=' class="tngallery"';
echo'<a href="afficher_image.php?img='.$data_photos['photo'].'"'.$style.' target="_blank" title="'.$data_photos['photo'].'">
<img'.$cls.' src="'.$d_miniat.'tn_'.$data_photos['photo'].'" alt="'.$data_photos['photo'].'"></a>';
}
affichage_caches($poslecture+$inb, $_SESSION['nb_photos']);
echo'</div>'; |