diff --git a/languages/de/mods/lang_portal_acp.php b/languages/de/mods/lang_portal_acp.php index fab4eb9e..9a6f9dd4 100644 --- a/languages/de/mods/lang_portal_acp.php +++ b/languages/de/mods/lang_portal_acp.php @@ -220,7 +220,7 @@ $lang = array_merge($lang, array( 'ACP_PORTAL_WELCOME_SETTINGS_EXPLAIN' => 'Hier kannst du die Einstellungen für die Willkommens Nachricht ändern.', 'PORTAL_WELCOME_INTRO' => 'Willkommens Nachricht', 'PORTAL_WELCOME_GUEST' => 'Willkommens Nachricht nur für Gäste?', - 'PORTAL_WELCOME_INTRO_EXPLAIN' => 'Ändere hier die Willkommens Nachricht (nur Text). Max. 600 Zeichen!', + 'PORTAL_WELCOME_INTRO_EXPLAIN' => 'Ändere hier die Willkommens Nachricht (BBCode ist erlaubt). Max. 600 Zeichen!', // ads 'ACP_PORTAL_ADS_INFO' => 'Werbung', diff --git a/root/language/en/mods/lang_portal_acp.php b/root/language/en/mods/lang_portal_acp.php index e82e3b69..29f6c42f 100644 --- a/root/language/en/mods/lang_portal_acp.php +++ b/root/language/en/mods/lang_portal_acp.php @@ -225,7 +225,7 @@ $lang = array_merge($lang, array( 'ACP_PORTAL_WELCOME_SETTINGS_EXPLAIN' => 'Here you can change welcome messages and certain specific options.', 'PORTAL_WELCOME_INTRO' => 'Welcome message', 'PORTAL_WELCOME_GUEST' => 'Welcome message only for guests?', - 'PORTAL_WELCOME_INTRO_EXPLAIN' => 'Change the welcome (plain text only). Max. 600 characters!', + 'PORTAL_WELCOME_INTRO_EXPLAIN' => 'Change the welcome message (BBCode is allowed). Max. 600 characters!', // minicalendar 'ACP_PORTAL_MINICALENDAR_INFO' => 'Mini calendar', diff --git a/root/portal.php b/root/portal.php index e33e00df..9439112f 100644 --- a/root/portal.php +++ b/root/portal.php @@ -75,10 +75,7 @@ if ( $load_center === TRUE ) if ($portal_config['portal_welcome']) { - $template->assign_vars(array( - 'S_DISPLAY_WELCOME' => true, - 'PORTAL_WELCOME_INTRO' => str_replace("\n", "
", $portal_config['portal_welcome_intro']), - )); + include($phpbb_root_path . 'portal/block/welcome.'.$phpEx); } if ($portal_config['portal_welcome_guest']) diff --git a/root/portal/block/welcome.php b/root/portal/block/welcome.php new file mode 100644 index 00000000..dcdf8af5 --- /dev/null +++ b/root/portal/block/welcome.php @@ -0,0 +1,47 @@ +parse($allow_bbcode, $allow_urls, $allow_smilies); + +$text = $message_parser->message; +$bbcode_uid = $message_parser->bbcode_uid; +$bbcode_bitfield = $message_parser->bbcode_bitfield; + +$bbcode = new bbcode(base64_encode($bbcode_bitfield)); +$text = censor_text($text); +$bbcode->bbcode_second_pass($text, $bbcode_uid, $bbcode_bitfield); +$text = bbcode_nl2br($text); +$text = smiley_text($text); + + $template->assign_vars(array( + 'S_DISPLAY_WELCOME' => true, + 'PORTAL_WELCOME_INTRO' => $text, + )); + +?> \ No newline at end of file