Журнал изменений
Implement the server-side file upload API for the Toast UI editor and wire it into the editor frontend. The new API handles file upload and file listing as dedicated endpoints in index.php, backed by focused helper functions in core/system.php. Custom JS and CSS assets extend the editor with emoji, icon styles, tag shortcuts, and upload panel integration.
Core changes:
- core/system.php — editor JSON API helpers:
- getEditorJson(array): emit JSON response and exit
- getEditorUploadData(string): validate and return upload config for a module
- checkEditorUploadAccess(string, array): check visitor upload permission
- getEditorImageData(string, string, int, int): validate image dimensions
- getEditorFileData(string, string): build file metadata row for JSON output
- addEditorUpload(): handle POST file upload and return JSON result
- getEditorFileJson(): return stored editor files as JSON for the file panel
- index.php:
- Route go=4 op=editorUpload to addEditorUpload()
- Route go=4 op=editorFiles to getEditorFileJson()
- Fix routing bug: switch($go) corrected to switch($op)
- plugins/editors/toastui/driver.php:
- Add getEmojiLabels(): inline locale-mapped emoji panel labels (de/en/fr/pl/ru/uk)
- Load slaed-icons.css, slaed-tags.js, slaed-emoji.js, slaed-upload.js
- Pass upload panel and JSON options (token, endpoints, labels) to JS via SlaedToastUi.register()
- Render toastui-upload-panel partial when module upload is permitted
- New Toast UI assets (plugins/editors/toastui/assets/):
- slaed-emoji.js: emoji picker plugin with categorised emoji sets
- slaed-icons.css: custom toolbar icon overrides using Bootstrap Icons
- slaed-tags.js: tag shortcut extension for common BB-style tags
- slaed-upload.js: upload panel logic (drag-drop, file list, attachment insert)
- Upload panel partials (templates/*/partials/toastui-upload-panel.html):
- Added for admin, default, lite, simple templates
- Bootstrap Icons vendor (templates/default|lite/assets/vendor/bootstrap/):
- bootstrap-icons.min.css and woff2 font file for the icon set
Benefits:
- Toast UI now supports full file upload with the same access rules as the BB editor
- Upload API is editor-agnostic: clean helper functions with no HTML coupling
- Emoji, tags, and upload are modular JS extensions loaded only when needed
Technical notes:
- Upload endpoints use the existing SLAED token system (getSiteToken/checkSiteToken)
- addEditorUpload() handles multi-file upload arrays and returns per-file results
- getEditorFileJson() respects user ownership and moderator scope limits
- Bootstrap Icons font is vendored; no CDN dependency at runtime
The admin layout rendering functions (language switcher, top menu, layout variable assembly) were scattered across a theme-local hook file. They are now defined in core/admin.php, making them available to any admin theme without coupling logic to a specific theme directory.
Core changes:
- core/admin.php — new layout helpers:
- getAdminLanguageLinks(): renders the language switcher for the admin toolbar
- getAdminTopMenu(): renders the admin top navigation for admin and moderator
getAdminLayoutVars(): returns the complete set of variables needed by any admin layout (menu, lang links, sidebar blocks, or login prompt)
- templates/admin/index.php — deleted:
- getAdminHeadVars() and getThemeFootVars() moved out of the theme hook
- admin theme no longer requires PHP logic in templates/admin/index.php
- core/system.php — theme hook integration:
Add getThemeHookVars(string $hook): array — safely calls optional theme hook functions and normalises the return value to an array
setHead(): use getAdminLayoutVars() + getThemeHookVars('getAdminHeadVars') instead of directly calling the removed theme hook function
- setHead(): use getThemeHookVars('getThemeHeadVars') for frontend
- setFoot(): use getThemeHookVars('getThemeFootVars') for frontend
Benefits:
- Admin layout logic is now co-located with admin helpers in core/admin.php
- Theme hook contract is narrowed: theme index.php is optional and additive
- getThemeHookVars() eliminates function_exists guards at every call site
- Cleaner separation between core rendering and per-theme customisation
Technical notes:
Templates/admin/index.php is now deleted; custom admin themes may still define getAdminHeadVars() in their own index.php if override is needed
getAdminLayoutVars() is safe to call unconditionally; it checks isAdmin() internally and returns only login text when the user is not authenticated
- No change to the rendered output for default admin theme installations
Remove the BBcode editor plugin and all related artifacts from the codebase. The BB editor has been fully replaced by Toast UI and is no longer active. All CSS, images, upload panels, and lang constants tied to the BB editor are deleted to eliminate dead code and reduce maintenance surface.
Core changes:
- BB editor plugin (plugins/editors/bbcode/):
- Remove driver.php and manifest.json
- BB editor assets (templates//images/editor/, /partials/):
- Delete bb-editor.png sprite and index.html from admin, default, lite, simple
- Delete editor-upload-panel.html from default, lite, simple
- Delete deprecated forum banner images from templates/lite/images/banners/
- BB editor CSS (templates/admin|default|lite/assets/css/system.css):
Remove .sl_bb-editor, .sl_bb-panel, .sl_bb_*, .sl_bbup-panel, .sl_bb_trans and related rules from all three themes
- Lang constants (lang/.php, modules/jokes/lang/.php, admin/lang/*.php):
Remove 20 BB editor toolbar constants (_EBOLD, _EBREAK, _ECENTER, _ECOLOR, _EEMAIL, _EHR, _EITALIC, _ELAT, _ELEFT, _ELI, _EMINUS, _EPLUS, _ERIGHT, _ERUS, _ESIZE, _ESMILIE, _ESTRIKET, _EUNDERLINE, _EURL, _EYUSTIFY)
Remove 7 auxiliary editor constants (_FONT, _JERROR, _JINFO, _JQUOTE, _JTYPE, _UPLOADINFO, _UPLOADFINISHJ) from all 6 locales
- Update _CLICABLEINFO in admin/lang/*.php to remove BB editor reference
- getTplBbEditor helper (core/helpers.php):
- Remove the 193-line BB editor rendering function
- Config (config/local.php):
- Update base_fingerprint after asset removal
Benefits:
- Eliminates ~700 lines of dead code and sprites
- Removes 20+ unused lang constants from 6 locale files
- Cleans BB editor CSS rules from all active theme stylesheets
- Reduces cognitive overhead when working with the editor subsystem
Technical notes:
- No runtime behavior change; BB editor was already superseded by Toast UI
- All BB editor constants verified unused across PHP, HTML, JS, and template files
- _CLICABLEINFO updated to be editor-neutral (applies to any content editor)
Frontend-Fragmente (default/lite/simple) bekommen zusätzliche semantische
Flags — span, button, input, link, table, title, code-row.
Das Fragment content-block wurde in block-content umbenannt und leicht
erweitert. Neu ist ein minimales partials/div.html. Das Partial
block-user-info.html trennt Begrüßung in zwei separate Felder
(greeting_label + greeting_name) statt eines vorformatierten HTML-
Strings. Alle Aufrufer in blocks/, core/, modules/*/index.php
wurden konsequent umgestellt.
Core changes:
- Fragment-Rename (alle 3 Themes):
content-block.htmlgelöscht,block-content.htmlneu angelegtSelbe Logik + neue Flags (z.B.
is_signature,is_center,is_radio_group), synchron mit Admin-Theme für einheitliche Fragmentnamen- span.html (default/lite/simple):
+
is_form_value,is_views,is_line_stack_item,is_cat_image,is_cat_name,is_new_today,is_new_days,is_new_week- Ersetzt inline
class="sl_n_day"etc. durch semantische Flags - button.html:
+
is_reload_query-Trigger mit htmx-Swap,is_legacy_green,is_back,is_navi_lower,is_login_submit- Button-/Input-Varianten konsolidiert
- input.html:
- +
is_form_control,is_user_search,is_search_filter - Default-Klasse
sl-fieldnur bei Abwesenheit anderer Klassenflags - link.html:
+
is_shop_add(sl-shop-add),is_bold_labelBold-Linklabel,suffix_htmlfür nachgestellte Badges/Icons (z.B. NewGraphic)- code-row.html:
row_classoptional —is_odd→ sl-code-row-odd / sl-code-row-even- table.html / table-row.html:
is_col_halfim Header,is_hiddenundis_forum_statauf Row-Levelfl-col-statSpalte für Foren-Statistiken- title.html:
- +
is_plainfürclass="title"stattsl-title(ältere Themes) - partials/block-user-info.html:
greeting(HTML-String) →greeting_label+greeting_name(zwei Felder). Begrüßung wird jetzt im Template zusammengesetzt, nicht in PHP- partials/div.html (neu, default/lite/simple):
Minimaler generischer Div-Wrapper für einheitliche Semantik zwischen Themes
- partials/form-add.html:
- +
is_calculator(sl-calculator-form) - Blocks (blocks/*.php):
auto_links, center, center_forum, center_media, center_plus, forum, img, languages, links, login, modules, user_info: alle Aufrufe von
getHtmlFrag('content-block', ...)→getHtmlFrag('block-content', ...)user_info.php:greeting→greeting_label/greeting_name, passend zum neuen block-user-info-PartialSemantische Flags ersetzen hardkodierte
class-Werte (z.B.'class' => 'sl-shop-add'→'is_shop_add' => true)- Core (core/helpers.php, core/system.php, core/user.php):
getTplRadioGroup(),getTplNewGraphic(), Footer-/Nav-Helper:content-block→block-content, Flag-basierte KlassengetTplFieldsIn(): leererinput_classentfernt (unnötig)getTplPager():prefixals hartkodierter Leerstring (ungenutzte Option entfernt)- Module (modules/*/index.php — account, changelog, clients, contact,
content, faq, files, forum, help, jokes, links, main, media, money,
news, order, pages, rss, search, shop, voting, whois):
getHtmlFrag('content-block', ...)→getHtmlFrag('block-content', ...)'class' => 'sl-shop-add'/'sl-section'/'sl_n_day'→ Flag-Formmodules/shop/index.php:title_textnicht mehr percutstr()beschnitten — Truncation erfolgt jetzt CSS-seitig
Benefits:
- Einheitlicher Fragmentname
block-contentim Frontend und Admin Keine hardkodierten Klassennamen mehr in PHP für wiederkehrende Varianten (is_new_today, is_shop_add, is_section, ...)
block-user-info-Partial kann Begrüßung lokalisierungsfreundlich ohne HTML-Verkettung in PHP aufbauen- Fragmente in allen 3 Themes synchron — leichter zu warten
Technical notes:
content-block.htmlin default/lite/simple in diesem Commit gelöscht; alle Aufrufer sind bereits aufblock-contentumgestelltFrontend-Fragmente syntaktisch 1:1 identisch zwischen den 3 Themes (Theme-spezifisches Styling über CSS, nicht Template-Variation)
Rückwärtskompatibilität: keine — Template-/Parameter-Namen ändern sich, nur innerhalb des neuen Refactor-Strangs verwendet
Admin-Tabellen werden jetzt über semantische Spalten-Flags (is_col_id,
is_col_check, is_col_author, is_col_status, is_col_actions,
is_col_date, is_col_count) gestylt — hardkodierte class_name-Werte
in PHP entfallen. Die Fragmente button, inline-badge, input,
select, textarea, label bekommen zusätzliche Varianten-Flags
(is_green/is_blue/is_plain, is_note/is_dimmed/is_success,
is_inline_gap/is_search_filter etc.). Das Fragment content-block
wurde in block-content umbenannt und um is_section und
is_sidebar_count_list erweitert.
Core changes:
- Fragment-Templates (admin/fragments):
block-content.html: ersetztcontent-block.html+ neue Flagsis_section(→sl-section),is_sidebar_count_listtable-cells.html+th.html: neue Spalten-Flagsis_col_id(sl-col-id),is_col_check(sl-col-check),is_col_author(sl-col-author),is_col_status(sl-col-status),is_col_actions(sl-col-actions),is_col_date(sl-col-date),is_col_count(sl-col-count)table-row.html+div-row.html:is_lang_edit,is_ratings_inner,is_hiddenfür Row-State-Klassenbutton.html:is_green/is_blue/is_plainlösen veralteteis_chlog_primary/is_chlog_secondaryfür Button-Varianten abinline-badge.html: +is_note/is_dimmed/is_success/is_danger/is_action_label/is_muted/is_green/is_red/is_category/is_views/is_post_icon/is_date+color_attrfür Inline-Styleinput.html: +is_config/is_ratings_days/is_form_control/is_inline_gap/is_search_filter/translate_targetselect.html: +is_inline_gap/is_search_sort/is_search_order/is_search_filtertextarea.html: +is_configlabel.html: +is_associated_option- Partials (admin/partials):
div.html: +is_search_line,is_rate_box(für Ratings-Tab-Layout)form.html: +is_inline_filter(Such-Filter-Formulare)basic-monitor.html: Prüfstatus-Styling auf semantische Badges umgestellt- Layout (admin/layouts):
admin.html:<main class="sl-admin-content">bekommt inneres<div class="sl-admin-content-inner">für Grid/Flex-Container- Styles (admin/assets/css):
new.css: neue.sl-col-*-Regeln (Breite + Alignment für ID/Check/Author/Status/Actions/Date/Count-Spalten),.sl-section,.sl-inline-gap,.sl-search-filter-field,.sl-lang-edit-row,.sl-ratings-inner-row,.sl-associated-optiontheme.css: minimale Layout-Anpassung fürsl-admin-content-inner- Core + Module (core/admin.php, admin/modules/, modules//admin/):
Alle Aufrufe von
getHtmlFrag('content-block', ...)aufgetHtmlFrag('block-content', ...)umgestelltclass_name=>'sl-col-id'und ähnliche auf Flag-Form ('is_col_id' => true) migriert — gilt für alle Admin-Tabellen in admins, comments, config, database, favorites, groups, lang, messages, modules, monitor, newsletter, ratings, scheduler, statistic sowie alle modules/*/admin/index.php
Benefits:
- Spaltenbreiten/-Ausrichtung deklarativ in CSS statt verstreut in PHP
- Konsistente Button-/Badge-Varianten ohne Zeichenketten-Klassennamen
Ein einziger Fragmentname (
block-content) statt gemischtercontent-block-Nutzung- Klarere Trennung von Admin-Spalten-Semantik und freien Klassen
Technical notes:
content-block.htmlim admin-Theme wird in diesem Commit gelöscht; alle Aufrufer sind bereits aufblock-contentumgestelltis_*-Flags sind additiv kombinierbar; Reihenfolge im Template bestimmt die CSS-Klassen-Reihenfolgecolor_attrininline-badgeersetzt Inline-<span style="color:...">und erlaubt beliebige Hex/CSS-Color-Werte
Nach dem Block-Refactor (Commit 2ff47e47) nutzten die neuen atomaren
Fragmente bereits die Klassen sl-block, block-modules, block-flags,
block-menu, block-login etc., doch die zugehörigen CSS-Regeln waren
in den Themes nicht vorhanden. Ohne diese Styles fielen Sidebar-Blöcke
wie modules.php in rohen Inline-Fluss und «verschluckten» visuell die
nachfolgenden Blöcke — auf einer frischen Installation war faktisch nur
der Inhalt des languages.php-Blocks sichtbar.
Core changes:
- Block-Wrapper (sl-block, sl-block-content):
sl-block: Hintergrund #f6f8fa, padding 15px, border-radius 8px, margin-bottom 25px (Visuelles Äquivalent zur alten.block-Regel in blocks.css, aber für das neue<aside class="sl-block">-Markup)sl-block-content: line-height 1.4 für lesbare Block-Inhalte#sidebar .sl-block:last-child: kein margin-bottom (letzter Block)- modules.php (block-modules, block-mod-section):
.block-modules: flex-column mit 4px gap — Navigation als saubere vertikale Liste statt Inline-Fluss.block-modules .sl-module: display:block + padding 4px 2px für klickbare Zeilen.block-mod-section: Separator + kleinere Schrift für Moderator- Unterabschnitte (invisible/inactive Modules, Admin-Bereich)- languages.php (block-flags):
.block-flags: flex-wrap mit 6px gap, align-items center — Flaggen flüssig nebeneinander mit sauberen Abständen.block-flags a: display inline-flex für konsistente Vertikalzentrierung- login.php / user_info.php (block-login):
.block-login p: margin 6px 0 — Zeilenabstände im Login-Formular.block-login input: margin 3px 0 — vertikaler Breathing Space- menu.php (block-menu):
.block-menu ul: list-style none, padding 0, margin 0 — DB-Menü ohne Standard-Listendarstellung.block-menu li: margin 4px 0 — Abstand zwischen Menüpunkten
Benefits:
Frisch installierte Sidebar-Blöcke rendern sichtbar und nicht mehr als zerfließender Inline-Text
- Visuelle Parität zur alten
.block-Regel ohne Markup-Rückportierung Konsistente Klassen in default/lite/simple — ein einziger Styleset für alle drei Frontend-Themes
Technical notes:
- Rein additiv: keine bestehenden Regeln geändert oder entfernt
Legacy-Regel
.blockin blocks.css bleibt unberührt für evtl. noch nicht migrierte TemplatesTODO aus Commit 2ff47e47 erledigt: "Neue sl-*-Klassen (block-login, block-flags, block-menu) in new.css zu ergänzen"
Fingerprint spiegelt den aktuellen Stand nach Einführung der Table- Fragment-API (is_truncate/is_fixed) und der Admin-Login-Auth-Form- Vereinheitlichung wider.
Neues deklaratives Truncation-Modell für Admin-Tabellen: Zellen und
Spaltenköpfe können als is_truncate markiert werden, die Tabelle
selbst als is_fixed. Rendering und Ellipsis übernimmt das Template
via table-layout: fixed + text-overflow: ellipsis; cutstr()-Aufrufe
in PHP entfallen, echter Volltext bleibt im title-Attribut verfügbar.
Core changes:
- Fragment-Templates (table.html, table-cells.html, th.html):
- table.html: rendert
.sl-table-fixed-Klasse wennis_fixedgesetzt ist table-cells.html: unterstützt pro Zelle
class_name,is_truncate,title_text; kombiniert Klassen und fügtsl-cell-ellipsishinzu- th.html: analoge Logik für Header-Zellen mit
is_truncate - Styles (new.css):
.sl-table-fixedmittable-layout: fixed.sl-cell-ellipsis: max-width:0 + overflow:hidden + white-space:nowrap- text-overflow:ellipsis — funktioniert im fixed-Layout als Begrenzung
Spaltenbreiten-Regeln via
tr:has(> th:nth-child(N):last-child)für 5er/6er Heads und für rechte Aktions-Spalte (.sl-th-center)- Core (core/admin.php):
getAdminCategoryList / getAdminBlockList / getAdminFavoriteList / getAdminPrivateList:
cutstr($title, N)in label_text entfernt — Ellipsis erfolgt jetzt rein visuell in der Tabellenzelle- Admin-Module (admin/modules/*.php):
admins, groups, lang, messages, modules, newsletter, referers, scheduler, security: Titel/Name/Modul-Spalten auf is_truncate + title_text umgestellt; Tabellen mit is_fixed markiert
- Modul-Admins (modules/**/admin/index.php):
account, auto_links, clients, content, faq, files, forum, help, jokes, links, media, money, news, order, pages, search, shop, voting, whois: gleiche Umstellung für Title/URL/Email-Spalten
- shop, auto_links, links: zusätzlich domain()/cutstr()-Längen entfernt
- search: komplette Searchaudit- und Toplist-Heads mit is_truncate
- whois: 4 Spalten (Site/Host/DC/Poster) auf is_truncate
Benefits:
- Keine hardkodierten Zeichen-Limits mehr im PHP-Code
- Volltext bleibt im title-Attribut für Hover/Screenreader
- Responsiv korrekte Spaltenbreiten über
:has()-Selektoren - Einheitliches Truncation-Verhalten in allen Admin-Tabellen
Technical notes:
Breitenregeln nutzen CSS
:has()— moderne Browser (Chrome 105+, Firefox 121+, Safari 15.4+) werden vorausgesetzt- Erst-Spalte (typisch ID) bekommt 42px außer bei is_truncate
Rechte Toolbar-Spalte (.sl-th-center) bekommt fixe 36px + 102px für Status und 100px für Author — stabile Layouts bei dynamischen Daten
Login- und Registration-Partials wurden zu einem einzigen auth-form
Partial mit row-basierter API zusammengeführt. Das Shell/Layout der
Login-Seite wurde auf eigene sl-admin-login-* Klassen umgestellt
und die dazugehörigen Styles in ihre eigene Sektion ausgelagert.
Core changes:
- Templates (auth-form.html, layouts/bare.html):
Neues
partials/auth-form.html: rendert beliebige Formular-Zeilen über einrows[]-Array (label, field_html, has_colon)- Alte
partials/login.htmlundpartials/registration.htmlentfernt layouts/bare.html: Klassen `wrapper/slaenter/wraptop/wrapmid/wrapfoot/ entercont/header/footer/sl-admin-header/sl-admin-toolbar` durch neuesl-admin-login-*-Familie ersetzt; Toolbar-Block entfernt- Admin-Entry (admin/index.php):
login()-Funktion: beide Zweige (Erst-Registrierung + Standard-Login) nutzen jetzt
getHtmlPart('auth-form', ...)mitrows-Array- Feldaufbau inline via
getHtmlFrag('input'|'radio', ...) - Captcha wird als zusätzliche Zeile ohne Label in
rowsangehängt - Styles (new.css, theme.css):
new.css: eigener "Admin login"-Abschnitt mit
.sl-admin-login-shell,-card,-header,-content,-list,-form-frame,-field,-submit,-footer,-copyright+ Responsive-Regeln (700px/560px)theme.css: Selektoren
.slaenter/.wrapper:not(.slaenter)→.sl-admin-login-shell/.wrapper:not(.sl-admin-login-shell)theme.css: doppelter
body:has(.slaenter)-Block entfernt (jetzt ausschließlich in new.css)
Benefits:
- Ein einziges Partial für beide Auth-Flows — keine Duplikation
- Flexible Felder-Reihenfolge/-Anzahl über rows[] (z.B. Captcha-Row)
- Trennung von Admin-Login-Layout (new.css) und Grundlayout (theme.css)
- Konsistente
sl-admin-*-Namenskonvention auch im Login-Flow
Technical notes:
- Kein Funktionswechsel, reine Template/Style-Konsolidierung
sl-admin-login-topund-bottombleiben als leere Slots im Markup (display:none), um zukünftige Layout-Akzente ohne HTML-Änderung zu erlauben
Toolbar komplett neu gebaut: Flexbox-Layout, dezenter Hintergrund-Verlauf, abgerundete Item-Hover-Effekte ohne Sprite-Images.
Buttons (sl-block-sidebar h3, sl-dashboard-panel-head) vereinheitlicht: einfacher 3-Stop-Verlauf, opacity:.8-Hover statt separater Hover-Verlauf.
Modul-Head-Body auf CSS Grid umgestellt (25/75 Split) für stabiles Title/Searchbox-Layout; Searchbox mit Inline-Flex und fester min-height.