🌍
English
This shows you the differences between two versions of the page.
dev:changes_in_2.10 [2023/05/01 17:36] plg removed |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Technical changes in Piwigo 2.10 ====== | ||
- | ===== No more include for comment_list.tpl ===== | ||
- | |||
- | In templates ''%%comments.tpl%%'' and ''%%picture.tpl%%'' we have replaced: | ||
- | |||
- | <code html> | ||
- | {include file='comment_list.tpl' comment_derivative_params=$derivative_params} | ||
- | </code> | ||
- | |||
- | by | ||
- | |||
- | <code html> | ||
- | {if isset($COMMENT_LIST)} | ||
- | {$COMMENT_LIST} | ||
- | {else} | ||
- | {include file='comment_list.tpl' comment_derivative_params=$derivative_params} | ||
- | {/if} | ||
- | </code> | ||
- | |||
- | All themes with a custom ''%%comments.tpl%%'' or ''%%picture.tpl%%'' should apply the same change. | ||
- | |||
- | ===== New badges for number of photos ===== | ||
- | |||
- | In index.tpl, in the H2 (breadcrumbs) the number of photos of the current section is no longer in the $TITLE template variable, but provided separately in $NB_ITEMS. You need to update your index.tpl (if not using the default theme one). Replace: | ||
- | |||
- | <code html><h2>{$TITLE}</h2></code> | ||
- | by | ||
- | <code html> | ||
- | <h2>{$TITLE} {if $NB_ITEMS > 0}<span class="badge nb_items">{$NB_ITEMS}</span>{/if}</h2> | ||
- | </code> | ||
- | |||
- | To replace the aspect of badges (actually between brackets), you can add in your theme.css: | ||
- | |||
- | <code css> | ||
- | .badge { | ||
- | background-color: #808080; | ||
- | color: black; | ||
- | padding: 1px 5px; | ||
- | border-radius: 10px; | ||
- | font-size: 10px; | ||
- | } | ||
- | |||
- | .badge:before | ||
- | { | ||
- | content : ''; | ||
- | } | ||
- | |||
- | .badge:after | ||
- | { | ||
- | content : ''; | ||
- | } | ||
- | |||
- | dl#mbCategories li { | ||
- | margin-top: 3px ; | ||
- | margin-bottom: 3px; | ||
- | } | ||
- | </code> | ||
- | |||
- | ===== New triggers ===== | ||
- | |||
- | <code php> | ||
- | trigger_notify("delete_tags", $tag_ids); | ||
- | trigger_notify('delete_group', $groupids); | ||
- | </code> | ||
- | |||
- | ===== New methods for web API ===== | ||
- | |||
- | * pwg.images.setMd5sum | ||
- | * pwg.categories.setRank | ||
- | * pwg.users.favorites.add | ||
- | * pwg.users.favorites.remove | ||
- | * pwg.users.favorites.getList | ||
- | |||
- | ===== INSERT IGNORE with single_insert ===== | ||
- | |||
- | The **single_insert** function now can perform an **INSERT IGNORE** (just like mass_inserts) : | ||
- | |||
- | <code php>single_insert($table_name, $data, array('ignore' => true));</code> |