This is an old revision of the document!
Jquery ui effects filename have changed. For example change
footer|combine_script require='jquery.effects.blind'
to
footer|combine_script require='jquery.ui.effect-blind'
We had backward naming compatibility for 2.5 but not for 2.6.
the file admin/themes/default/uplodify.jgrowl.css was moved to themes/default/js/plugins/jquery.jgrowl.css
use this line to include the file in your template :
{combine_css path="themes/default/js/plugins/jquery.jgrowl.css"}
no changes for the javascript file
Following http://piwigo.org/doc/doku.php?id=dev:changes_in_2.5#add_action_buttons
Themes have to handle two new template vars : $PLUGIN_INDEX_BUTTONS and $PLUGIN_PICTURE_BUTTONS
Plugins creators SHOULD NOT add <li> or <div> or <span> around their buttons, it's now handled by the theme.
TokenInput CSS was moved from admin/themes/default/style.css to themes/default/js/plugins/jquery.tokeninput.css. Needs to be explicitly imported with
{combine_css path="themes/default/js/plugins/jquery.tokeninput.css"}
allowCreation parameter was renamed into allowFreeTagging
SwitchBox are used for derivatives choices, sort options, LanguageSwitch, ThemeSwitch, etc.
Now the JS code is factorized in a function available in themes/default/js/switchbox.js
Usage :
{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'} {footer_script require='core.switchbox'}(SwitchBox=window.SwitchBox||[]).push("#sortOrderLink", "#sortOrderBox");{/footer_script}
The CSS is still provided by themes.
In template/menubar_categories.tpl, replace:
{'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
by
{'</ul></li>'|@str_repeat:($ref_level-$cat.LEVEL)}
Added a function translate_dec, replace:
{$pwg->l10n_dec('singular string', 'plural string', $value)}
by
{$value|@translate_dec:'singular string':'plural string'}
Many plugins add a new public page to Piwigo. Lacking of a documented way to do it, everybody was using his own method, causing display issues with some themes.
In Piwigo 2.6 we introduced a simple way to do it.
First define in loc_end_section_init trigger :
$page['body_id'] = 'whatever_you_want'; $page['is_external'] = true;
Then when you want to display the content of your page :
$template->set_filename('your_page', realpath(path to your template)); $template->assign_var_from_handle('CONTENT', 'your_page');
Check Skeleton plugin for complete example http://piwigo.org/svn/extensions/skeleton/trunk/include/public_events.inc.php
There a little modification of index.tpl : you need to add
{if !empty($CONTENT)}{$CONTENT}{/if}
in the main block of the page.