From 4d256fbcfca06d07e5fc772cf83a2590e9c7cd44 Mon Sep 17 00:00:00 2001 From: Bruno21 Date: Fri, 14 Feb 2025 08:14:11 +0100 Subject: [PATCH] maps.php -correction mauvais chemin des vignettes -correction affichage desciption dans la lightbox --- functions.php | 4 ++- maps.php | 71 +++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 55 insertions(+), 20 deletions(-) diff --git a/functions.php b/functions.php index 1df8571..66c5a13 100644 --- a/functions.php +++ b/functions.php @@ -268,8 +268,10 @@ function create_thumb($thumb_w, $thumb_h, $image) { */ function in_bdd($image) { + global $base; + try { - $conn3 = new PDO('sqlite:../db_photo.sqlite3'); + $conn3 = new PDO("sqlite:$base"); #$query3 = "SELECT filename FROM photos WHERE instr(filename, '". $file . "') > 0;"; $query3 = "SELECT filename FROM photos WHERE filename = :filename"; $stmt = $conn3->prepare($query3); diff --git a/maps.php b/maps.php index 78ce510..4969c82 100644 --- a/maps.php +++ b/maps.php @@ -6,6 +6,10 @@ $domain = 'sentier'; localize($domain); */ include 'functions.php'; + +$base = 'db_photo.sqlite3'; +$chemin = 'photos/img/'; +$chemin_thumb = str_replace("img", "thumb", $chemin); ?> @@ -54,7 +58,7 @@ include 'functions.php'; prepare($query4); @@ -119,7 +123,8 @@ include 'functions.php'; $lb = data_for_lightbox($result[$i]); - $b .= '[\'

' . htmlspecialchars($lb['title_thumb'], ENT_QUOTES) . '

' . htmlspecialchars($lb['title'], ENT_QUOTES) . '

' . htmlspecialchars($lb['legende'], ENT_QUOTES) . '

' . htmlspecialchars($lb['keywords'], ENT_QUOTES) . '

\'],' . "\r\n"; + //$b .= '[\'

' . htmlspecialchars($lb['title_thumb'], ENT_QUOTES) . '

' . htmlspecialchars($lb['title']) . '

' . htmlspecialchars($lb['title'], ENT_QUOTES) . '

' . htmlspecialchars($lb['legende'], ENT_QUOTES) . '

' . htmlspecialchars($lb['keywords'], ENT_QUOTES) . '

\'],' . "\r\n"; + $b .= '[\'

' . htmlspecialchars($lb['title_thumb'], ENT_QUOTES) . '

' . htmlspecialchars($lb['title']) . '

' . htmlspecialchars($lb['title'], ENT_QUOTES) . '

' . htmlspecialchars($lb['legende'], ENT_QUOTES) . '

' . htmlspecialchars($lb['keywords'], ENT_QUOTES) . '

\'],' . "\r\n"; } $b = substr_replace($b, '', -3, 1); echo $b; @@ -174,23 +179,51 @@ include 'functions.php'; $(document).ready(function() { var $obj = lc_lightbox('.gm_thumb a', { - img_zoom : true, - open_close_time : 200, - ol_time_diff : 100, - wrap_class : 'lcl_zoomin_oc', - skin : 'minimal', // minimal | light | dark - data_position : 'over', - cmd_position : 'inner', - txt_hidden : false, - //shox_title : true, // s'il faut afficher les titres - show_descr : false, // s'il faut afficher les descriptions - //show_author : true, // s'il faut afficher les auteurs - fullscreen : true, - fs_img_behavior : 'smart', - fs_only : 500, - browser_fs_mode : true, - txt_toggle_cmd : true, - rclick_prevent : true, + + img_zoom : true, // whether to enable zooming system + author_by_txt : '', // which text is used before the author name, by default is "by" + + slideshow : true, // whether to enable slideshow + open_close_time : 200, // durée de l'animation pour l'ouverture et la fermeture de la lightbox + ol_time_diff : 100, // animation de superposition avance (à l'ouverture) et retard (à la fermeture) à la fenêtre + fading_time : 50, // durée de l'animation de fondu des éléments + animation_time : 100, + slideshow_time : 4000, // durée de l'intervalle du diaporama + autoplay : false, // autoplay slideshow - bool + counter : false, // s'il faut afficher le compteur d'éléments + progressbar : false, // s'il faut afficher une barre de progression lors de l'exécution du diaporama + + max_width : '95%', // largeur maximale de la lightbox + max_height : '95%', // hauteur maximale de la lightbox + ol_opacity : 0.7, // overlay opacity / value between 0 and 1 + ol_color : '#111', // background color of the overlay + ol_pattern : false, // overlay patterns - insert the pattern name or false + + wrap_class : 'lcl_fade_oc', // Classes personnalisées ajoutées au wrapper: effet à l'ouverture de la lb (lcl_fade_oc | lcl_zoomin_oc | lcl_rtl_oc) + skin : 'minimal', // minimal | light | dark + data_position : 'over', // Spécifie où les données des éléments seront affichées. Les modes disponibles sont :over, under|rside|lside + cmd_position : 'inner', // Déclare où les commandes doivent être affichées : inner|outer + ins_close_pos : 'normal', // set closing button position for inner commands - normal/corner + nav_btn_pos : 'normal', // Régle les flèches et la position de lecture/pause. Options disponibles: normal|middle + + txt_hidden : true, // whether to hide texts on lightbox opening - bool or int (related to browser's smaller side) + shox_title : true, // s'il faut afficher les titres + show_descr : true, // s'il faut afficher les descriptions + show_author : true, // s'il faut afficher les auteurs + + thumbs_nav : false, // permet la navigation par vignettes (nécessite des éléments affiche ou images) + + fullscreen : true, // Autoriser ou non le mode plein écran + fs_img_behavior : 'smart', //Comportement de l'image en plein écran : fit|fill|smart + fs_only : 500, // s'il faut utiliser uniquement l'ouverture de la lightbox en mode plein écran (utile pour les appareils mobiles) : false | (integer) + browser_fs_mode : true, // utiliser ou non le mode plein écran du navigateur + + txt_toggle_cmd : true, // s'il faut afficher le bouton de basculement du texte de l'élément + download : true, // whether to show element's file download button + autoplay_videos : false, // bool / whether to autoplay videos (NB: modern browsers ignore this for deeplinked elements. Not applied if video has poster) + touchswipe : true, // permet les interactions tactiles (nécessite AlloyFinger) + rclick_prevent : true, // s'il faut éviter le clic droit sur les éléments de la lightbox + }); });