From: Meik S. <acy...@ph...> - 2009-08-04 14:16:04
|
Author: acydburn Date: Tue Aug 4 15:15:13 2009 New Revision: 9919 Log: Separate PM Reply and PM Reply to all in prosilver. Style changes by dhn Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_compose.php branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_viewmessage.php branches/phpBB-3_0_0/phpBB/language/en/ucp.php branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_message_header.html branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/colours.css branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/cp.css Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Tue Aug 4 15:15:13 2009 *************** *** 141,147 **** <li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li> <li>[Fix] Correct descriptions of the permissions to use BBCode, smilies, images and flash to be more relevant. (Bug #36065 - Patch by rxu)</li> <li>[Fix] Fix style issues in print mode. (Bug #26375 - Patch by leviatan21)</li> ! <li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625 - Patch by rxu)</li> <li>[Fix] Color bbcode now supports three-digit hex notation. (Bug #39965 - Patch by m0rpha)</li> <li>[Fix] Search by authorname does not display posts of guests and deleted or deactivated users (Bug #36565, #47765 - Patch by nickvergessen)</li> <li>[Fix] View end of ban in MCP and ACP when user is banned by duration (Bug #47815 - Patch by Pyramide)</li> --- 141,147 ---- <li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li> <li>[Fix] Correct descriptions of the permissions to use BBCode, smilies, images and flash to be more relevant. (Bug #36065 - Patch by rxu)</li> <li>[Fix] Fix style issues in print mode. (Bug #26375 - Patch by leviatan21)</li> ! <li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625 - Patch by rxu)</li> <li>[Fix] Color bbcode now supports three-digit hex notation. (Bug #39965 - Patch by m0rpha)</li> <li>[Fix] Search by authorname does not display posts of guests and deleted or deactivated users (Bug #36565, #47765 - Patch by nickvergessen)</li> <li>[Fix] View end of ban in MCP and ACP when user is banned by duration (Bug #47815 - Patch by Pyramide)</li> *************** *** 261,266 **** --- 261,267 ---- <li>[Feature] Ability to copy permissions from one forum to several other forums.</li> <li>[Feature] Ability to control the display of custom profile fields on viewtopic (Bug #48985).</li> <li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li> + <li>[Feature] Separate PM Reply and PM Reply to all in prosilver.</li> </ul> <a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3> Modified: branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_compose.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_compose.php (original) --- branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_compose.php Tue Aug 4 15:15:13 2009 *************** *** 46,51 **** --- 46,54 ---- $draft_id = request_var('d', 0); $lastclick = request_var('lastclick', 0); + // Reply to all triggered (quote/reply) + $reply_to_all = request_var('reply_to_all', 0); + // Do NOT use request_var or specialchars here $address_list = isset($_REQUEST['address_list']) ? $_REQUEST['address_list'] : array(); *************** *** 84,90 **** } redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm')); } ! // Since viewtopic.php language entries are used in several modes, // we include the language file here $user->add_lang('viewtopic'); --- 87,93 ---- } redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm')); } ! // Since viewtopic.php language entries are used in several modes, // we include the language file here $user->add_lang('viewtopic'); *************** *** 314,326 **** if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview) { ! if ($action == 'quotepost') { $address_list = array('u' => array($post['author_id'] => 'to')); } else { ! // We try to include every previously listed member from the TO Header $address_list = rebuild_header(array('to' => $post['to_address'])); // Add the author (if he is already listed then this is no shame (it will be overwritten)) --- 317,330 ---- if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview) { ! // Add the original author as the recipient if quoting a post or only replying and not having checked "reply to all" ! if ($action == 'quotepost' || !$reply_to_all) { $address_list = array('u' => array($post['author_id'] => 'to')); } else { ! // We try to include every previously listed member from the TO Header - Reply to all $address_list = rebuild_header(array('to' => $post['to_address'])); // Add the author (if he is already listed then this is no shame (it will be overwritten)) *************** *** 443,449 **** $max_recipients = (!$max_recipients) ? $config['pm_max_recipients'] : $max_recipients; // If this is a quote/reply "to all"... we may increase the max_recpients to the number of original recipients ! if (($action == 'reply' || $action == 'quote') && $max_recipients) { // We try to include every previously listed member from the TO Header $list = rebuild_header(array('to' => $post['to_address'])); --- 447,453 ---- $max_recipients = (!$max_recipients) ? $config['pm_max_recipients'] : $max_recipients; // If this is a quote/reply "to all"... we may increase the max_recpients to the number of original recipients ! if (($action == 'reply' || $action == 'quote') && $max_recipients && $reply_to_all) { // We try to include every previously listed member from the TO Header $list = rebuild_header(array('to' => $post['to_address'])); Modified: branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_viewmessage.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_viewmessage.php (original) --- branches/phpBB-3_0_0/phpBB/includes/ucp/ucp_pm_viewmessage.php Tue Aug 4 15:15:13 2009 *************** *** 169,174 **** --- 169,177 ---- $url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'); + // Number of "to" recipients + $num_recipients = (int) preg_match_all('/:?(u|g)_([0-9]+):?/', $message_row['to_address'], $match); + $template->assign_vars(array( 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']), *************** *** 215,227 **** --- 218,234 ---- 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '', 'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '', 'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '', + 'U_POST_REPLY_ALL' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&reply_to_all=1&p=" . $message_row['msg_id'] : '', 'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous", 'U_NEXT_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=next", + 'U_PM_ACTION' => $url . '&mode=compose&f=' . $folder_id . '&p=' . $message_row['msg_id'], + 'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false, 'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'], 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, 'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)), + 'S_PM_RECIPIENTS' => $num_recipients, 'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '', 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_sendpm') && $auth->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '') Modified: branches/phpBB-3_0_0/phpBB/language/en/ucp.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/language/en/ucp.php (original) --- branches/phpBB-3_0_0/phpBB/language/en/ucp.php Tue Aug 4 15:15:13 2009 *************** *** 374,379 **** --- 374,380 ---- 'RENAME' => 'Rename', 'RENAME_FOLDER' => 'Rename folder', 'REPLIED_MESSAGE' => 'Replied to message', + 'REPLY_TO_ALL' => 'Reply to sender and all recipients.', 'REPORT_PM' => 'Report private message', 'RESIGN_SELECTED' => 'Resign selected', 'RETURN_FOLDER' => '%1$sReturn to previous folder%2$s', Modified: branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_message_header.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_message_header.html (original) --- branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_message_header.html Tue Aug 4 15:15:13 2009 *************** *** 1,22 **** <h2>{L_TITLE}<!-- IF CUR_FOLDER_NAME -->: {CUR_FOLDER_NAME}<!-- ENDIF --></h2> ! <form id="viewfolder" method="post" action="{S_PM_ACTION}"> ! ! <div class="panel"> <div class="inner"><span class="corners-top"><span></span></span> <!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF --> ! <!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM --> <div class="buttons"> ! <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div> <!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF --> <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF --> </div> <!-- ENDIF --> <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE --> ! <ul class="linklist"> <li class="rightside pagination"> <!-- IF S_VIEW_MESSAGE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO} {CUR_FOLDER_NAME}</a><!-- ENDIF --> <!-- IF FOLDER_CUR_MESSAGES neq 0 --> --- 1,30 ---- <h2>{L_TITLE}<!-- IF CUR_FOLDER_NAME -->: {CUR_FOLDER_NAME}<!-- ENDIF --></h2> ! <div class="panel clearfix pm-panel-header<!-- IF S_VIEW_MESSAGE --> pm<!-- ENDIF -->"> <div class="inner"><span class="corners-top"><span></span></span> <!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF --> ! <!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM --> + <form method="post" action="{U_PM_ACTION}" id="reply-form"> + <div class="buttons"> ! <!-- IF U_POST_REPLY_PM --><div class="pmreply-icon clearfix"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div> <!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF --> <!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF --> </div> + + <!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 --> + <div class="reply-all"><a title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">» {L_REPLY_TO_ALL}</a></div> + <!-- ENDIF --> + + <input type="hidden" name="action" value="" id="reply-action" /> + + </form> <!-- ENDIF --> <!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE --> ! <ul class="linklist pm-return-to"> <li class="rightside pagination"> <!-- IF S_VIEW_MESSAGE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO} {CUR_FOLDER_NAME}</a><!-- ENDIF --> <!-- IF FOLDER_CUR_MESSAGES neq 0 --> *************** *** 26,28 **** --- 34,40 ---- </li> </ul> <!-- ENDIF --> + </div> + </div> + + <form id="viewfolder" method="post" action="{S_PM_ACTION}"> Modified: branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html (original) --- branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html Tue Aug 4 15:15:13 2009 *************** *** 2,10 **** <!-- IF not PROMPT --> <!-- INCLUDE ucp_pm_message_header.html --> <!-- ENDIF --> - <!-- IF PROMPT --> <h2>{L_EXPORT_AS_CSV}</h2> <form id="viewfolder" method="post" action="{S_PM_ACTION}"> --- 2,10 ---- <!-- IF not PROMPT --> <!-- INCLUDE ucp_pm_message_header.html --> + <div class="panel pm-panel-message"><div> <!-- ENDIF --> <!-- IF PROMPT --> <h2>{L_EXPORT_AS_CSV}</h2> <form id="viewfolder" method="post" action="{S_PM_ACTION}"> Modified: branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html (original) --- branches/phpBB-3_0_0/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html Tue Aug 4 15:15:13 2009 *************** *** 1,20 **** ! <!-- INCLUDE ucp_header.html --> <!-- INCLUDE ucp_pm_message_header.html --> - <span class="corners-bottom"><span></span></span></div> - </div> <!-- IF S_DISPLAY_HISTORY and (U_VIEW_PREVIOUS_HISTORY or U_VIEW_NEXT_HISTORY) --> ! <fieldset class="display-options clearfix"> <!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_HISTORY}</a><!-- ENDIF --> <!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_HISTORY}</a><!-- ENDIF --> </fieldset> <!-- ENDIF --> ! <div id="post-{MESSAGE_ID}" class="post pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->"> ! <div class="inner"><span class="corners-top"><span></span></span> <div class="postbody"> --- 1,18 ---- ! <!-- INCLUDE ucp_header.html --> <!-- INCLUDE ucp_pm_message_header.html --> <!-- IF S_DISPLAY_HISTORY and (U_VIEW_PREVIOUS_HISTORY or U_VIEW_NEXT_HISTORY) --> ! <fieldset class="display-options clearfix bg1 pm-message-nav"> <!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_HISTORY}</a><!-- ENDIF --> <!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_HISTORY}</a><!-- ENDIF --> </fieldset> <!-- ENDIF --> ! <div id="post-{MESSAGE_ID}" class="panel clearfix post pm-panel-message pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->"> ! <div> <div class="postbody"> Modified: branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/colours.css ============================================================================== *** branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/colours.css (original) --- branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/colours.css Tue Aug 4 15:15:13 2009 *************** *** 868,873 **** --- 868,879 ---- color: #000000 !important; } + /* PM panel adjustments */ + .pm-panel-header, + #cp-main .pm-message-nav { + border-bottom-color: #A4B3BF; + } + /* PM marking colours */ .pmlist li.pm_message_reported_colour, .pm_message_reported_colour { border-left-color: #BC2A4D; Modified: branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/cp.css ============================================================================== *** branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/cp.css (original) --- branches/phpBB-3_0_0/phpBB/styles/prosilver/theme/cp.css Tue Aug 4 15:15:13 2009 *************** *** 348,353 **** --- 348,381 ---- line-height: 2.5em; } + /* PM panel adjustments */ + .pm-panel-header { + margin: 0; + padding-bottom: 10px; + border-bottom: 1px dashed #A4B3BF; + } + + .reply-all { + display: block; + padding-top: 4px; + clear: both; + float: left; + } + + .pm-panel-message { + padding-top: 10px; + } + + .pm-return-to { + padding-top: 23px; + } + + #cp-main .pm-message-nav { + margin: 0; + padding: 2px 10px 5px 10px; + border-bottom: 1px dashed #A4B3BF; + } + /* PM Message history */ .current { color: #999999; |