diff options
author | lolcat <will@lolcat.ca> | 2023-08-08 03:09:47 -0400 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2023-08-08 03:09:47 -0400 |
commit | 4559857380317d768ff8394db711eb5c894aa1f8 (patch) | |
tree | 2ed555b5ba104297642893ef5511d1d28f282842 /images.php | |
parent | 7c771c82c8e03b337f9f03ae2d4afc25d3f0faca (diff) |
added brave image+video support
Diffstat (limited to 'images.php')
-rw-r--r-- | images.php | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -62,8 +62,13 @@ foreach($results["image"] as $image){ '<div class="image-wrapper" title="' . htmlspecialchars($image["title"]) .'" data-json="' . htmlspecialchars(json_encode($image["source"])) . '">' . '<div class="image">' . '<a href="' . htmlspecialchars($image["source"][0]["url"]) . '" rel="noreferrer nofollow" class="thumb">' . - '<img src="' . $frontend->htmlimage($image["source"][count($image["source"]) - 1]["url"], "thumb") . '" alt="thumbnail">' . - '<div class="duration">' . $image["source"][0]["width"] . 'x' . $image["source"][0]["height"] . '</div>' . + '<img src="' . $frontend->htmlimage($image["source"][count($image["source"]) - 1]["url"], "thumb") . '" alt="thumbnail">'; + + if($image["source"][0]["width"] !== null){ + $payload["images"] .= '<div class="duration">' . $image["source"][0]["width"] . 'x' . $image["source"][0]["height"] . '</div>'; + } + + $payload["images"] .= '</a>' . '<a href="' . htmlspecialchars($image["url"]) . '" rel="noreferrer nofollow">' . '<div class="title">' . htmlspecialchars(parse_url($image["url"], PHP_URL_HOST)) . '</div>' . |