Table of Contents
Piwigo standard pages
The standard pages theme was created to be able to have common templates for certain pages no matter the theme set for each user (currently: login, register and forgotten password). To implement these pages in a theme, you need to add 'use_standard_pages' => true to the $themeconf array that should be in themeconf.inc.php. This forces the use of these templates even if the webmaster hasn't checked the configuration via the adminstration. The advantage to using these templates means you don't have to reimplement them in your theme.
For example
$themeconf = array(
'name' => 'default',
'icon_dir' => 'themes/default/icon',
'img_dir' => 'themes/default/images',
'mime_icon_dir' => 'themes/default/icon/mimetypes/',
'local_head' => 'local_head.tpl',
'use_standard_pages' => true
);
Moving save buttons to bottom bar
The save buttons on all piwigo admin pages have been moved to a bar at the bottom of the page. To replicate this here is the base html used for the save buttons, this is put inside the <form> element of the page:
<div class="savebar-footer">
<div class="savebar-footer-start">
</div>
<div class="savebar-footer-end">
{if isset($save_success)}
<div class="savebar-footer-block">
<div class="badge info-message">
<i class="icon-ok"></i>{$save_success}
</div>
</div>
{/if}
<div class="savebar-footer-block">
<button class="buttonLike" type="submit" name="submit"><i class="icon-floppy"></i> {'Save Settings'|@translate}</button>
</div>
</div>
</div>
in the div savebar-footer-start other elements can be added like a secondary button, each element uses a div called savebar-footer-block
<div class="savebar-footer-start">
<div class="savebar-footer-block">
{if isset($U_JUMPTO)}
<a class="savebar-see-out" href="{$U_JUMPTO}" ><i class="icon-left-open"></i>{'Open in gallery'|@translate}</a>
{else}
<a class="savebar-see-out tiptip disabled" href="#" title="{'You don\'t have access to this photo'|translate}"><i class="icon-left-open"></i>{'Open in gallery'|translate}</a>
{/if}
</div>
</div>
For the success message, the changes need to be made in the php file, from this:
$page['infos'][] = l10n('Your configuration settings are saved');
To this:
$template->assign(
array(
'save_success' => l10n('Your configuration settings are saved'),
)
);
API Key
You can find more details on our github wiki.
Smarty 5
On foreach the item= and key= parameters must be followed by varialbe_name, not $variable_name. Replace:
{foreach from=$items item=$item key=$key}
by
{foreach from=$items item=item key=key}
For more details on changes, check the official guide: Upgrading from v4 to v5