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']; 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? '<br />' : '') . '<p>' . html_entity_decode('♲ ', ENT_QUOTES, 'UTF-8') . ' ' . $author_contact['addr'] . ': </p>' . "\n" . $content; break; case 3: // Diaspora - $headline = '<p><b>' . html_entity_decode('♲ ', ENT_QUOTES, 'UTF-8') . $mention . ':</b></p>' . "\n"; - if (stripos(Strings::normaliseLink($attributes['link']), 'http://twitter.com/') === 0) { $text = ($is_quote_share? '<hr />' : '') . '<p><a href="' . $attributes['link'] . '">' . $attributes['link'] . '</a></p>' . "\n"; } else { + $headline = '<p><b>♲ <a href="' . $attributes['profile'] . '">' . $attributes['author'] . '</a>:</b></p>' . "\n"; + + if (!empty($attributes['posted']) && !empty($attributes['link'])) { + $headline = '<p><b>♲ <a href="' . $attributes['profile'] . '">' . $attributes['author'] . '</a></b> - <a href="' . $attributes['link'] . '">' . $attributes['posted'] . ' GMT</a></p>' . "\n"; + } + $text = ($is_quote_share? '<hr />' : '') . $headline . '<blockquote>' . trim($content) . '</blockquote>' . "\n"; - if ($attributes['link'] != '') { - $text .= '<p><a href="' . $attributes['link'] . '">[l]</a></p>' . "\n"; + if (empty($attributes['posted']) && !empty($attributes['link'])) { + $text .= '<p><a href="' . $attributes['link'] . '">[Source]</a></p>' . "\n"; } }