From ac0c0f5247dd5b363bef4f6e26178dff933c1dd2 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Fri, 1 Nov 2002 15:40:22 +0000 Subject: [PATCH] More minor changes git-svn-id: file:///svn/phpbb/trunk@3004 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 14 ++++++------- phpBB/language/en/lang_main.php | 2 ++ phpBB/posting.php | 3 ++- phpBB/templates/subSilver/posting_body.html | 23 ++++++--------------- 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 5385b1db9e..4ef5585b27 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -46,7 +46,7 @@ class parse_message // Message length check if (!strlen($message) || ($config['max_post_chars'] && strlen($message) > intval($config['max_post_chars']))) { - $warn_msg .= ( !strlen($message) ) ? $user->lang['Too_few_chars'] . '
' : $user->lang['Too_many_chars'] . '
'; + $warn_msg .= (($warn_msg != '') ? '
' : '') . (!strlen($message)) ? $user->lang['Too_few_chars'] : $user->lang['Too_many_chars']; } // Smiley check @@ -66,7 +66,7 @@ class parse_message if ($match > intval($config['max_post_smilies'])) { - $warn_msg .= $user->lang['Too_many_smilies'] . '
'; + $warn_msg .= (($warn_msg != '') ? '
' : '') . $user->lang['Too_many_smilies']; break; } } @@ -82,11 +82,11 @@ class parse_message return $warn_msg; } - $warn_msg .= $this->html($message, $html); - $warn_msg .= $this->bbcode($message, $bbcode, $uid); - $warn_msg .= $this->emoticons($message, $smilies); - $warn_msg .= $this->magic_url($message, $url); - $warn_msg .= $this->attach($_FILE); + $warn_msg .= (($warn_msg != '') ? '
' : '') . $this->html($message, $html); + $warn_msg .= (($warn_msg != '') ? '
' : '') . $this->bbcode($message, $bbcode, $uid); + $warn_msg .= (($warn_msg != '') ? '
' : '') . $this->emoticons($message, $smilies); + $warn_msg .= (($warn_msg != '') ? '
' : '') . $this->magic_url($message, $url); + $warn_msg .= (($warn_msg != '') ? '
' : '') . $this->attach($_FILE); return $warn_msg; } diff --git a/phpBB/language/en/lang_main.php b/phpBB/language/en/lang_main.php index a729d2451e..1194deb2bb 100644 --- a/phpBB/language/en/lang_main.php +++ b/phpBB/language/en/lang_main.php @@ -232,6 +232,7 @@ $lang = array_merge($lang, array( 'Edit_delete_post' => 'Edit/Delete this post', 'View_IP' => 'View IP of poster', 'Delete_post' => 'Delete this post', + 'Delete_post_warn' => 'Once deleted the post cannot be recovered', 'wrote' => 'wrote', 'Quote' => 'Quote', 'Code' => 'Code', @@ -275,6 +276,7 @@ $lang = array_merge($lang, array( 'Empty_subject' => 'You must specify a subject when posting a new topic', 'To_long_subject' => 'The subject is too long it must be 60 characters or less', 'Empty_message' => 'You must enter a message when posting', + 'Too_few_chars' => 'Your message contains too few characters', 'Too_many_chars' => 'Your message contains too many characters', 'Too_many_smilies' => 'Your message contains too many emoticons', 'Forum_locked' => 'This forum is locked you cannot post, reply to or edit topics', diff --git a/phpBB/posting.php b/phpBB/posting.php index e8a7d06304..34890ee7eb 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -628,7 +628,7 @@ $template->assign_vars(array( 'TOPIC_TITLE' => ($mode != 'post') ? $topic_title : '', 'USERNAME' => $post_username, 'SUBJECT' => (!empty($topic_title)) ? $topic_title : $post_subject, - 'MESSAGE' => $post_text, + 'MESSAGE' => trim($post_text), 'HTML_STATUS' => ($html_status) ? $user->lang['HTML_is_ON'] : $user->lang['HTML_is_OFF'], 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCode_is_ON'], '', '') : sprintf($user->lang['BBCode_is_OFF'], '', ''), 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['Smilies_are_ON'] : $user->lang['Smilies_are_OFF'], @@ -657,6 +657,7 @@ $template->assign_vars(array( 'L_ATTACH_SIGNATURE' => $user->lang['Attach_signature'], 'L_NOTIFY_ON_REPLY' => $user->lang['Notify'], 'L_DELETE_POST' => $user->lang['Delete_post'], + 'L_DELETE_WARN' => $user->lang['Delete_post_warn'], 'L_NONE' => $user->lang['None'], 'L_EMPTY_MESSAGE' => $user->lang['Empty_message'], 'L_BBCODE_CLOSE_TAGS' => $user->lang['Close_Tags'], diff --git a/phpBB/templates/subSilver/posting_body.html b/phpBB/templates/subSilver/posting_body.html index 6887737c3a..2a9eed5cf1 100644 --- a/phpBB/templates/subSilver/posting_body.html +++ b/phpBB/templates/subSilver/posting_body.html @@ -1,6 +1,6 @@ - - +
@@ -74,7 +63,7 @@ function checkForm() { - +
{L_DELETE_POST} {L_DELETE_WARN} [ {L_DELETE_WARN} ]