make editplain work everywhere

This commit is contained in:
friendica 2012-04-10 18:08:06 -07:00
parent 18e225b051
commit ed608694ce
5 changed files with 25 additions and 9 deletions

View file

@ -232,8 +232,14 @@ function contacts_content(&$a) {
$contact_id = $a->data['contact']['id']; $contact_id = $a->data['contact']['id'];
$contact = $a->data['contact']; $contact = $a->data['contact'];
$tpl = get_markup_template('contact_head.tpl'); $editselect = 'exact';
$a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true))); 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'); require_once('include/contact_selectors.php');

View file

@ -362,7 +362,16 @@ function profiles_content(&$a) {
require_once('include/profile_selectors.php'); 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"); $opt_tpl = get_markup_template("profile-hide-friends.tpl");
$hide_friends = replace_macros($opt_tpl,array( $hide_friends = replace_macros($opt_tpl,array(
@ -373,10 +382,12 @@ function profiles_content(&$a) {
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "") '$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>"; $a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";
$f = get_config('system','birthday_input_format'); $f = get_config('system','birthday_input_format');
if(! $f) if(! $f)
$f = 'ymd'; $f = 'ymd';

View file

@ -2,10 +2,9 @@
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
tinyMCE.init({ tinyMCE.init({
theme : "advanced", theme : "advanced",
mode : "exact", mode : "$editselect",
elements: "contact-edit-info", elements: "contact-edit-info",
plugins : "bbcode", plugins : "bbcode",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",

View file

@ -5,7 +5,7 @@
tinyMCE.init({ tinyMCE.init({
theme : "advanced", theme : "advanced",
mode : "textareas", mode : "$editselect",
plugins : "bbcode,paste", plugins : "bbcode,paste",
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
theme_advanced_buttons2 : "", theme_advanced_buttons2 : "",

View file

@ -159,7 +159,7 @@ $sexual
$lbl_about $lbl_about
</p> </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>
<div id="about-jot-end"></div> <div id="about-jot-end"></div>