51 Commits

Author SHA1 Message Date
Ferywir afbba3f841 fix(reports): pass aid on vilview report links so ally reports open [#246] (#247) 2026-06-21 21:04:56 +03:00
Ferywir 63c94fa961 feat(preferences): apply time preference (timezone + date format) [#198]
Implement the "Time Preference" section of the player preferences (issue
#198), which until now was stored in DB but never applied in-game.

procMtime() — the central date/time formatter used across reports, messages,
notices and troop movements — now honours the per-user settings:
  - timezone: the stored value is mapped to a DateTimeZone, either a named
    DST-aware region (Europe, UK, Turkey, Kolkata, Bangkok, New York,
    Chicago, New Zealand) or a fixed UTC offset (general zones); timestamps
    are converted before formatting.
  - tformat: drives the date layout and 12h/24h clock (0=EU dd.mm.yy 24h,
    1=US mm/dd/yy 12h, 2=UK dd/mm/yy 12h, 3=ISO yy/mm/dd 24h). tformat 0
    keeps the previous EU output unchanged.

The today/yesterday sentinels are preserved (callers compare them) and are
computed in the player's timezone. The time-only path (mode 9) stays 24h
H:i:s because it feeds the live JS clock counters (unx.js), which parse
"H:i:s" by splitting on ":". A few alliance/report/farm-list rows that
combined procMtime's day part with a raw date('H:i') now take the time from
the same procMtime result, to avoid mixing timezones.

A second "local time" clock is shown next to the server-time one: a small
vanilla-JS snippet emitted once from menu.tpl finds the visible #tp1 clock
and appends a row ticking in the player's timezone (Date.now() + UTC offset),
independent of the browser timezone and of the unx.js counters. It aligns the
value under the server time, is skipped when the player's timezone matches
the server's, and lets the clock box grow so the extra row fits the frame.

Adds the LOCAL_TIME string (EN/FR/RO). When no player session is available
(admin / pre-login) procMtime falls back to the server timezone and EU
layout, i.e. the previous behaviour. Removes the last "not coded yet" tag
from the preferences form.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-12 16:46:33 +03:00
Ferywir 08bb464540 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>
2026-06-11 18:41:04 +03:00
Ferywir 5d366284e6 l10n: full interface translation (FR/RO/IT/ZH) + EN fallback hardening (#186) 2026-06-09 10:28:59 +03:00
novgorodschi catalin 1a4014218c Fix something broken
Fix something broken
2026-06-04 12:35:53 +03:00
novgorodschi catalin 05bfde9063 Remove some unused code and some fix
Remove some unused code and some fix
2026-05-21 13:12:21 +03:00
Catalin Novgorodschi a91f2a8c96 Incremental Refactor Templates 5
Incremental Refactor Templates 5
2026-05-07 15:24:54 +03:00
Catalin Novgorodschi 8901c36c06 Incremental Refactor Templates 2
Incremental Refactor Templates 2
2026-05-07 08:24:40 +03:00
kiliczsh f3d31328e0 Fix PHP opening tag in mapviewlarge.tpl 2025-11-14 09:56:16 +03:00
Catalin Novgorodschi d4a87a74c8 Update mapviewlarge.tpl 2025-10-28 08:17:31 +02:00
lietuvis10 fcbaefc90e Update mapviewlarge.tpl
Updated mapviewlarge to not go over WORLD_MAX or -WORLD_MAX. Now when you go to WORLD_MAX it works same like smaller map that goes from lets say 50;50 to x axis -50;50 or y axis 50;50 to 50;-50 (WORLD_MAX 50x50 in this example).
2025-10-27 14:18:57 +02:00
Catalin Novgorodschi 59c1114b1c Change some text on license TravianZ 2025-02-11 11:22:22 +02:00
221V 9fba876685 tr - rm dublicates 2024-12-11 15:48:36 +02:00
Shadow 4c68d8dd39 Update to version 8.3.5
Many Fixes
2022-02-18 13:56:17 +02:00
Shadow 5bc1633182 Block folder accces
+404 error
2018-06-13 11:17:18 +03:00
Catalin Novgorodschi 8af84113e5 fix view of crop finder 2018-06-07 08:21:56 +03:00
iopietro f0b9f32826 General fixes
+Moved "isWinner()" method from Automation.php to Session.php, it's now
triggered when activating plus function or entering in
plus1.php/build.php
+General clean-up and better indentation
+The tournament square bonus is now displayed correctly
2018-05-22 00:33:09 +02:00
iopietro 0322a0ae49 General fixes
+Fixed a bug that permitted to see troops movement with a 0 level rally
point
+Fixed a bug that permitted to send attacks, enforcements, etc. with a 0
level rally point
+Fixed a bug that counted the moral bonus for attacks against WW
villages
+Fixed a bug that didn't permit to finish all buildings/researches, etc.
without a plus account
+Recoded part of Natars timer for being more generic
+Natars/Artifacts spawn, WW villages spawn, WW building plans spawn are
now based on the start date of the server and not on the installation
date
+Better indentation of some code
2018-05-18 15:46:15 +02:00
iopietro 996f011666 Fixed some report bugs
+Added the report type 23, which indicates a defence during festive days
+Festive reports in the alliance no longer duplicates
+Festive reports in the village view no longer duplicates
+Fixed a bug that didn't permit to read an allied report

General:
-Removed the possibility to view an inexistent village
+Some minor improovements
2018-04-21 17:28:20 +02:00
Vladyslav 69a986b612 Small fix for closing a large map
The large map was closed with an ordinary arrow, now it will be hand pointer.
And some minor corrections in phrases.
2018-04-12 11:09:29 +03:00
iopietro 9e44c1cd6d Some replacements
+Replaced all $GLOBALS['link'] with $database->dblink
-Removed Templates/links.tpl from build.php (it's already in
Templates/menu.tpl)
2018-04-08 19:55:28 +02:00
Pietro b1aecea890 Fixed a bug in the map
Enforcements/scouts/attacks are now tracked in the map if you've a plus account.
2018-04-04 15:39:03 +02:00
Vladyslav 5ccbe54642 Oasis is written twice
Now it is displayed normally. https://github.com/Shadowss/TravianZ/issues/457
2018-01-05 23:06:52 +02:00
Martin Ambrus 43dfea920b fix: unable to attack players with Multihunter access rights 2017-12-02 14:18:28 +01:00
Martin Ambrus ee017adb40 refactor: most of broad SELECTs updated
Closes #301
2017-11-05 14:35:19 +01:00
Martin Ambrus 042d36e108 fix: undefined constant 2017-11-03 17:14:02 +01:00
Martin Ambrus 53f54ce9e9 feat: Admins can be attacked, raided and traded with via config option 2017-10-22 20:28:03 +02:00
Martin Ambrus 09f44c9846 feat: combat simulator link for non-empty oasis 2017-10-21 23:35:43 +02:00
Martin Ambrus ac5d3538f8 fix: mysqli_error needs MySQLi connection as parameter 2017-10-17 13:05:13 +02:00
Martin Ambrus 68619ac892 fix: big map centered on page + closeable
This commit also updates the hardcoded cache booster ID, as CSS+JS 
changed to accomplish the map fix.
2017-09-11 21:11:44 +02:00
evader1337 2d26af7c46 Trying to fix this monstrosity #2 2016-09-13 18:54:25 +02:00
Domen Kajdič 2cf2f3c343 Trying to fix this monstrosity #1 2016-09-13 15:38:14 +02:00
TienTN 33c334801e Fix the map moving bug which will cause map hanging.
Please read for detail README in the #6 entry.
2016-09-04 12:33:34 +07:00
Shadow 0f17bbd3f1 Update mapview.tpl 2014-09-26 11:05:00 +03:00
Shadow d712dd10d0 Update mapview.tpl 2014-09-26 11:04:30 +03:00
armando1980 305bc76665 fix lang tempalte/map by: Armando 2014-05-16 12:23:48 -04:00
Shadow 6b73de8eed vacation mode 2014-03-12 09:23:20 +02:00
Shadow 0231274907 lang update 2014-02-17 08:11:54 +02:00
Shadow 9336155f28 Update vilview.tpl 2014-01-24 14:47:40 +02:00
Shadow 9b222a6114 Update vilview.tpl 2014-01-24 14:46:05 +02:00
Shadow 89fa5ec11b Update vilview.tpl 2013-12-21 10:35:13 +02:00
Shadow ef549e60c1 Update mapviewlarge.tpl 2013-12-13 09:24:27 +02:00
Shadowss d0b26a9eb3 fix New Village must build a rally point 2013-10-25 09:46:15 +03:00
yi12345 792515c8ed fix bug 10 (not %100, not shown after scroll) and bug 5 from the buglist + update Templates/movement.tpl 2013-09-25 15:42:31 +03:00
yi12345 f58db26459 Merge pull request #355 from Shadowss/patch-62
fixed img show on map , now view correctly.
2013-09-25 02:52:02 -07:00
Shadowss 5b77be0a06 fixed img show on map , now view correctly. 2013-09-25 07:43:45 +03:00
Shadowss 222e414772 fixed img show on map , now view correctly.
In next update we hope we can make to view spy and enforcement
2013-09-25 07:37:51 +03:00
yi12345 4729757d75 update 2013-09-24 13:41:38 +03:00
Shadowss b7a759c071 Now img show on map when you attack 2013-09-24 10:46:06 +03:00
Shadowss 94dbc6d39e Fixed bug number 4 from list , resource on vilveiw forgot something to close now all is ok 2013-08-16 13:36:16 +03:00