Some tweaks to the appearance of messaging window

This commit is contained in:
moodler 2007-08-27 03:22:16 +00:00
parent a12e11c13a
commit 3aa3cf3d21
5 changed files with 20 additions and 9 deletions

View File

@ -28,6 +28,7 @@ $string['incomingcontacts'] = 'Incoming Contacts ($a)';
$string['keywords'] = 'Keywords';
$string['keywordssearchresults'] = 'Search results: $a messages found';
$string['maxmessages'] = 'Maximum number of messages to show in the discussion history';
$string['mailsent'] = 'Your message was sent via email.';
$string['message'] = 'Message';
$string['messagehistory'] = 'Message History';
$string['messages'] = 'Messages';

View File

@ -35,7 +35,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title>
</head>
<frameset rows="110,*,0,200">
<frameset rows="110,*,0,220">
<noframes><body><?php
echo '<a href="discussion.php?id='.$userid.'&amp;noframesjs=1">'.get_string('noframesjs', 'message').'<a/>';
?></body></noframes>
@ -290,4 +290,4 @@
echo '</div></div>';
print_footer('none');
?>
?>

View File

@ -1022,9 +1022,9 @@ function message_post_message($userfrom, $userto, $message, $format, $messagetyp
if (!empty($preference->message_emailaddress)) {
$userto->email = $preference->message_emailaddress; // Use custom messaging address
}
email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml);
debugging('Mail was sent', DEBUG_NORMAL);
echo "mail was sent";
if (email_to_user($userto, $userfrom, $messagesubject, $messagetext, $messagehtml)) {
$CFG->messagewasjustemailed = true;
}
sleep(3);
}
}

View File

@ -85,28 +85,34 @@
add_to_log(SITEID, 'message', 'write', 'history.php?user1='.$user->id.'&amp;user2='.$USER->id.'#m'.$messageid, $user->id);
}
echo '<title></title></head>';
echo '<title> </title></head>';
echo '<body class="message course-1" id="message-send">';
echo '<center>';
echo '<form id="editing" method="post" action="send.php">';
echo '<div>';
echo '<input type="hidden" name="id" value="'.$user->id.'" />';
echo '<input type="hidden" name="sesskey" value="'.$USER->sesskey.'" />';
$usehtmleditor = (can_use_html_editor() && get_user_preferences('message_usehtmleditor', 0));
if ($usehtmleditor) {
echo '<table align="center"><tr><td align="center">';
print_textarea($usehtmleditor, 8, 34, 0, 0, 'message', '');
print_textarea($usehtmleditor, 7, 34, 0, 0, 'message', '');
echo '</td></tr></table>';
echo '<input type="submit" value="'.get_string('sendmessage', 'message').'" />';
use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable');
echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
} else {
print_textarea(false, 5, 34, 0, 0, 'message', '');
echo '<input type="hidden" name="format" value="'.FORMAT_MOODLE.'" />';
echo '<br /><input type="submit" value="'.get_string('sendmessage', 'message').'" />';
}
echo '<br /><input type="submit" value="'.get_string('sendmessage', 'message').'" />';
echo '</div>';
echo '</form>';
if (!empty($CFG->messagewasjustemailed)) {
notify(get_string('mailsent', 'message'), 'notifysuccess');
}
echo '<div class="noframesjslink"><a target="_parent" href="discussion.php?id='.$userid.'&amp;noframesjs=1">'.get_string('noframesjs', 'message').'</a></div>';
echo '</center>';

View File

@ -2455,6 +2455,10 @@ body#message-messages {
padding:10px;
}
body#message-send .notifysuccess {
padding:1px;
}
/***
*** Notes
***/
@ -4041,4 +4045,4 @@ wikiadminactions {
background: #eee;
border: 1px dashed #ddd;
padding: 3px;
}
}