Commit Graph

3130 Commits

Author SHA1 Message Date
Ferywir 95df9b9018 Fix HTTP 500 when queuing a 2nd Smithy/Armoury upgrade of the same unit (#173) 2026-06-04 19:51:37 +03:00
novgorodschi catalin 6e1899a21e Fix alliance capacity
Fix alliance capacity
2026-06-04 15:14:35 +03:00
novgorodschi catalin 2b6277af06 Another correction for language
Another correction for language
2026-06-04 14:14:17 +03:00
novgorodschi catalin e2dfefa0b7 Close tr
Close tr
2026-06-04 13:56:29 +03:00
novgorodschi catalin 4eecf575a1 Fix some lang problems
Fix some lang problems & added in admin panel
2026-06-04 13:54:15 +03:00
novgorodschi catalin 33b7261b4b Change some file
Change some file
2026-06-04 13:39:59 +03:00
novgorodschi catalin efbb2bc89a Fix lang server set
Fix lang server set
2026-06-04 13:19:10 +03:00
Catalin Novgorodschi 28ddc72c01 Merge pull request #175 from Ferywir/feat/per-user-language
Add per-user language selection (closes #166)
2026-06-04 13:15:24 +03:00
novgorodschi catalin 1a4014218c Fix something broken
Fix something broken
2026-06-04 12:35:53 +03:00
novgorodschi catalin 64285e3c7b Merge branch 'master' of https://github.com/Shadowss/TravianZ 2026-06-04 10:18:16 +03:00
novgorodschi catalin 208f4bc31c Update menu.tpl 2026-06-04 10:18:09 +03:00
Catalin Novgorodschi 9f5ff60840 Merge pull request #172 from Ferywir/fix/admin-system-message-404
Add missing handler for admin "Create System Message"
2026-06-04 10:10:36 +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 11ce6e6052 Added Romanian Language
Added Romanian Language
2026-06-04 09:39:44 +03:00
TravianZ Patcher 903c4a3285 Add missing handler for admin "Create System Message"
The admin panel had a "Create System Message" page (admin.php?p=sysmessage
-> Admin/Templates/sysmessage.tpl) whose form posts to
GameEngine/Admin/Mods/sysmessage.php, but that backend file never existed,
so submitting returned a 404 (Not Found).

Add the handler implementing the prepare -> confirm -> execute flow used by
the template. On execute it displays a global system message to all players
using the existing mechanism (writes Templates/text.tpl from
text_format.tpl and sets users.ok = 1), same as the legacy sysmsg.php.
%TEKST% is escaped for the PHP double-quoted string context to avoid
breakage/injection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 07:34:57 +02:00
Catalin Novgorodschi 950902f8e1 Merge pull request #171 from Ferywir/l10n/french-and-swiss-timezone
L10n/french and swiss timezone
2026-06-04 07:37:14 +03:00
Catalin Novgorodschi 5e6bb4f1ed Merge pull request #170 from Ferywir/fix/issue-169-install-and-admin-bugs
Fix install + admin bugs reported in issue #169
2026-06-04 07:35:51 +03:00
TravianZ Patcher 2f2f0f5a47 Add Swiss timezone (Europe/Zurich) to timezone selectors
The timezone lists are hardcoded. Add "Europe (Switzerland)" =
Europe/Zurich to:
- Admin/Templates/editServerSet.tpl (admin: edit server settings)
- install/templates/config.tpl (install wizard, index 14)
- install/index.php (install wizard tz index->name mapping, case 14)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 11:28:09 +02:00
TravianZ Patcher 46d63e737c Add French (fr) to the language selectors
The language dropdowns are hardcoded (they don't scan GameEngine/Lang/),
so the existing fr.php never appeared. Add a French option to:
- install/templates/config.tpl (install wizard)
- Admin/Templates/editServerSet.tpl (admin: edit server settings)
- Admin/Templates/config.tpl (admin: server config display)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 11:28:09 +02:00
TravianZ Patcher df003184c8 Add French (fr) translation by Ferywir
Replace GameEngine/Lang/fr.php with a complete, reviewed French
translation:
- Full coverage: all 1439 language keys present (matches en.php), none
  missing or extra.
- Valid PHP: all French apostrophes properly escaped, no unterminated
  strings.
- Months localized, quest tutorial numbering kept consistent with en.php.
- Fixed gender agreement on EMAIL_TAKEN ("Cet e-mail ... utilisé").

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 11:28:09 +02:00
novgorodschi catalin 18233f7c1b Redesign login page & main page in Admin Panel
Redesign login page & main page in Admin Panel
2026-06-03 11:43:59 +03:00
TravianZ Patcher 7a013c38e3 Fix install + admin bugs reported in issue #169
Addresses the five bugs found on master (6e139a1b) during a fresh
Docker install and admin testing:

1. Missing `details` column in gold_fin_log (HTTP 500 on finishing
   construction with gold, buying Gold Club, admin giving gold):
   - Add `details varchar(255)` to the gold_fin_log schema, matching
     every INSERT and the a2b2.php reader that already use it.
   - Fix the broken positional INSERT in Logging::goldFinLog() (it sent
     3 values for a 7-column table) which 500'd on the same gold path.

2. Admin "View Player Info" fatal error: `<? php` -> `<?php` in
   Admin/Templates/playerinfo.tpl.

3. "Reset Server" leaving the DB corrupted (Duplicate key name
   'idx_ft_bonus_xy'): move the croppers indexes inline into the
   CREATE TABLE IF NOT EXISTS so structure recreation is idempotent,
   and add `croppers` to the reset truncate list.

4. Install wizard crash on failed DB connection (mysqli_error(false)):
   use mysqli_connect_error() and show a friendly, actionable message
   (incl. the Docker "db" hostname hint).

5. PHP exposing errors/stack traces to end users: ship a production
   php.ini baseline + docker/php/zz-travianz.ini that turns off
   display_errors and logs to stderr instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 08:32:00 +02:00
novgorodschi catalin 6e139a1b61 Fix
fix
2026-06-02 14:20:21 +03:00
novgorodschi catalin 37397a63bc Fix msg in admin panel
Fix msg in admin panel
2026-06-02 13:16:44 +03:00
novgorodschi catalin b495dcb559 Some fix
Some fix
2026-06-02 12:58:20 +03:00
novgorodschi catalin 888b4848e4 Fix hero svg in admin panel
Fix hero svg in admin panel
2026-06-02 12:17:08 +03:00
novgorodschi catalin cfbfa0a465 Fix sysmsg
Fix sysmessage
2026-06-02 12:04:31 +03:00
novgorodschi catalin 66a3c5d34f Translate some code
Translate some code
2026-06-02 11:35:35 +03:00
novgorodschi catalin 53cef401bf fix popup
fix popup
2026-06-02 11:10:42 +03:00
novgorodschi catalin 547e164143 Edit some access for MH user and recreate mass messaage
Edit some access for MH user and recreate mass message and new maintenance system view for admins
2026-06-02 10:59:35 +03:00
novgorodschi catalin 2eaa92fc03 Fix gold log script
Fix gold log script
2026-06-02 08:10:46 +03:00
Catalin Novgorodschi 04a1565155 Update accounts.php 2026-05-31 09:58:03 +03:00
novgorodschi catalin dbe20c49b5 Some last fix for logs! 2026-05-28 13:22:27 +03:00
novgorodschi catalin 1d1f1dc72a Fix + Redesign
Fix some error programing code and redesign special medals, tribe medals, mh medals, taskmaster medals, natars medals, nature medals, protection medals, etc. Add some language code in Profile.php and preference.tpl. Change some description in struct database for Nature and Taskmaster
2026-05-28 12:25:28 +03:00
novgorodschi catalin a9650e1624 Fix caps look del alli
Fix caps look del alli
2026-05-27 13:22:35 +03:00
novgorodschi catalin b31a0a3f92 Fix edit resources
Fix edit resources
2026-05-27 13:09:24 +03:00
novgorodschi catalin 31c475e644 Fix + Credits + Start Language Coding
Fix Artefacts + Credits + Start Language Coding
2026-05-27 12:26:24 +03: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
novgorodschi catalin fe19587c90 Redesign install system & New Medal System
Redesign install system & New Medal System

Artefact Holder			[#ARTEFACT]
WW Builder			[#WWBUILDER]
Great Store			[#GREATSTORE]
Wall Master			[#WALLMASTER]
Hero 99+			[#HERO100]
2026-05-26 10:42:28 +03:00
novgorodschi catalin 8c3ab3e5eb Fix some bugs + added (coded delAli)
Fix some bugs + added (coded delAli)
2026-05-25 12:37:33 +03:00
novgorodschi catalin a4e2c506a8 Redesign Admin Panel
Full frontend & backend redesign and refactor
2026-05-25 10:23:39 +03:00
Catalin Novgorodschi 8e3f4e16a9 Update struct.sql v10-full-refactor 2026-05-24 10:34:13 +03:00
novgorodschi catalin a3100fb691 Redesign Admin Panel Second Round
Redesign Admin Panel Second Round
2026-05-22 15:16:47 +03:00
novgorodschi catalin 62c86380a4 Redesign Admin Panel First Round
Redesign Admin Panel First Round
2026-05-22 15:12:37 +03:00
novgorodschi catalin 1e22dd22bf Merge branch 'master' of https://github.com/Shadowss/TravianZ 2026-05-22 11:30:26 +03:00
novgorodschi catalin 3fa16f13b2 Full Refactor Admin Panel & Logs
Full Refactor Admin Panel & Logs (now you can see detailed logs in admin panel) - ONLY BACKED
2026-05-22 11:29:37 +03:00
novgorodschi catalin d636065b80 Full Refactor Admin Panel & Logs
Full Refactor Admin Panel & Logs (now you can see detailed logs in admin panel)
2026-05-22 11:26:50 +03:00
novgorodschi catalin 29b8e91968 Last incremental refactor for Template/a2b
Last incremental refactor for Template/a2b
2026-05-21 14:46:43 +03:00
novgorodschi catalin dd64b1e6c7 Refactor GoldClub
Refactor GoldClub
2026-05-21 13:41:48 +03:00