From 3c59eefa222445058a2da03911a340a867ad4322 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 14 Aug 2017 19:16:28 +0000 Subject: [PATCH] Shared posts to Libertree now look better. --- include/bbcode.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/include/bbcode.php b/include/bbcode.php index 0c4e12c9ad..109ca743d6 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -59,7 +59,11 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) { } elseif (($simplehtml != 4) && ($simplehtml != 0)) { $text = sprintf('%s
', $data["url"], $data["title"]); } else { - $text = sprintf('', $data["type"]); + if ($simplehtml != 4) { + $text = sprintf('', $data["type"]); + } else { + $span_end = ''; + } $bookmark = array(sprintf('[bookmark=%s]%s[/bookmark]', $data["url"], $data["title"]), $data["url"], $data["title"]); if ($tryoembed) { @@ -84,9 +88,13 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) { } if (trim($data["description"]) != "") { - $text .= sprintf('
%s
', trim(bbcode($data["description"]))); + $text .= sprintf('
%s
', trim(bbcode($data["description"]))); } } + + if ($simplehtml != 4) { + $text .= '
'; + } } return trim($data["text"].' '.$text.' '.$data["after"]); } @@ -531,10 +539,9 @@ function bb_ShareAttributes($share, $simplehtml) { break; case 4: - $headline = '
'; - $headline .= ''.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8'); + $headline .= '
'.html_entity_decode("♲ ", ENT_QUOTES, 'UTF-8'); $headline .= sprintf(t('%2$s %3$s'), $link, $userid, $posted); - $headline .= ":
"; + $headline .= ":
"; $text = trim($share[1]); -- 2.39.5