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 <noreply@anthropic.com>
This commit is contained in:
Ferywir
2026-06-11 16:55:40 +02:00
committed by Catalin Novgorodschi
parent 524b9e7edd
commit 08bb464540
2 changed files with 9 additions and 5 deletions
+8 -1
View File
@@ -439,7 +439,14 @@ while ($donnees = mysqli_fetch_assoc($result2)) {
function init_local(){map_init();}
</script><?php
if($session->plus){
echo '<a id="map_makelarge" href="#" onclick="PopupMap('.$bigmid.');" ><img class="ml" src="img/x.gif" alt="'.LARGE_MAP.'" title="'.LARGE_MAP.'"/></a>';
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 '<a id="map_makelarge" href="karte2.php?z='.$bigmid.'" target="bigmap" onclick="window.open(this.href, \'bigmap\', \'width=1020,height=600,scrollbars=yes,resizable=yes\'); return false;"><img class="ml" src="img/x.gif" alt="'.LARGE_MAP.'" title="'.LARGE_MAP.'"/></a>';
} else {
echo '<a id="map_makelarge" href="#" onclick="PopupMap('.$bigmid.');" ><img class="ml" src="img/x.gif" alt="'.LARGE_MAP.'" title="'.LARGE_MAP.'"/></a>';
}
}?>
<img id="map_navibox" src="img/x.gif" usemap="#map_navibox"/>
<map name="map_navibox">
+1 -4
View File
@@ -385,10 +385,7 @@ if(isset($_POST['lang']))
<thead>
<tr>
<th colspan="2">
Large map
<span style="color:#999; font-weight:400; font-size:0.9em; font-style:italic; opacity:0.7;">
<?php echo TZ_NOT_CODED_YET; ?>
</span>
<?php echo LARGE_MAP; ?>
</th>
</tr>
</thead>