Report#54: Welcome Box: use BBcode
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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", "<br />", $portal_config['portal_welcome_intro']),
|
||||
));
|
||||
include($phpbb_root_path . 'portal/block/welcome.'.$phpEx);
|
||||
}
|
||||
|
||||
if ($portal_config['portal_welcome_guest'])
|
||||
|
||||
47
root/portal/block/welcome.php
Normal file
47
root/portal/block/welcome.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package - Board3portal
|
||||
* @version $Id$
|
||||
* @copyright (c) kevin / saint ( http://www.board3.de/ ), (c) Ice, (c) nickvergessen ( http://www.flying-bits.org/ ), (c) redbull254 ( http://www.digitalfotografie-foren.de )
|
||||
* @based on: phpBB3 Portal by Sevdin Filiz, www.phpbb3portal.com
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('IN_PORTAL'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
$allow_bbcode = 1;
|
||||
$allow_urls = 1;
|
||||
$allow_smilies = 1;
|
||||
|
||||
$text = $portal_config['portal_welcome_intro'];
|
||||
|
||||
$message_parser = new parse_message($text);
|
||||
$message_parser->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,
|
||||
));
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user