]> git.mxchange.org Git - friendica.git/commitdiff
make editplain work everywhere
authorfriendica <info@friendica.com>
Wed, 11 Apr 2012 01:08:06 +0000 (18:08 -0700)
committerfriendica <info@friendica.com>
Wed, 11 Apr 2012 01:08:06 +0000 (18:08 -0700)
mod/contacts.php
mod/profiles.php
view/contact_head.tpl
view/profed_head.tpl
view/profile_edit.tpl

index 483655a6cb691706671979b15fab365874ca73b1..9d29d4bd1438ee091407a83bcabcb8f33a37d788 100644 (file)
@@ -232,8 +232,14 @@ function contacts_content(&$a) {
                $contact_id = $a->data['contact']['id'];
                $contact = $a->data['contact'];
 
-               $tpl = get_markup_template('contact_head.tpl');
-               $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true)));
+               $editselect = 'exact';
+               if(intval(get_pconfig(local_user(),'system','plaintext')))
+                       $editselect = 'none';
+
+               $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
+                       '$baseurl' => $a->get_baseurl(true),
+                       '$editselect' => $editselect,
+               ));
 
                require_once('include/contact_selectors.php');
 
index 20be43d5d4b576fe5669215a8d7804d90d4a9982..eef58bb06fcd8201361fa812ed8798a208e85180 100644 (file)
@@ -362,7 +362,16 @@ function profiles_content(&$a) {
 
                require_once('include/profile_selectors.php');
 
-               $tpl = get_markup_template('profed_head.tpl');
+
+               $editselect = 'textareas';
+               if(intval(get_pconfig(local_user(),'system','plaintext')))
+                       $editselect = 'none';
+
+               $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
+                       '$baseurl' => $a->get_baseurl(true),
+                       '$editselect' => $editselect,
+               ));
+
 
                $opt_tpl = get_markup_template("profile-hide-friends.tpl");
                $hide_friends = replace_macros($opt_tpl,array(
@@ -373,10 +382,12 @@ function profiles_content(&$a) {
                        '$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
                ));
 
-
-               $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true)));
                $a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";
 
+
+
+
+
                $f = get_config('system','birthday_input_format');
                if(! $f)
                        $f = 'ymd';
index a76293a687fe939f5e59b1808832dc44fe733164..9cfd8171087753c572af3c5644e39aa59bb577ff 100644 (file)
@@ -2,10 +2,9 @@
           src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
           <script language="javascript" type="text/javascript">
 
-
 tinyMCE.init({
        theme : "advanced",
-       mode : "exact",
+       mode : "$editselect",
        elements: "contact-edit-info",
        plugins : "bbcode",
        theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
index a3267d591678023dc4610623c80a4f1948aea79d..2477654b39fcd79ba79b49feac69c0691565bdab 100644 (file)
@@ -5,7 +5,7 @@
 
 tinyMCE.init({
        theme : "advanced",
-       mode : "textareas",
+       mode : "$editselect",
        plugins : "bbcode,paste",
        theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
        theme_advanced_buttons2 : "",
index e5c7162d03946f723c8f0620df6bb21e89338692..2139fcf13cb140321df62e457282dfad859e91f9 100644 (file)
@@ -159,7 +159,7 @@ $sexual
 $lbl_about
 </p>
 
-<textarea rows="10" cols="72" id="profile-jot-text" name="about" >$about</textarea>
+<textarea rows="10" cols="72" id="profile-about-text" name="about" >$about</textarea>
 
 </div>
 <div id="about-jot-end"></div>