]> git.mxchange.org Git - friendica.git/commitdiff
make the richtext feature work for events, wall messages, and contact notes
authorZach Prezkuta <fermion@gmx.com>
Sat, 26 Jan 2013 19:53:35 +0000 (12:53 -0700)
committerZach Prezkuta <fermion@gmx.com>
Sat, 26 Jan 2013 20:03:01 +0000 (13:03 -0700)
mod/contacts.php
mod/events.php
mod/wallmessage.php

index 6e62ec8ef5538595ba8e9dccbfdde48a883d7940..ffd43434c321e2fa72b98bbd812abb0a15d7f9db 100644 (file)
@@ -244,9 +244,9 @@ function contacts_content(&$a) {
                $contact_id = $a->data['contact']['id'];
                $contact = $a->data['contact'];
 
-               $editselect = 'exact';
-               if(intval(get_pconfig(local_user(),'system','plaintext')))
-                       $editselect = 'none';
+               $editselect = 'none';
+               if( feature_enabled(local_user(),'richtext') )
+                       $editselect = 'exact';
 
                $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
                        '$baseurl' => $a->get_baseurl(true),
index 2f41c0e33dedfbc63da4e617f47511905d7969b3..be8b843177f6276cfc466bc265e57987708756fc 100755 (executable)
@@ -156,11 +156,21 @@ function events_content(&$a) {
        }
 
 
+       $editselect = 'none';
+       if( feature_enabled(local_user(), 'richtext') )
+               $editselect = 'textareas';
+
        $htpl = get_markup_template('event_head.tpl');
-       $a->page['htmlhead'] .= replace_macros($htpl,array('$baseurl' => $a->get_baseurl()));
+       $a->page['htmlhead'] .= replace_macros($htpl,array(
+               '$baseurl' => $a->get_baseurl(),
+               '$editselect' => $editselect
+       ));
 
        $etpl = get_markup_template('event_end.tpl');
-       $a->page['end'] .= replace_macros($etpl,array('$baseurl' => $a->get_baseurl()));
+       $a->page['end'] .= replace_macros($etpl,array(
+               '$baseurl' => $a->get_baseurl(),
+               '$editselect' => $editselect
+       ));
 
        $o ="";
        // tabs
index 24d21883b938ab68807f118400b3baeff32f0daa..b8859badd3d30504f6ea7c57f914e3a9be31ad5d 100644 (file)
@@ -115,10 +115,14 @@ function wallmessage_content(&$a) {
 
 
 
+       $editselect = 'none';
+       if( feature_enabled(local_user(), 'richtext') )
+               $editselect = '/(profile-jot-text|prvmail-text)/';
+
        $tpl = get_markup_template('wallmsg-header.tpl');
        $a->page['htmlhead'] .= replace_macros($tpl, array(
                '$baseurl' => $a->get_baseurl(true),
-               '$editselect' => '/(profile-jot-text|prvmail-text)/',
+               '$editselect' => $editselect,
                '$nickname' => $user['nickname'],
                '$linkurl' => t('Please enter a link URL:')
        ));
@@ -126,7 +130,7 @@ function wallmessage_content(&$a) {
        $tpl = get_markup_template('wallmsg-end.tpl');
        $a->page['end'] .= replace_macros($tpl, array(
                '$baseurl' => $a->get_baseurl(true),
-               '$editselect' => '/(profile-jot-text|prvmail-text)/',
+               '$editselect' => $editselect,
                '$nickname' => $user['nickname'],
                '$linkurl' => t('Please enter a link URL:')
        ));