Merge pull request #592 from fermionic/20130126-richtext-feature-fixes

make the richtext feature work for events, wall messages, and contact notes
This commit is contained in:
friendica 2013-01-27 19:11:06 -08:00
commit b58189bb98
3 changed files with 21 additions and 7 deletions

View file

@ -244,9 +244,9 @@ function contacts_content(&$a) {
$contact_id = $a->data['contact']['id']; $contact_id = $a->data['contact']['id'];
$contact = $a->data['contact']; $contact = $a->data['contact'];
$editselect = 'exact'; $editselect = 'none';
if(intval(get_pconfig(local_user(),'system','plaintext'))) if( feature_enabled(local_user(),'richtext') )
$editselect = 'none'; $editselect = 'exact';
$a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array( $a->page['htmlhead'] .= replace_macros(get_markup_template('contact_head.tpl'), array(
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),

View file

@ -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'); $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'); $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 =""; $o ="";
// tabs // tabs

View 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'); $tpl = get_markup_template('wallmsg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array( $a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),
'$editselect' => '/(profile-jot-text|prvmail-text)/', '$editselect' => $editselect,
'$nickname' => $user['nickname'], '$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:') '$linkurl' => t('Please enter a link URL:')
)); ));
@ -126,7 +130,7 @@ function wallmessage_content(&$a) {
$tpl = get_markup_template('wallmsg-end.tpl'); $tpl = get_markup_template('wallmsg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array( $a->page['end'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true), '$baseurl' => $a->get_baseurl(true),
'$editselect' => '/(profile-jot-text|prvmail-text)/', '$editselect' => $editselect,
'$nickname' => $user['nickname'], '$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:') '$linkurl' => t('Please enter a link URL:')
)); ));