From 74fa2c3276e22490c166039af25f8ed85ea8b63a Mon Sep 17 00:00:00 2001 From: MatthieuLP <60923356+MatthieuLP@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:04:53 +0200 Subject: [PATCH] Updated Technical changes in Piwigo 13 (markdown) --- Technical-changes-in-Piwigo-13.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Technical-changes-in-Piwigo-13.md b/Technical-changes-in-Piwigo-13.md index 62cb1b8..ecb374f 100644 --- a/Technical-changes-in-Piwigo-13.md +++ b/Technical-changes-in-Piwigo-13.md @@ -39,30 +39,28 @@ window.onload = function(e){ As we added SVG support in Piwigo gallery, this change will affect custom themes. If theme developers also want to support SVG files, they will need to add this condition to their modified ```picture_content.tpl``` file. ``` -{if $current.is_svg}src="{$current.path}" +{if {$current.path_ext} == 'svg'}src="{$current.path}" ``` This is necessary if you modified the default ```picture_content.tpl``` file for your theme otherwise, if your theme inherits the default theme, you can leave it as it is. -See this [commit](https://github.com/Piwigo/Piwigo/commit/c4c950c1c841c2bb8e932d6fee8febdb841bcd4f) as an example of what we did for the default theme. - -The same is true for navigation buttons in the gallery if your next picture is an SVG, it needs to be displayed properly. - For the previous image you'll need to add the following condition ``` -{if $previous.is_svg}{$previous.path} +{if {$previous.path_ext} == 'svg'}{$previous.path} ``` And add a class to the img using ``` -class="{if $previous.is_svg}svgImg{/if}" +class="{if {$previous.path_ext} == 'svg'}svgImg{/if}" ``` Same for the next image. ``` -{if $next.is_svg}{$next.path} +{if {$next.path_ext} == 'svg'}{$next.path} ``` And add a class to the img using ``` -class="{if $next.is_svg}svgImg{/if}" +class="{if {$next.path_ext} == 'svg'}svgImg{/if}" ``` +We implemented the following classes to support SVG but also any other formats : ```file-ext-{{the file extention}}``` and ```path-ext-{{the file's path extention}}```. These will be used to custom the gallery if needed. + We also ask our plugin developers to verify their plugins if they add modification to the pictures visualization in the gallery. \ No newline at end of file