Updated Technical changes in Piwigo 13 (markdown)

MatthieuLP
2022-08-29 15:04:53 +02:00
parent ec32f07d36
commit 74fa2c3276
+7 -9
@@ -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.