From 08bb464540c19383d86f5cc540791344905ebc82 Mon Sep 17 00:00:00 2001 From: Ferywir Date: Thu, 11 Jun 2026 16:55:40 +0200 Subject: [PATCH] feat(preferences): apply "Large map" preference (extra window) [#198] The `map` user preference ("Show the large map in an extra window") was saved to users.map but never applied in-game. When enabled, the large-map button on the map now opens karte2.php in a separate browser window instead of the in-page iframe overlay (default behaviour kept when the preference is off). Also drop the "(not coded yet)" marker from the Large map section of the preferences page and wire its title to the existing LARGE_MAP constant. Co-Authored-By: Claude Opus 4.8 --- Templates/Map/mapview.tpl | 9 ++++++++- Templates/Profile/preference.tpl | 5 +---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Templates/Map/mapview.tpl b/Templates/Map/mapview.tpl index 43ae4c35..7a55b46b 100644 --- a/Templates/Map/mapview.tpl +++ b/Templates/Map/mapview.tpl @@ -439,7 +439,14 @@ while ($donnees = mysqli_fetch_assoc($result2)) { function init_local(){map_init();} plus){ - echo ''.LARGE_MAP.''; + if(!empty($session->userinfo['map'])){ + // Preference "Show the large map in an extra window" (#198): + // open the large map (karte2.php) in a separate browser window + // instead of the in-page iframe overlay. + echo ''.LARGE_MAP.''; + } else { + echo ''.LARGE_MAP.''; + } }?> diff --git a/Templates/Profile/preference.tpl b/Templates/Profile/preference.tpl index fc469563..41ee994e 100644 --- a/Templates/Profile/preference.tpl +++ b/Templates/Profile/preference.tpl @@ -385,10 +385,7 @@ if(isset($_POST['lang'])) - Large map - - - +