aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/message.php4
-rw-r--r--mod/message.php15
-rw-r--r--view/theme/redbasic/css/style.css6
-rwxr-xr-xview/tpl/prv_message.tpl5
4 files changed, 22 insertions, 8 deletions
diff --git a/include/message.php b/include/message.php
index 3bcd5e209..2fca9bef0 100644
--- a/include/message.php
+++ b/include/message.php
@@ -76,12 +76,12 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
$match = null;
$images = null;
- if(preg_match_all("/\[img\](.*?)\[\/img\]/",$body,$match))
+ if(preg_match_all("/\[img\](.*?)\[\/img\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match))
$images = $match[1];
$match = false;
- if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",$body,$match))
+ if(preg_match_all("/\[attachment\](.*?)\[\/attachment\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match))
$attaches = $match[1];
$attachments = '';
diff --git a/mod/message.php b/mod/message.php
index c03875e24..f992a6fa1 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -212,6 +212,12 @@ function message_content(&$a) {
$channel = $a->get_channel();
head_set_icon($channel['xchan_photo_s']);
+ $cipher = get_pconfig(local_user(),'system','default_cipher');
+ if(! $cipher)
+ $cipher = 'aes256';
+
+
+
$tpl = get_markup_template('mail_head.tpl');
$header = replace_macros($tpl, array(
'$messages' => t('Messages'),
@@ -328,6 +334,11 @@ function message_content(&$a) {
'$defexpire' => '',
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
'$expires' => t('Set expiration date'),
+ '$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? 'block' : 'none'),
+ '$encrypt' => t('Encrypt text'),
+ '$cipher' => $cipher,
+
+
));
return $o;
@@ -506,6 +517,10 @@ function message_content(&$a) {
'$defexpire' => '',
'$feature_expire' => ((feature_enabled(local_user(),'content_expire')) ? 'block' : 'none'),
'$expires' => t('Set expiration date'),
+ '$feature_encrypt' => ((feature_enabled(local_user(),'content_encrypt')) ? 'block' : 'none'),
+ '$encrypt' => t('Encrypt text'),
+ '$cipher' => $cipher,
+
));
return $o;
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index f5ff8e49a..e6fa952d5 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -1721,6 +1721,7 @@ tr.mceLast {
#prvmail-attach-wrapper,
#prvmail-link-wrapper,
#prvmail-expire-wrapper,
+#prvmail-encrypt-wrapper,
#prvmail-rotator-wrapper {
float: left;
margin-top: 10px;
@@ -2897,11 +2898,6 @@ div.jGrowl div.info {
}
-.autocomplete-w1 {
- position: fixed;
- top: 24px;
-}
-
.autocomplete {
color: $font_colour;
border: 1px solid $nav_bg_1;
diff --git a/view/tpl/prv_message.tpl b/view/tpl/prv_message.tpl
index 621f56be7..b7654dc2d 100755
--- a/view/tpl/prv_message.tpl
+++ b/view/tpl/prv_message.tpl
@@ -15,6 +15,7 @@
{{/if}}
<input type="hidden" id="inp-prvmail-expires" name="expires" value="{{$defexpire}}" />
+<input type="hidden" name="media_str" id="jot-media" value="" />
<div id="prvmail-subject-label">{{$subject}}</div>
<input type="text" size="64" maxlength="255" id="prvmail-subject" name="subject" value="{{$subjtxt}}" {{$readonly}} tabindex="11" />
@@ -40,7 +41,9 @@
<div id="prvmail-expire-wrapper" style="display: {{$feature_expire}};" >
<i id="prvmail-expires" class="icon-eraser jot-icons" title="{{$expires}}" onclick="prvmailGetExpiry();return false;"></i>
</div>
-
+ <div id="prvmail-encrypt-wrapper" style="display: {{$feature_encrypt}};" >
+ <i id="prvmail-encrypt" class="icon-key jot-icons" title="{{$encrypt}}" onclick="red_encrypt('{{$cipher}}','#prvmail-text',$('#prvmail-text').val());return false;"></i>
+ </div>
<div id="prvmail-rotator-wrapper" >
<img id="prvmail-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait}}" style="display: none;" />