diff options
author | friendica <info@friendica.com> | 2012-04-10 18:08:06 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-04-10 18:08:06 -0700 |
commit | ed608694cec2ea901f474f432d99b33821b276aa (patch) | |
tree | 3bfedeabbebb0dc8dc14f80d42c4cea530bc7a69 | |
parent | 18e225b05167261429df0e8dc4e6acf5cefd6c2a (diff) | |
download | volse-hubzilla-ed608694cec2ea901f474f432d99b33821b276aa.tar.gz volse-hubzilla-ed608694cec2ea901f474f432d99b33821b276aa.tar.bz2 volse-hubzilla-ed608694cec2ea901f474f432d99b33821b276aa.zip |
make editplain work everywhere
-rw-r--r-- | mod/contacts.php | 10 | ||||
-rw-r--r-- | mod/profiles.php | 17 | ||||
-rw-r--r-- | view/contact_head.tpl | 3 | ||||
-rw-r--r-- | view/profed_head.tpl | 2 | ||||
-rw-r--r-- | view/profile_edit.tpl | 2 |
5 files changed, 25 insertions, 9 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 483655a6c..9d29d4bd1 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -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'); diff --git a/mod/profiles.php b/mod/profiles.php index 20be43d5d..eef58bb06 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -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'; diff --git a/view/contact_head.tpl b/view/contact_head.tpl index a76293a68..9cfd81710 100644 --- a/view/contact_head.tpl +++ b/view/contact_head.tpl @@ -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", diff --git a/view/profed_head.tpl b/view/profed_head.tpl index a3267d591..2477654b3 100644 --- a/view/profed_head.tpl +++ b/view/profed_head.tpl @@ -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 : "", diff --git a/view/profile_edit.tpl b/view/profile_edit.tpl index e5c7162d0..2139fcf13 100644 --- a/view/profile_edit.tpl +++ b/view/profile_edit.tpl @@ -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> |