$reply_citation_start = getPref($data_dir, $username, 'reply_citation_start');
$reply_citation_end = getPref($data_dir, $username, 'reply_citation_end');
+$body_quote = getPref($data_dir, $username, 'body_quote', '>');
+if ($body_quote == 'NONE') $body_quote = '';
+
// who is using those darn block comments? poo!
// Load preference for cursor behavior for replies
'refresh' => SMOPT_REFRESH_NONE
);
+ $optvals[SMOPT_GRP_MESSAGE][] = array(
+ 'name' => 'body_quote',
+ 'caption' => _("Prefix for Original Message when Replying"),
+ 'type' => SMOPT_TYPE_STRING,
+ 'refresh' => SMOPT_REFRESH_NONE,
+ 'size' => SMOPT_SIZE_TINY,
+ 'save' => 'save_option_reply_prefix'
+ );
+
$optvals[SMOPT_GRP_MESSAGE][] = array(
'name' => 'reply_focus',
'caption' => _("Cursor Position when Replying"),
}
+/**
+ * This function saves the reply prefix (body_quote) character(s)
+ */
+function save_option_reply_prefix($option) {
+ global $data_dir, $username, $new_javascript_setting;
+
+ // save as "NONE" if it was blanked out
+ //
+ if (empty($option->new_value)) $option->new_value = 'NONE';
+
+
+ // Save the option like normal.
+ //
+ save_option($option);
+
+}
+
?>
global $editor_size, $default_use_priority, $body, $idents,
$use_signature, $composesession, $data_dir, $username,
$username, $key, $imapServerAddress, $imapPort, $compose_messages,
- $composeMessage;
+ $composeMessage, $body_quote;
global $languages, $squirrelmail_language, $default_charset;
/*
sqWordWrap($line, ($editor_size));
if (preg_match("/^(>+)/", $line, $matches)) {
$gt = $matches[1];
- $body .= '>' . str_replace("\n", "\n>$gt ", rtrim($line)) ."\n";
+ $body .= $body_quote . str_replace("\n", "\n$body_quote$gt ", rtrim($line)) ."\n";
} else {
- $body .= '> ' . str_replace("\n", "\n> ", rtrim($line)) . "\n";
+ $body .= $body_quote . (!empty($body_quote) ? ' ' : '') . str_replace("\n", "\n$body_quote" . (!empty($body_quote) ? ' ' : ''), rtrim($line)) . "\n";
}
}
$body = getReplyCitation($from , $orig_header->date) . $body;