mirror of
https://github.com/friendica/friendica
synced 2025-04-25 15:10:13 +00:00
Fix: Posts with pictures will now look good again on connector networks
This commit is contained in:
parent
31cbc80981
commit
04fb885857
3 changed files with 8 additions and 9 deletions
|
@ -578,7 +578,10 @@ class BBCode extends BaseObject
|
|||
$return .= sprintf('<a href="%s" target="_blank"><img src="%s" alt="" title="%s" class="attachment-preview" /></a><br />', $data["url"], self::proxyUrl($data["preview"], $simplehtml), $data["title"]);
|
||||
}
|
||||
|
||||
if (!empty($data['title']) && !empty($data['url'])) {
|
||||
// Show a picture only when the BBCode is meant for posts to connector networks
|
||||
if (($simplehtml != 0) && ($data["type"] == "photo") && !empty($data["url"]) && !empty($data["image"])) {
|
||||
$return .= sprintf('<a href="%s" target="_blank"><img src="%s" alt="" title="%s" class="attachment-image" /></a>', $data["url"], self::proxyUrl($data["image"], $simplehtml), $data["title"]);
|
||||
} elseif (!empty($data['title']) && !empty($data['url'])) {
|
||||
$return .= sprintf('<h4><a href="%s">%s</a></h4>', $data['url'], $data['title']);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue