mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:00:16 +00:00
Add a link to the post if "no preview" is selected
This commit is contained in:
parent
b5a69da872
commit
b72e32a842
1 changed files with 5 additions and 0 deletions
|
@ -3861,6 +3861,11 @@ class Item
|
|||
$preview_mode = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'preview_mode', BBCode::PREVIEW_LARGE);
|
||||
if ($preview_mode != BBCode::PREVIEW_NONE) {
|
||||
$rendered = BBCode::convertAttachment('', BBCode::INTERNAL, false, $data, $uriid, $preview_mode);
|
||||
} elseif (!self::containsLink($content, $data['url'], Post\Media::HTML)) {
|
||||
$rendered = Renderer::replaceMacros(Renderer::getMarkupTemplate('content/link.tpl'), [
|
||||
'$url' => $data['url'],
|
||||
'$title' => $data['title'],
|
||||
]);
|
||||
} else {
|
||||
$rendered = '';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue