$from_htmladdr_search, $location_of_buttons, $attachment_dir,
$username, $data_dir, $identity, $draft_id, $delete_draft,
$mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win,
- $saved_draft, $mail_sent;
+ $saved_draft, $mail_sent, $sig_first;
$subject = decodeHeader($subject, false);
$reply_subj = decodeHeader($reply_subj, false);
echo ' <TR>' . "\n" .
' <TD BGCOLOR="' . $color[4] . '" COLSPAN=2>' . "\n" .
' <TEXTAREA NAME=body ROWS=20 COLS="' .
- $editor_size . '" WRAP=HARD>' . htmlspecialchars($body);
+ $editor_size . '" WRAP=HARD>';
if ($use_signature == true && $newmail == true && !isset($from_htmladdr_search)) {
- echo "\n\n".($prefix_sig==true? "-- \n":'').htmlspecialchars($signature);
+ if ($sig_first == '1') {
+ echo "\n\n".($prefix_sig==true? "-- \n":'').htmlspecialchars($signature);
+ echo "\n\n".htmlspecialchars($body);
+ }
+ else {
+ echo "\n\n".htmlspecialchars($body);
+ echo "\n\n".($prefix_sig==true? "-- \n":'').htmlspecialchars($signature);
+ }
+ }
+ else {
+ echo htmlspecialchars($body);
}
echo '</TEXTAREA><BR>' . "\n" .
' </TD>' . "\n" .
/* compose in new window setting */
$compose_new_win = getPref($data_dir, $username, 'compose_new_win', 0);
+/* signature placement settings */
+$sig_first = getPref($data_dir, $username, 'sig_first', 0);
+
/* Load the javascript settings. */
$javascript_setting =
getPref($data_dir, $username, 'javascript_setting', SMPREF_JS_AUTODETECT);
'type' => SMOPT_TYPE_BOOLEAN,
'refresh' => SMOPT_REFRESH_ALL
);
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'sig_first',
+ 'caption' => _("Append signature before reply/forward text"),
+ 'type' => SMOPT_TYPE_BOOLEAN,
+ 'refresh' => SMOPT_REFRESH_NONE
+ );
/* Assemble all this together and return it as our result. */
$result = array(
'grps' => $optgrps,