mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
fix preview of postings with embedded bbcode
git-svn-id: file:///svn/phpbb/trunk@4483 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
db2a73d2f0
commit
d8042fab7b
2 changed files with 4 additions and 5 deletions
|
@ -83,7 +83,7 @@ function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $
|
||||||
global $auth, $forum_id, $config, $censors, $user, $bbcode, $phpbb_root_path;
|
global $auth, $forum_id, $config, $censors, $user, $bbcode, $phpbb_root_path;
|
||||||
|
|
||||||
// Second parse bbcode here
|
// Second parse bbcode here
|
||||||
$message = $bbcode->bbcode_second_pass($message, $uid);
|
$bbcode->bbcode_second_pass($message, $uid);
|
||||||
|
|
||||||
// If we allow users to disable display of emoticons we'll need an appropriate
|
// If we allow users to disable display of emoticons we'll need an appropriate
|
||||||
// check and preg_replace here
|
// check and preg_replace here
|
||||||
|
@ -102,7 +102,7 @@ function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $
|
||||||
{
|
{
|
||||||
$signature = trim($signature);
|
$signature = trim($signature);
|
||||||
|
|
||||||
$signature = $bbcode->bbcode_second_pass($signature, $siguid);
|
$bbcode->bbcode_second_pass($signature, $siguid);
|
||||||
|
|
||||||
$signature = (!$config['enable_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $signature) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $signature);
|
$signature = (!$config['enable_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $signature) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $phpbb_root_path . $config['smilies_path'], $signature);
|
||||||
|
|
||||||
|
|
|
@ -483,7 +483,6 @@ if ($submit || $preview || $refresh)
|
||||||
|
|
||||||
$current_time = time();
|
$current_time = time();
|
||||||
|
|
||||||
|
|
||||||
// If replying/quoting and last post id has changed
|
// If replying/quoting and last post id has changed
|
||||||
// give user option to continue submit or return to post
|
// give user option to continue submit or return to post
|
||||||
// notify and show user the post made between his request and the final submit
|
// notify and show user the post made between his request and the final submit
|
||||||
|
@ -769,7 +768,7 @@ if (!sizeof($error) && $preview)
|
||||||
|
|
||||||
$preview_message = $message_parser->message;
|
$preview_message = $message_parser->message;
|
||||||
format_display($preview_message, $preview_signature, $message_parser->bbcode_uid, $preview_signature_uid, $enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $enable_sig);
|
format_display($preview_message, $preview_signature, $message_parser->bbcode_uid, $preview_signature_uid, $enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $enable_sig);
|
||||||
|
|
||||||
// Poll Preview
|
// Poll Preview
|
||||||
if (($mode == 'post' || ($mode == 'edit' && $post_id == $topic_first_post_id && empty($poll_last_vote))) && ($auth->acl_get('f_poll', $forum_id) || $auth->acl_get('m_edit', $forum_id)))
|
if (($mode == 'post' || ($mode == 'edit' && $post_id == $topic_first_post_id && empty($poll_last_vote))) && ($auth->acl_get('f_poll', $forum_id) || $auth->acl_get('m_edit', $forum_id)))
|
||||||
{
|
{
|
||||||
|
@ -1468,7 +1467,7 @@ function topic_review($topic_id, $forum_id, $is_inline_review = false)
|
||||||
|
|
||||||
if ($row['bbcode_bitfield'])
|
if ($row['bbcode_bitfield'])
|
||||||
{
|
{
|
||||||
$bbcode->bbcode_second_pass(&$message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
$bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count($censors['match']))
|
if (count($censors['match']))
|
||||||
|
|
Loading…
Add table
Reference in a new issue