From 35086dbd0ad8f13b34ac4c0c9499299a74ae69e2 Mon Sep 17 00:00:00 2001 From: Bruno 21 Date: Sat, 17 Aug 2019 16:50:01 +0200 Subject: [PATCH] Reinstall silverbook --- functions.php | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/functions.php b/functions.php index b9270d9..319e20e 100755 --- a/functions.php +++ b/functions.php @@ -490,6 +490,55 @@ function displayRetina ($file,$album) { } +/* SHORTCODE: Images sur Zenphoto */ + +function zenphoto_handler($atts) { + + //utilise le cacheManager de zenphoto (extensions/utilitaires/cacheManager) + // ** Utilisation ** + // [zenphoto album="lievres" image="2008-08-18_Lievre_8927.jpg"] + // [zenphoto album="sports-mecaniques/gp-france" image="2010-05-23_gp-france-2010_5321.jpg"] + // [zenphoto album="lievres"] + // + //taille des photos dans Worpress, theme Twenty Ten Child : 610x406 + + /* + $selector = dess_setting('dess_lightbox_select'); + $zenphoto_url = dess_setting('dess_zenphoto'); + $size = dess_setting('dess_zp_size'); + */ + + preprint($atts); + + + //require_once($_SERVER['DOCUMENT_ROOT'].'/Connections/cnx.php'); + + $selector = "meow-lightbox"; + //$zenphoto_url = "https://silverbook.local/zenphoto/"; + $zenphoto_url = "https://" . $_SERVER["SERVER_NAME"] . "/zenphoto/"; + $size = 800; + + $album = ! empty( $atts['album'] ) ? $atts['album'] : ''; + $album = filter_var($album, FILTER_SANITIZE_STRING); + + $image = ! empty( $atts['image'] ) ? $atts['image'] : ''; + $image = filter_var($image, FILTER_SANITIZE_STRING); + + $caption = ! empty( $atts['caption'] ) ? $atts['caption'] : ''; + $caption = filter_var($caption, FILTER_SANITIZE_STRING); + + $rnd = rand (1000, 9999); + + //$size = 610; + + $folder = false; + $zenphoto_img = ""; + + + return $zenphoto_img; +} +add_shortcode( 'zenphoto', 'zenphoto_handler' ); + /* *functions.php - displayRetina() displayRetina()