1
0

suggested fix for the Serendipity fallback chaining

This fixes the plugin tpl fallback for all plugins, already using the parseTemplate() method. All others, which may still follow the themes fallback (like contactform etc), would need to always be part of the user template $serendipity['template'], or be fixed later on.

This also fixes the backend chaining, which now simply follows the force with a possible engine and then uses $serendipity['template_backend'] (2k11), $serendipity['defaultTemplate'] (2k11), 'default'.

As a third, this now uses the correct preview_iframe.tpl file on save and checks for a correct set jquery_backend.js in the user theme $serendipity['template'].

Please double check this approach for cases I did not find yet. Thanks! :)


References #343
This commit is contained in:
Ian
2015-08-16 18:05:59 +02:00
parent 6b9f08a1fe
commit d5eae21a9c
4 changed files with 27 additions and 20 deletions

View File

@ -144,7 +144,9 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
$template_vars['entry_template'] = serendipity_getTemplateFile('admin/entries.tpl', 'serendipityPath');
serendipity_smarty_init();
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
$serendipity['smarty']->registerPlugin('modifier', 'emit_htmlarea_code', 'serendipity_emit_htmlarea_code');
$serendipity['smarty']->assign('admin_view', 'entryform');
serendipity_plugin_api::hook_event('backend_entryform_smarty', $template_vars);
@ -153,7 +155,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
}
function serendipity_emit_htmlarea_code($item, $jsname, $spawnMulti = false) {
# init == true when already editor was already initialized
# init == true when editor was already initialized
static $init = false;
global $serendipity;