25 Commits

Author SHA1 Message Date
Ferywir 886f421f50 fix(admin): verify CSRF token in server-settings admin Mods [#139] (#268) 2026-06-23 16:12:54 +03:00
TravianZ Patcher 421915f774 Add per-user language selection (issue #166)
The profile already had a language selector (Templates/Profile/preference.tpl)
that saved the choice into users.lang and $_SESSION['lang'], but the saved
preference was never used to actually load the language: every page loads
include("Lang/".LANG.".php") with the server-wide LANG constant, so changing
the language in the profile had no visible effect.

This wires it up:

- Introduce SERVER_LANG (the server default) and make LANG the EFFECTIVE
  display language, resolved from the player's saved preference
  ($_SESSION['lang']) with a fallback to SERVER_LANG
  (install/data/constant_format.tpl).
  SECURITY: the value is sanitized to [a-z_] and the target Lang/<x>.php
  file must exist, otherwise we fall back to the server default. This
  prevents Local File Inclusion via include("Lang/".LANG.".php").

- Seed $_SESSION['lang'] from users.lang on login (GameEngine/Session.php,
  PopulateVar), so the chosen language applies right after logging in.

- Keep the SERVER default intact when an admin saves settings: the admin
  config regenerators and the "Server Settings"/config displays now use
  SERVER_LANG (the server default) instead of the per-user LANG, so an
  admin browsing in their own language can't accidentally overwrite the
  server default (6 Admin/Mods/edit*.php + editServerSet.tpl + config.tpl).

Note: existing installs must also add SERVER_LANG + the LANG resolution to
their generated GameEngine/config.php (and the Admin/Mods/constant_format.tpl
copy) since config is generated at install time.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:07:57 +02:00
novgorodschi catalin 1b119d2a35 Fix special medals
Fix special medals
2026-05-26 14:42:19 +03:00
novgorodschi catalin 24fb80371d Fix special medal system
Fix special medal system
2026-05-26 12:34:50 +03:00
Vladyslav d59aa8e072 Minor changes and additions
+Added a medal of 10 years of playing in Travian.
Enabled (Disabled) during installation and in the
admin panel.
+If at least one of the new functions is enabled,
a corresponding section appears in the Manual
with a description of all the new functions and
shows which of them is Enabled or Disabled.
+Minor changes
2018-09-03 22:05:54 +03:00
Vladyslav b9ceb86392 Some improvements and changes
+Added the ability to change the position of Direct links
+Added the ability to Enable (Disable) veteran medals
2018-08-31 17:15:53 +03:00
Vladyslav c9d18675ce Minor changes
+Added Enable (Disable) of information about the troops of Nature and Natars in the manual

NOTE 1: To play this version of the game, you need to reinstall the server OR you can simply add these lines of code into your file:

GameEngine/config.php

define("NEW_FUNCTIONS_MANUAL_NATURENATARS", false);

GameEngine/Admin/Mods/constant_format.tpl

define("NEW_FUNCTIONS_MANUAL_NATURENATARS", %NEW_FUNCTIONS_MANUAL_NATURENATARS%);

NOTE 2: pay special attention to the fact that these are two different records !!! If the records are entered incorrectly, you will receive a non-working code!
2018-08-28 17:08:46 +03:00
Vladyslav 22548258f0 Minor changes and additions
+Added the ability to Enable (Disable) the display of the targets of the catapults in the rally point
+Added the display of the village with a wonder of the world (as is done with the display of artifacts) in the viewing player profiles. Also this function is Enabled (Disable) during installation and in the admin panel.
2018-08-27 18:15:53 +03:00
Vladyslav 3f64e4f3bc Enable (Disable) Vacation Mode
+Enable (Disable) Vacation Mode
+Fixed an error displaying the icon to
delete the villages in the admin search

NOTE 1: To play this version of the game, you need
to reinstall the server OR you can simply add
these lines of code into your file:

GameEngine/config.php

define("NEW_FUNCTIONS_VACATION", false);

GameEngine/Admin/Mods/constant_format.tpl

define("NEW_FUNCTIONS_VACATION", %NEW_FUNCTIONS_VACATION%);

NOTE 2: pay special attention to the fact that these are two
different records !!! If the records are entered incorrectly,
you will receive a non-working code!
2018-06-26 20:52:47 +03:00
Vladyslav dffdcc4411 Enable (Disable) some new features
+Enable (Disable) New forum post message
+Enable (Disable) Tribes images in profile
+Enable (Disable) MHs images in profile
+Enable (Disable) Display artifact in profile
+Minor changes

NOTE 1: To play this version of the game, you need to reinstall
the server OR you can simply add these lines of code into your file:
ameEngine/config.php

define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", False);
define("NEW_FUNCTIONS_TRIBE_IMAGES", False);
define("NEW_FUNCTIONS_MHS_IMAGES", False);
define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", False);

GameEngine/Admin/Mods/constant_format.tpl

define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", %NEW_FUNCTIONS_FORUM_POST_MESSAGE%);
define("NEW_FUNCTIONS_TRIBE_IMAGES", %NEW_FUNCTIONS_TRIBE_IMAGES%);
define("NEW_FUNCTIONS_MHS_IMAGES", %NEW_FUNCTIONS_MHS_IMAGES%);
define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", %NEW_FUNCTIONS_DISPLAY_ARTIFACT%);

NOTE 2: pay special attention to the fact that these are two
different records !!! If the records are entered incorrectly,
you will receive a non-working code!
2018-06-25 21:06:30 +03:00
Vladyslav c1eb10b19b Enable (Disable) Alliance invitation message
+Now during the installation (or after installation in the admin panel) you can Enable (Disable) sending an in-game message to the player, if he was invited to the alliance.
+Preparing the code for Enable (Disable) "New Alliance & Embassy Mechanics"

NOTE 1: To play this version of the game, you need to reinstall the server OR you can simply add these lines of code into your file:
GameEngine/config.php

define("NEW_FUNCTIONS_ALLIANCE_INVITATION", True);
define("NEW_FUNCTIONS_EMBASSY_MECHANICS", False);

GameEngine/Admin/Mods/constant_format.tpl

define("NEW_FUNCTIONS_ALLIANCE_INVITATION", %NEW_FUNCTIONS_ALLIANCE_INVITATION%);
define("NEW_FUNCTIONS_EMBASSY_MECHANICS", %NEW_FUNCTIONS_EMBASSY_MECHANICS%);

NOTE 2: pay special attention to the fact that these are two different records !!! If the records are entered incorrectly, you will receive a non-working code!

NOTE 3: it is also necessary to follow the instructions with this change (if they were not previously executed) https://github.com/Shadowss/TravianZ/commit/11ae61c013d663304086ecfd5d845040ebf2f144
2018-06-20 19:34:05 +03:00
Vladyslav 11ae61c013 Enable and disable display of oases
+Now during the installation (or after installation in the admin panel) you can enable or disable oasis display for villages in the player profile.

NOTE: To play this version of the game, you need to reinstall the server OR you can simply add these lines of code into your file:
GameEngine/config.php

/////////////////////////////////////////////////
//   ****  NEW MECHANICS AND FUNCTIONS  ****   //
/////////////////////////////////////////////////
define("NEW_FUNCTIONS_OASIS", True);

GameEngine/Admin/Modsconstant_format.tpl

/////////////////////////////////////////////////
//   ****  NEW MECHANICS AND FUNCTIONS  ****   //
/////////////////////////////////////////////////
define("NEW_FUNCTIONS_OASIS", %NEW_FUNCTIONS_OASIS%);

NOTICE 2: pay special attention to the fact that these are two different records !!! If the records are entered incorrectly, you will receive a non-working code!
2018-06-20 16:57:13 +03:00
iopietro 0d8ea38f30 Fixed #540 2018-05-21 17:04:21 +02:00
Martin Ambrus 0134b0abe9 fix: old version cannot save config data anymore 2017-11-22 12:21:16 +01:00
Martin Ambrus 30fc76e85b fix: old version cannot save config data anymore 2017-11-22 12:20:05 +01:00
Martin Ambrus 312507fe9f feat: MySQL port into installation options
Closes #279
2017-11-07 12:30:32 +01:00
Martin Ambrus 8a7f12268c fix: logging works, tech log link added to Admin 2017-11-07 10:34:50 +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 965ba37f67 feat: Admins can see Support messages if set in config 2017-10-22 14:47:27 +02:00
Martin Ambrus 331885a110 fix: remove SQL injections in Admin 2017-10-19 21:17:11 +02:00
Martin Ambrus d9b6eadd1b fix: extra settings correctly keep PLUS and other server settings 2017-10-09 19:45:56 +02:00
Martin Ambrus 2f5156cdbc fix: extra settings correctly keep PLUS settings 2017-10-09 19:31:38 +02:00
uroskn 1afde368d3 GameEngine and install folders have 777 already set by default 2016-07-02 21:39:28 +02:00
sempoi 9689ccb2c1 Update editExtraSet.php 2014-03-08 16:14:23 +08:00
Shadow 923b4b3e18 updates admin 2014-02-26 07:38:09 +02:00