mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
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:
committed by
Catalin Novgorodschi
parent
524b9e7edd
commit
08bb464540
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user