Merge pull request #3631 from annando/1708-libertree

Shared posts to Libertree now look better.
This commit is contained in:
Tobias Diekershoff 2017-08-15 07:44:53 +02:00 committed by GitHub
commit d2b7a44299

View file

@ -59,7 +59,11 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
} elseif (($simplehtml != 4) && ($simplehtml != 0)) { } elseif (($simplehtml != 4) && ($simplehtml != 0)) {
$text = sprintf('<a href="%s" target="_blank">%s</a><br>', $data["url"], $data["title"]); $text = sprintf('<a href="%s" target="_blank">%s</a><br>', $data["url"], $data["title"]);
} else { } else {
if ($simplehtml != 4) {
$text = sprintf('<span class="type-%s">', $data["type"]); $text = sprintf('<span class="type-%s">', $data["type"]);
} else {
$span_end = '';
}
$bookmark = array(sprintf('[bookmark=%s]%s[/bookmark]', $data["url"], $data["title"]), $data["url"], $data["title"]); $bookmark = array(sprintf('[bookmark=%s]%s[/bookmark]', $data["url"], $data["title"]), $data["url"], $data["title"]);
if ($tryoembed) { if ($tryoembed) {
@ -84,9 +88,13 @@ function bb_attachment($Text, $simplehtml = false, $tryoembed = true) {
} }
if (trim($data["description"]) != "") { if (trim($data["description"]) != "") {
$text .= sprintf('<blockquote>%s</blockquote></span>', trim(bbcode($data["description"]))); $text .= sprintf('<blockquote>%s</blockquote>', trim(bbcode($data["description"])));
} }
} }
if ($simplehtml != 4) {
$text .= '</span>';
}
} }
return trim($data["text"].' '.$text.' '.$data["after"]); return trim($data["text"].' '.$text.' '.$data["after"]);
} }
@ -531,10 +539,9 @@ function bb_ShareAttributes($share, $simplehtml) {
break; break;
case 4: case 4:
$headline = '<div class="shared_header">'; $headline .= '<br /><b>'.html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8');
$headline .= '<span><b>'.html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8');
$headline .= sprintf(t('<a href="%1$s" target="_blank">%2$s</a> %3$s'), $link, $userid, $posted); $headline .= sprintf(t('<a href="%1$s" target="_blank">%2$s</a> %3$s'), $link, $userid, $posted);
$headline .= ":</b></span></div>"; $headline .= ":</b><br />";
$text = trim($share[1]); $text = trim($share[1]);