diff --git a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php index 299cf9ae..e4feaf3e 100644 --- a/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php +++ b/plugins/serendipity_event_nl2br/serendipity_event_nl2br.php @@ -1,4 +1,4 @@ -add('description', PLUGIN_EVENT_NL2BR_DESC); $propbag->add('stackable', false); $propbag->add('author', 'Serendipity Team'); - $propbag->add('version', '2.12'); + $propbag->add('version', '2.13'); $propbag->add('requirements', array( 'serendipity' => '0.8', 'smarty' => '2.6.7', @@ -22,10 +22,10 @@ class serendipity_event_nl2br extends serendipity_event )); $propbag->add('cachable_events', array('frontend_display' => true)); - $propbag->add('event_hooks', array('frontend_display' => true, - 'backend_display' => true, - 'css' => true) - ); + $propbag->add('event_hooks', array('frontend_display' => true, + 'backend_configure' => true, + 'css' => true + )); $propbag->add('groups', array('MARKUP')); $this->markup_elements = array( @@ -243,14 +243,18 @@ class serendipity_event_nl2br extends serendipity_event return true; break; - case 'backend_display': - /* - // create some buttons + case 'backend_configure': + + // check single entry for temporary disabled markups if( $isobr ) { - // ToDo: hook into default/admin/entries.tpl somehow via the Heart Of Gold = serendipity_printEntryForm() before! it is loaded + if (!is_object($serendipity['smarty'])) { + serendipity_smarty_init(); // if not set to avoid member function assign() on a non-object error, start Smarty templating + } + + // hook into default/admin/entries.tpl somehow via the Heart Of Gold = serendipity_printEntryForm() before! it is loaded $serendipity['smarty']->assign('iso2br', true); } - */ + return true; break; diff --git a/templates/default/admin/entries.tpl b/templates/default/admin/entries.tpl index 6f4851e9..f34944cd 100644 --- a/templates/default/admin/entries.tpl +++ b/templates/default/admin/entries.tpl @@ -4,7 +4,6 @@
{$entry_vars.errMsg}
{/if} {*** POSSIBLE ERROR MESSAGES END ***} - {*** MAIN ENTRY FORM START ***}
{$entry_vars.hidden} @@ -89,6 +88,7 @@ {if $entry_vars.wysiwyg_advanced} {else} {/if} {serendipity_hookPlugin hook="backend_entry_toolbar_body" data=$entry_data.entry hookAll="true"} @@ -157,6 +158,7 @@ {if NOT $entry_vars.wysiwyg}