diff options
author | lolcat <will@lolcat.ca> | 2023-11-27 01:01:56 -0500 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2023-11-27 01:01:56 -0500 |
commit | 2519666e1c831f85836f9ce6d975d3ceb975c09d (patch) | |
tree | 86c68604aff9c7a0a430e70ef082195a4c3a717f /web.php | |
parent | 9fd993b47b8c1b6e3c9d9f0e8d43a85860230f59 (diff) |
google web, videos and news, various other fixes
Diffstat (limited to 'web.php')
-rw-r--r-- | web.php | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -146,9 +146,17 @@ if(count($results["image"]) !== 0){ $right["image"] .= '<a class="image" href="' . htmlspecialchars($image["url"]) . '" rel="noreferrer nofollow" title="' . htmlspecialchars($image["title"]) . '" data-json="' . htmlspecialchars(json_encode($image["source"])) . '" tabindex="-1">' . - '<img src="' . $frontend->htmlimage($image["source"][count($image["source"]) - 1]["url"], "square") . '" alt="thumb">' . - '<div class="duration">' . $image["source"][0]["width"] . 'x' . $image["source"][0]["height"] . '</div>' . - '</a>'; + '<img src="' . $frontend->htmlimage($image["source"][count($image["source"]) - 1]["url"], "square") . '" alt="thumb">'; + + if( + $image["source"][0]["width"] !== null && + $image["source"][0]["height"] !== null + ){ + + $right["image"] .= '<div class="duration">' . $image["source"][0]["width"] . 'x' . $image["source"][0]["height"] . '</div>'; + } + + $right["image"] .= '</a>'; } $right["image"] .= |