aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 2157f8291..299cc1431 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1009,9 +1009,22 @@ function status_editor($a,$x,$popup=false) {
$geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
$plaintext = true;
+
if(feature_enabled(local_user(),'richtext'))
$plaintext = false;
+ $mimeselct = '';
+ if(array_key_exists('mimetype',$x) && $x['mimetype']) {
+ if($x['mimetype'] != 'text/bbcode')
+ $plaintext = true;
+ if($x['mimetype'] === 'choose') {
+ $mimeselect = mimetype_select($x['profile_uid']);
+ }
+ else
+ $mimeselect = '<input name="mimetype" value="' . $x['mimetype'] . '" />';
+ }
+
+
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
@@ -1042,7 +1055,7 @@ function status_editor($a,$x,$popup=false) {
'$return_path' => $a->query_string,
'$action' => $a->get_baseurl(true) . '/item',
'$share' => (x($x,'button') ? $x['button'] : t('Share')),
- '$webpage' => (x($x,'webpage') ? '1' : ''),
+ '$webpage' => (x($x,'webpage') ? $x['webpage'] : ''),
'$placeholdpagetitle' => t('Page link title'),
'$pagetitle' => (x($x,'pagetitle') ? $x['pagetitle'] : ''),
'$upload' => t('Upload photo'),
@@ -1079,6 +1092,7 @@ function status_editor($a,$x,$popup=false) {
'$emtitle' => t('Example: bob@example.com, mary@example.com'),
'$lockstate' => $x['lockstate'],
'$acl' => $x['acl'],
+ '$mimeselect' => $mimeselect,
'$showacl' => ((array_key_exists('showacl',$x)) ? $x['showacl'] : 'yes'),
'$bang' => $x['bang'],
'$profile_uid' => $x['profile_uid'],
@@ -1234,12 +1248,13 @@ function render_location_default($item) {
function prepare_page($item) {
+
return replace_macros(get_markup_template('page_display.tpl'),array(
'$author' => $item['author']['xchan_name'],
'$auth_url' => $item['author']['xchan_url'],
'$date' => datetime_convert('UTC',date_default_timezone_get(),$item['created'],'Y-m-d H:i'),
'$title' => smilies(bbcode($item['title'])),
- '$body' => smilies(bbcode($item['body']))
+ '$body' => prepare_text($item['body'],$item['mimetype'])
));
}