Commit 6da9a5d4 by Scott

Add reply button to PMs

parent 019572b1
...@@ -652,7 +652,7 @@ ...@@ -652,7 +652,7 @@
@$message['toavatarblobid'], @$message['toavatarwidth'], @$message['toavatarheight'], $options['avatarsize']); @$message['toavatarblobid'], @$message['toavatarwidth'], @$message['toavatarheight'], $options['avatarsize']);
} }
else { else {
// for everything else (questions, answers, activity, wall messages) // for everything else (received private messages, wall messages)
if (@$options['whoview']) if (@$options['whoview'])
$fields['who'] = qa_lang_html_sub_split('main/by_x', qa_get_one_user_html($message['fromhandle'], false)); $fields['who'] = qa_lang_html_sub_split('main/by_x', qa_get_one_user_html($message['fromhandle'], false));
if (@$options['avatarsize'] > 0) { if (@$options['avatarsize'] > 0) {
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
require_once QA_INCLUDE_DIR.'qa-app-limits.php'; require_once QA_INCLUDE_DIR.'qa-app-limits.php';
$loginUserId = qa_get_logged_in_userid(); $loginUserId = qa_get_logged_in_userid();
$loginUserHandle = qa_get_logged_in_handle();
// Check which box we're showing (inbox/sent), we're not using Q2A's single-sign on integration and that we're logged in // Check which box we're showing (inbox/sent), we're not using Q2A's single-sign on integration and that we're logged in
...@@ -81,8 +82,22 @@ ...@@ -81,8 +82,22 @@
if ($showBox === 'outbox') if ($showBox === 'outbox')
$htmlDefaults['towhomview'] = true; $htmlDefaults['towhomview'] = true;
foreach ($userMessages as $message) foreach ($userMessages as $message) {
$qa_content['message_list']['messages'][] = qa_message_html_fields($message, $htmlDefaults); $msgFormat = qa_message_html_fields($message, $htmlDefaults);
$replyHandle = $showBox == 'inbox' ? $message['fromhandle'] : $message['tohandle'];
$msgFormat['form'] = array(
'style' => 'light',
'buttons' => array(
'reply' => array(
'tags' => 'onclick="window.location.href=\''.qa_path_html('message/'.$replyHandle).'\'"',
'label' => qa_lang_html('question/reply_button'),
),
),
);
$qa_content['message_list']['messages'][] = $msgFormat;
}
$qa_content['navigation']['sub'] = qa_messages_sub_navigation($showBox); $qa_content['navigation']['sub'] = qa_messages_sub_navigation($showBox);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment