From 844c54b0c323cb1cbbe0f5b0d5ec8724be49eed4 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 1 Jun 2020 21:54:04 +0200 Subject: [PATCH] Use developer URL in game details page and all games list --- bin/build-html.php | 2 ++ bin/import-game-data.php | 1 + data/templates/allgames.tpl.php | 8 +++++++- data/templates/game.tpl.php | 11 ++++++++--- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/bin/build-html.php b/bin/build-html.php index 18e25e5..c00f811 100755 --- a/bin/build-html.php +++ b/bin/build-html.php @@ -62,6 +62,7 @@ function renderAllGamesList($detailsFiles) 'title' => $json->title, 'genres' => $json->genres, 'developer' => $json->developer->name, + 'developerUrl' => $json->stouyapi->{'developer-url'} ?? null, 'suggestedAge' => $json->suggestedAge, 'apkVersion' => $json->version->number, 'apkTimestamp' => $json->version->publishedAt, @@ -168,6 +169,7 @@ function renderGameFile($gameDataFile) */ $internetArchiveUrl = $json->stouyapi->{'internet-archive'} ?? null; + $developerUrl = $json->stouyapi->{'developer-url'} ?? null; $pushUrl = $GLOBALS['pushToMyOuyaUrl'] . '?game=' . urlencode($json->apk->package); diff --git a/bin/import-game-data.php b/bin/import-game-data.php index cfd1630..e90ccc9 100755 --- a/bin/import-game-data.php +++ b/bin/import-game-data.php @@ -517,6 +517,7 @@ function buildDetails($game) 'stouyapi' => [ 'internet-archive' => $iaUrl, + 'developer-url' => $game->developer->website ?? null, ] ]; } diff --git a/data/templates/allgames.tpl.php b/data/templates/allgames.tpl.php index 613caad..ded0ebd 100644 --- a/data/templates/allgames.tpl.php +++ b/data/templates/allgames.tpl.php @@ -34,7 +34,13 @@ title) ?> - developer) ?> + + developerUrl): ?> + developer) ?> + + developer) ?> + + suggestedAge) ?> players)) ?> genres)) ?> diff --git a/data/templates/game.tpl.php b/data/templates/game.tpl.php index 621049c..4f7779e 100644 --- a/data/templates/game.tpl.php +++ b/data/templates/game.tpl.php @@ -23,8 +23,8 @@
Developer
- app->website): ?> - developer->name) ?> + + developer->name) ?> developer->name) ?> @@ -82,7 +82,12 @@
- Internet Archive page + Internet Archive +
+ + app->website): ?> +
+ Game website
-- 2.30.2