The category panel gets "Alle anzeigen" / "Alle verstecken" buttons.
Tactics belong to a region and are split into steps, each its own drawing
layer: pen, arrow, line, area, circle, labelled point, text and eraser, with
colour, stroke width and undo. A new step can start empty or as a copy of the
current one, earlier steps can be shown faded underneath, and steps can be
renamed, reordered and deleted. Viewing needs map.view, editing map.tactics.
Drawings are stored per shape in world coordinates (the same as the markers)
through tactics_api.php in three new tables; the map page offers to create
them when they are missing. The viewer's own code only gains two hooks
(view change, map change) and the show/hide-all method.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The Karte page now embeds a standalone viewer (assets/map/) covering all ten
regions - Verteron, Altgard, Elthen, Morheim, Poeta, Ishalgen and the
Reshanta maps - with markers and category filters from interactivemap.app.
map.php loads it in an iframe because its stylesheet restyles body, button
and * globally and would otherwise break the site layout.
The tile, marker and icon data (~230 MB, ~39,000 files) is kept out of Git
and uploaded by FTP; the README explains where it comes from.
Removed with it: own markers and categories, tactic layers, the in-browser
map builder, the tile/stitch/viewer tools, the bundled Leaflet, the four map
tables in schema.sql and the map.manage / map.tactics permissions. Existing
databases keep their old map tables untouched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pick an image, press "Karte bauen", done - no FTP, no command line tool.
The panel sits on the setup page while no map exists and under the map as
"Karte neu bauen" afterwards.
The tiles are cut in the browser and only the finished 256px JPEGs are
uploaded. That is the point: on ordinary shared hosting a 50MB map image
runs into upload_max_filesize, cutting it server side runs into memory_limit
and max_execution_time, and GD is not installed everywhere. This way the
server needs none of it - it validates small JPEGs and stores them.
Uploads go into a side folder <key>__build that only replaces the live map
once every tile has arrived, so an abort - by button, by error or by closing
the browser - leaves the existing map untouched.
The server trusts nothing from the client: the key must match a strict
pattern, tile coordinates must lie inside 2^z on their level, and each file
is checked with getimagesize for an actual JPEG within a size limit before it
is stored.
Verified against tools/make_map_tiles.php on the same source image: same zoom
levels, same per-level tile counts (1/4/12/40), same tile names, same
manifest.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both failure modes showed up in real use and neither was flagged anywhere.
A single screenshot in the folder produced a "stitch" of one image with no
warning at all, and the resulting ~900px map is upscaled on screen. The
stitcher now says plainly that there is nothing to stitch, prints the
resulting zoom levels, and warns below 4000px edge length; make_map_tiles.php
warns on the same threshold, so it catches the case regardless of which tool
is used.
The documented --crop example was copied verbatim and silently removed 180px
from the bottom of a real map. The example is gone: the plain command has no
--crop, and the option is now described as optional with values that must be
measured on one's own screenshots. The stitcher also reports what --crop
removes on every run.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
An installation that predates the map update has none of the four map
tables, so the first query threw an uncaught PDOException and the page
answered 500 with an empty body - no hint what was wrong.
map.php now checks for the tables up front and shows a setup page instead:
it names the missing tables and, for accounts with roles.manage, offers a
button that creates them. The statements are extracted from
sql/schema.sql at runtime, so the schema file stays the single source of
truth and cannot drift from what gets created. They are all CREATE TABLE IF
NOT EXISTS, so running it twice is harmless, and doing it by hand in
phpMyAdmin remains equivalent.
Reproduced against a database built from the pre-update schema: map.php
returned 500, now returns 200 with the setup page, the button creates all
four tables, and the map renders afterwards.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
tools/tile_viewer.html renders a tile pyramid on a canvas without database,
login or libraries - one file, useful for checking freshly generated tiles
before uploading them.
Everything is set through the query string, so the file itself never needs
editing: `tiles` takes a URL pattern with {z}/{x}/{y}, plus zmin, zmax,
tilesize and a start position. The default matches the layout
make_map_tiles.php writes, and a flat folder of {z}_{x}_{y}.jpg works too.
Absent tiles are part of the design: one attempt per coordinate per session,
then it falls back to the four finer children or the nearest coarser parent,
so gaps are practically never visible. The two coarsest levels are loaded up
front as a base layer. Decoded tiles sit in a 512-entry LRU cache behind a
cap of 8 concurrent requests.
Tile edges are rounded per edge and the width derived from them, so a
neighbour reuses the exact same rounded value - verified across 320 camera
positions around level transitions with zero deviation, and zooming toward
the cursor drifts by exactly 0 world pixels. The first frame is painted
synchronously because tile requests originate from drawing, and a throttled
requestAnimationFrame would otherwise leave the page blank and idle.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds tools/stitch_map_screenshots.py, which assembles overlapping in-game
map screenshots into one large image. How far the map can be zoomed in
sharply depends only on the source resolution - the tiler stops at 1:1 - so
the way to a sharp map is capturing a grid of screenshots at maximum in-game
zoom rather than one full-map screenshot.
Offsets are found by FFT phase correlation and verified by the normalised
cross correlation of the actual overlap, so filename order does not matter.
Because phase correlation is cyclic, both readings of every peak are tried
per axis - shifts beyond half the image width are the normal case at 35%
overlap. Overlaps are composited by nearest image centre, which keeps seams
away from the frame edges without the blur of feathering. Verified against a
reference image: 12 shuffled screenshots with UI bands reassemble
pixel-identically.
Sharpness on the website side: the tile layer now uses detectRetina, so
high-density displays get the next tile level drawn at half size instead of
an upscaled, blurry top level. Default JPEG quality raised from 82 to 88,
which suits map labels better.
The GD check in make_map_tiles.php now reports the loaded php.ini, the
extension_dir and the exact lines to add - a stock Windows/scoop PHP loads no
php.ini at all, so the previous one-line error left no way forward.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
New "Karte" tab: a tiled zoom/pan map of the game world with a category
sidebar (groups, per-category marker counts, show all / hide all, search)
and marker popups, plus tactic layers drawn on top of it.
Markers are placed by clicking the map (map.manage) and live in freely
editable two-level categories, each with its own emoji and colour. A tactic
(map.tactics) is a separate drawing layer that can be toggled on and off:
rally points, dashed routes, areas and text notes in any colour, finished by
double click, an explicit button or Enter, removed by clicking them.
Coordinates are stored as a fraction of the map's width/height rather than
in pixels, so re-tiling the map at a different resolution never moves
anything.
The map data lives entirely in the website database - the Discord bot is not
involved. tools/make_map_tiles.php slices a high-resolution image into the
zoom pyramid locally; the resulting folder is uploaded by FTP and picked up
automatically, one region per folder. Leaflet 1.9.4 is vendored under
assets/vendor/ so there is still no CDN and no build step.
New permissions map.view / map.manage / map.tactics and four new tables -
existing installs have to add both once (see README).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mirrors the bot's event planner (/event_planen, /event_liste) on the
website: list all scheduled reminders with a filter for recurring/one-off,
create, edit and delete them. Both sides talk to the same bot database, so
a reminder scheduled in Discord shows up here right away and vice versa -
sending stays with the bot's background job.
Channel and role are real dropdowns pulled from the Discord server instead
of raw IDs (channels the bot cannot post in are disabled), and the form
shows a live preview of the later Discord message, like the bot does before
scheduling. The timestamp is sent as "TT.MM.JJJJ HH:MM" and converted on
the bot side, exactly like the raids, so both ends use the same timezone.
New permissions events.view / events.manage - existing installs have to
add and assign them once under Berechtigungsgruppen.
Needs the matching bot-side API additions (PATCH /api/events/{id},
GET /api/guilds/{id}/channels and /roles, next_run_raw on POST /api/events,
channel/role names in the event list), which live in the separate bot repo.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The bot's "Verschieben" menu showed a flat "Bench/Aus" instead of the
class for players on the bench or marked as declined, so the class info
disappeared as soon as someone was moved to the bench. It now shows the
class emoji, the class name and where the player currently is, matching
the website, which always renders the class icon in every group.
The change itself lives in the separate bot repo (Aion2_RaidPlaner,
cogs/teamplaner.py) - the bot process needs a restart to pick it up.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds a per-role opt-out from the auto-mute mechanic (e.g. Gildenleitung):
members with an excluded role keep accumulating report points normally,
but the timeout itself is skipped, same as the existing server-owner
exemption. Configured the same way as the point weighting - a list of
currently-excluded roles plus a green "+ Rolle ausschliessen" popup for
adding more. Split reports.js into two independently-guarded modal
initializers so the weights and exclusions popups do not depend on each
other being present.
Also wires in the 7 new landscape images as page backgrounds
(web-optimized JPEGs generated via Pillow): raids gets landscape6 as
requested, and the rest are split out for Premades, Mitglieder,
Berechtigungsgruppen, Reports and the logged-out login/homepage view,
which previously had no themed background at all.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New reports.php lists incoming Discord reports (active/archived/all
filter) with delete and archive actions, gated by new reports.view/
reports.manage permissions. Auto-mute weighting is now configurable
from the same page: a settings panel lets admins set the mute point
threshold and a per-Discord-role point value (a report counts as many
points as the highest-weighted role its reporter holds, unconfigured
roles default to 1). Talks to the bot's extended reports API via new
helpers in includes/raids_api.php.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Updates every remaining "Aion2 Gilde" reference (page title, logo alt
text, homepage heading, README, schema header, example config) to the
actual site name shown in the logo wordmark.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- premades.php sorts the list so the premade you're a lead/member of
always renders first, instead of arbitrary API order.
- Empty roster slots are no longer static placeholders for managers:
if there are invite-eligible linked members left, the slot becomes
an inline "+ Mitglied einladen" select that submits on change,
replacing the old separate invite dropdown in the manage panel
(redundant now that every empty slot doubles as one).
- Members can optionally self-declare which class they play; shown
under their name. Editable inline (auto-submit select) only on your
own slot, read-only text for everyone else's. New premade_action.php
action "set_class" re-validates that the caller actually belongs to
that premade before writing (never trusts the posted premade_id
alone). Extracted the class list shared with raids.php into
AION_CLASSES in functions.php instead of duplicating it.
- Requires the matching Aion2_RaidPlaner bot/API change (separate repo,
not tracked here): premade_members.class column, GET /api/premades
returning class per member, and a new PATCH .../members/{user_id}
endpoint - already implemented and saved to disk, bot needs a
restart to pick it up. The bot's own premade overview embed and
admin select menus were updated to show class too, so the Discord
side stays visually consistent with the website.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New members.view-gated page (members.php) lists all active guild
members with avatar and roles. Roles get a "Reihenfolge in der
Mitgliederliste" field in admin/role_form.php (roles.roster_order,
nullable int): a role with a number gets its own section on the
page, sorted ascending; members without any such role fall into a
general "Mitglieder" section at the end. A member with several
ordered roles is placed by whichever has the lowest number. Shown
alongside the existing role fields in admin/roles.php too.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The bot API now lets the website create raids without knowing a
Discord channel: POST /api/raids accepts guild_id and resolves the
target channel via the server's /set_raidchannel default. Adds a
"+ Neuer Raid" panel on raids.php (raids.manage only) with the same
title/date/max slots/gearscore grid and requirements textarea as the
edit form, plus the group-name row editor reused without its lock
toggle (data-locks="0" on .group-editor, since creation doesn't
support locked_groups) - one shared component instead of a second
implementation. Needs raids_api.guild_id in config.php, documented in
README.md.
Also updates the editor's "Speichern" flow for the API's other
change: PATCH /api/raids/{id} now auto-reposts the Discord message
(via sync_raid_message) if it was deleted manually, returning the new
raid_id. update_raid() now returns the API response instead of
discarding it, and raid_edit_action.php surfaces a distinct message
when the id changed - the page reload right after already picks up
the new id either way, since it re-fetches the raid list fresh.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ports the bot's premade feature set (cogs/premades.py) to the
website using the raid API's existing, already-deployed premade
endpoints - no bot/API changes needed:
- Overview of all premades: lead, accepted members, open invites
- Found/rename/dissolve your own premade
- Invite a linked website member (sends the same Discord DM with
Accept/Decline buttons the bot itself sends), remove a member,
transfer leadership
- "Meine Einladungen": accept/decline invites addressed to you
- premades.manage lets admins manage any premade, not just their own,
mirroring the bot's admin-only "Admin-Verwaltung" flow
New permissions premades.view/premades.manage (view granted to the
default Mitglied role on fresh installs; existing installs need to
add them manually, documented in README.md). Every mutation is
re-validated server-side against the current premade list (ownership,
one-premade-per-person, can't remove the lead, accept/decline only
for an invite that's actually pending for that user) since the UI's
button visibility alone isn't an authorization check.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Drops the Discord-derived avatar entirely (discord_avatar,
discord_refresh_token, discord_avatar_synced_at and the background
refresh via OAuth refresh token) in favor of members uploading their
own picture. "Mein Profil" now shows a larger (120px) avatar with a
pencil button pinned to its top-right corner; picking a file uploads
it immediately. Uploads are validated by actual image content
(getimagesize, not the original filename/extension) and stored under
a randomly generated name in assets/uploads/avatars/, which ships
with its own .htaccess disabling script execution so a disguised
upload can never run as PHP. Falls back to the existing letter
placeholder when no picture is set.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Previously the stored Discord identity only updated when a member
manually unlinked and relinked their account, so a changed Discord
avatar never showed up. The OAuth exchange now also captures the
refresh_token; discord_sync_avatar_if_stale() uses it to silently
pull the current username/avatar (throttled to once per hour) and is
called from profile.php, so opening "Mein Profil" keeps it current
without any re-consent flow. Adds discord_refresh_token and
discord_avatar_synced_at columns.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a discord_avatar column (captured from Discord's OAuth /users/@me
response and stored alongside discord_id/discord_username) and a new
avatar_html() helper: it renders the linked Discord avatar when one is
set, otherwise a circular placeholder with the display name's first
letter on a color picked deterministically per user from a palette
tuned for the dark/gold Lumina theme. Shown on the Startseite hero for
logged-in members and next to "Angemeldet als" in the sidebar footer.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- New profile.php (display name, password, Discord link/unlink),
reachable from the sidebar; removed the duplicate Discord section
from the dashboard.
- Corrected class names/icon mapping to match the actual bot config
(Beschwörer, Kantor) instead of the guessed German terms used
earlier.
- raids.php now understands the bot's full group model: group 0 is
the bench ("Ersatzbank"), -1 is a decline ("Abgemeldet"), and class
"Ausstehend" marks a pending premade invite (now shown with an
hourglass instead of being silently dropped or mis-rendered). The
"X / max" counter matches the bot's own active-count logic (pending
invites don't count). Signup form also lets a member choose the
bench explicitly.
- A few more inline icons (profile, list) for general visual polish.
Verified grouping/active-count/icon logic with synthetic bench/
declined/pending signups, and the real raids.php flow (profile
update, sidebar nav) against a local DB plus the live raids API.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Class name on raid signups now shows only as an icon tooltip instead
of trailing text (falls back to text when no icon matches).
- Discord OAuth2 linking (discord_login.php/discord_callback.php,
includes/discord.php): members connect their Discord account from
the dashboard, storing discord_id/discord_username so raid signups
can be attributed to their real Discord identity. Needs a Discord
application's client_id/client_secret in config.php.
- raids.php gets self-service signup/withdraw controls (class + group
picker, upsert semantics) for members with a linked Discord account,
plus archive/restore controls gated behind a new raids.manage
permission. New action scripts raid_signup.php, raid_unsignup.php,
raid_archive.php, raid_restore.php call the corresponding
includes/raids_api.php functions.
- Archive/restore already work today (verified live against the bot's
API - archived and restored the one active raid, signups intact).
Signup/withdraw are fully wired on the website side but need two new
bot-side endpoints (POST .../signup, DELETE .../signup/{user_id})
that don't exist yet - contract documented in the README.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New raids.php shows upcoming raids (date, requirements, gearscore,
groups and their signups) pulled from https://api.maaxxs-coding.de/api/raids
via includes/raids_api.php (cURL + X-API-Key header), gated behind a
new raids.view permission so it fits the existing permission-group
model. Fresh installs seed raids.view onto Mitglied automatically;
existing installs need to add it once via the Berechtigungsgruppen UI
(documented in the README). API/network failures show a friendly
error instead of crashing the page.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Every "oe/ae/ue" spelling throughout the UI text and comments (fuer,
loeschen, koennen, ...) was my own typo, not an encoding bug - the
charset fix in the last commit was unrelated. Replaced all of them
with proper ö/ä/ü across every PHP file and the README.
Also fix table rows rendering inconsistently: `.actions` and the
status badges were applying `display:flex` directly to a <td>, which
fights the table layout model and renders unreliably across browsers.
Moved the flex layout into a wrapper <div> inside each cell instead,
and restyled row-level delete buttons as plain text links so they
match the height of the "Bearbeiten" link exactly. Tables also get a
horizontal-scroll wrapper so narrow viewports scroll instead of
squeezing cell content.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
New users no longer get a manually typed password: admins get a
random one-time password shown once after creation, and the account
is flagged must_change_password. require_login() redirects anyone
with that flag to the new change_password.php page (except that page
and logout) until they set their own password. Admins can also toggle
the flag when editing an existing user to force a re-change.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Simplifies Plesk/shared-hosting deployment (no need to set a separate
document root subfolder). config.php, includes/ and sql/ are now
protected via .htaccess rules instead of living outside the webroot.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Provides PHP/MySQL-based auth (sessions, CSRF), a permission-and-role
system (permission groups with per-permission keys), and an admin-only
user management area. Homepage left as a placeholder for later.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>