From 5c80111da6c30bf8daca6bd7e880b29d7b33f8ba Mon Sep 17 00:00:00 2001 From: Squibid Date: Mon, 9 Oct 2023 09:01:06 -0400 Subject: better meta tags + image previews --- style/header.php | 12 +++++++++--- view.php | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/style/header.php b/style/header.php index 79a4479..0e3f832 100644 --- a/style/header.php +++ b/style/header.php @@ -8,9 +8,15 @@ $_GET["Anime"] ? $Anime = "checked" : $Anime = NULL; $_GET["People"] ? $People = "checked" : $People = NULL; - printf("\nWallHeaven - %s\n", $_GET["q"]); - printf("\n", $_GET["q"]); - echo <<\nWallHeaven - %s\n", $_GET["q"]); + printf("\n", $_GET["q"]); + } else { + printf("\nWallHeaven - Viewing A Wallpaper\n", $_GET["w"]); + printf("\n", $_GET["w"]); + } + +?> diff --git a/view.php b/view.php index 697a7a9..5b8c5aa 100644 --- a/view.php +++ b/view.php @@ -17,6 +17,9 @@ $wall = getwallpaper("https://wallhaven.cc/api/v1/w/$_GET[w]?apikey=$apikey"); $_POST['wall'] = $wall["path"]; } + /* set meta tag */ + printf("", $_POST['wall']); + printf(""); /* get wallpaper id and get info from api */ preg_match("/(?!.*-)([A-Za-z0-9]+)/", $_POST['wall'], $matches); if ($_POST['purity'] === "nsfw") -- cgit v1.2.1