From fe8d5abe0a8c51d1a7775d2f08f384cf9bd2d5d7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 27 Feb 2019 20:59:39 -0500 Subject: [PATCH 1/2] Replace strong by title format for item title in mod/share --- mod/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/share.php b/mod/share.php index bb3212ece..6f368b1d1 100644 --- a/mod/share.php +++ b/mod/share.php @@ -26,7 +26,7 @@ function share_init(App $a) { $o = share_header($item['author-name'], $item['author-link'], $item['author-avatar'], $item['guid'], $item['created'], $item['plink']); if ($item['title']) { - $o .= '[b]'.$item['title'].'[/b]'."\n"; + $o .= '[h3]'.$item['title'].'[/h3]'."\n"; } $o .= $item['body']; From 9cdae1810167ee6eff2db090a6248dc010c4c980 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 27 Feb 2019 21:01:47 -0500 Subject: [PATCH 2/2] Improve reshare format for Diaspora destinations - Add link to original post in post time - Update optional bottom link label --- src/Content/Text/BBCode.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index ddfacf160..e49b14f47 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -950,15 +950,19 @@ class BBCode extends BaseObject $text = ($is_quote_share? '
' : '') . '

' . html_entity_decode('♲ ', ENT_QUOTES, 'UTF-8') . ' ' . $author_contact['addr'] . ':

' . "\n" . $content; break; case 3: // Diaspora - $headline = '

' . html_entity_decode('♲ ', ENT_QUOTES, 'UTF-8') . $mention . ':

' . "\n"; - if (stripos(Strings::normaliseLink($attributes['link']), 'http://twitter.com/') === 0) { $text = ($is_quote_share? '
' : '') . '

' . $attributes['link'] . '

' . "\n"; } else { + $headline = '

' . $attributes['author'] . ':

' . "\n"; + + if (!empty($attributes['posted']) && !empty($attributes['link'])) { + $headline = '

' . $attributes['author'] . ' - ' . $attributes['posted'] . ' GMT

' . "\n"; + } + $text = ($is_quote_share? '
' : '') . $headline . '
' . trim($content) . '
' . "\n"; - if ($attributes['link'] != '') { - $text .= '

[l]

' . "\n"; + if (empty($attributes['posted']) && !empty($attributes['link'])) { + $text .= '

[Source]

' . "\n"; } }