mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
- strip_bbcode should not treat smilies which look like BBCode and are placed in front of a closing tag as BBCode
- highlight in post subjects and topic titles - language entry SMILIE_ONE_ADDED should have been SMILIES_ONE_ADDED git-svn-id: file:///svn/phpbb/trunk@8045 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8257d1c828
commit
d25ca29ca0
4 changed files with 14 additions and 8 deletions
|
@ -2527,7 +2527,7 @@ function strip_bbcode(&$text, $uid = '')
|
|||
$uid = '[0-9a-z]{5,}';
|
||||
}
|
||||
|
||||
$text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=.*?)?(?::[a-z])?(\:?$uid)\]#", ' ', $text);
|
||||
$text = preg_replace("#\[\/?[a-z0-9\*\+\-]+(?:=(?:".*"|[^\]]*))?(?::[a-z])?(\:$uid)\]#", ' ', $text);
|
||||
|
||||
$match = get_preg_expression('bbcode_htm');
|
||||
$replace = array('\1', '\1', '\2', '\1', '', '');
|
||||
|
@ -3689,6 +3689,8 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||
{
|
||||
return;
|
||||
}
|
||||
static $counter = 0;
|
||||
$counter++; //echo "<b>"; var_dump($counter); echo "</b>";
|
||||
|
||||
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
|
||||
{
|
||||
|
|
|
@ -109,12 +109,12 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'ICONS_ADD' => 'Add a new icon',
|
||||
'ICON_NONE_ADDED' => 'No icons were added.',
|
||||
'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
|
||||
'ICONS_ONE_ADDED' => 'The icon has been added successfully.',
|
||||
'ICONS_ADDED' => 'The icons have been added successfully.',
|
||||
'ICONS_CONFIG' => 'Icon configuration',
|
||||
'ICONS_DELETED' => 'The icon has been removed successfully.',
|
||||
'ICONS_EDIT' => 'Edit icon',
|
||||
'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
|
||||
'ICONS_ONE_EDITED' => 'The icon has been updated successfully.',
|
||||
'ICON_NONE_EDITED' => 'No icons were updated.',
|
||||
'ICONS_EDITED' => 'The icons have been updated successfully.',
|
||||
'ICONS_HEIGHT' => 'Icon height',
|
||||
|
@ -148,8 +148,8 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'SELECT_PACKAGE' => 'Select a package file',
|
||||
'SMILIES_ADD' => 'Add a new smiley',
|
||||
'SMILIES_NONE_ADDED' => 'No smilies were added.',
|
||||
'SMILIE_ONE_ADDED' => 'The smiley has been added successfully.',
|
||||
'SMILIES_NONE_ADDED' => 'No smilies were added.',
|
||||
'SMILIES_ONE_ADDED' => 'The smiley has been added successfully.',
|
||||
'SMILIES_ADDED' => 'The smilies have been added successfully.',
|
||||
'SMILIES_CODE' => 'Smiley code',
|
||||
'SMILIES_CONFIG' => 'Smiley configuration',
|
||||
|
|
|
@ -776,6 +776,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : '';
|
||||
|
||||
$row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
|
||||
|
||||
$tpl_ary = array(
|
||||
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
|
@ -864,6 +866,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
{
|
||||
// post highlighting
|
||||
$row['post_text'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_text']);
|
||||
$row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['post_subject']);
|
||||
}
|
||||
|
||||
$tpl_ary = array(
|
||||
|
|
|
@ -1252,15 +1252,16 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
|||
parse_attachments($forum_id, $message, $attachments[$row['post_id']], $update_count);
|
||||
}
|
||||
|
||||
// Replace naughty words such as farty pants
|
||||
$row['post_subject'] = censor_text($row['post_subject']);
|
||||
|
||||
// Highlight active words (primarily for search)
|
||||
if ($highlight_match)
|
||||
{
|
||||
$message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $message);
|
||||
$row['post_subject'] = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $row['post_subject']);
|
||||
}
|
||||
|
||||
// Replace naughty words such as farty pants
|
||||
$row['post_subject'] = censor_text($row['post_subject']);
|
||||
|
||||
// Editing information
|
||||
if (($row['post_edit_count'] && $config['display_last_edited']) || $row['post_edit_reason'])
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue