Последнии сообщения форума
Bring documentation in sync with the removal of the BB editor, the addition of Toast UI as the primary content editor, and the new theme hook architecture. Update admin info texts to remove outdated BB editor references.
Core changes:
- docs/EDITORS.md:
- Remove bbcode/ from the plugin directory tree
- Update manifest.json example to reflect Toast UI (id, label, driver, formats)
- Extend formats field description to include markdown as a valid value
- docs/TEMPLATES.md:
- Remove outdated note about legacy rendering and removed runtime files
- Add templates/<theme>/index.php to the theme directory structure listing
Add full Theme Hooks section: purpose, loading mechanism, hook function contracts (getThemeHeadVars, getThemeFootVars, getAdminHeadVars), usage rules, and standard implementation direction
- admin/info/config/ (de.html, ru.md, uk.html):
- Replace BB editor editor list with current editors (ToastUI, TinyMCE, CKEditor)
- Update _CLICABLEINFO hint to describe hyperlink conversion as editor-neutral
- admin/info/uploads/ (de.html, ru.md, uk.html):
- Replace references to BB Editor with editor-neutral wording in all three locales
- admin/info/messages/ru.md, admin/info/newsletter/ru.md:
- Replace «BB-редактор» references with neutral «редактор» wording
- README.md:
- Remove bbcode from the list of bundled editor drivers
- New docs files:
- docs/TODO.md: current open task list for the project
- docs/admin-layout-demo.html: static HTML prototype of the admin layout
- docs/admin-layout-demo-2.html: alternate admin layout prototype variant
Benefits: - Docs accurately reflect the active plugin set and theme hook contract - Admin info texts no longer reference the removed BB editor - Theme hook documentation provides a stable reference for custom theme authors
Technical notes: - admin/info files use locale-specific markup (BB-style for .html, Markdown for .md) - TEMPLATES.md hook rules section covers both do and do-not patterns
Update the admin theme visuals: a larger logo image replaces the old one, the toolbar becomes a flex row, and the admin footer gains a SLAED home link rendered through the standard link fragment.
Core changes:
- templates/admin/images/slaedcms.png:
- Replace 169×51 logo with a 256×73 higher-resolution version
- templates/admin/images/000slaedcms.png:
- Add the previous 169×51 logo as a preserved alternate (original dimensions)
- templates/admin/assets/css/new.css:
- Update .sl-admin-login-header height to 104px (was 82px) at all breakpoints
- Update .sl-admin-login-header h1 a to 256×73 with background-size
- Update .sl-admin-login-shell .sl-admin-brand height to match
- templates/admin/assets/css/theme.css:
- Update .header h1 a to 256×73 logo with background-size
- Update .sl-admin-brand and .sl-admin-toolbar height to 90px (was 72px)
- Set .sl-admin-toolbar to display:flex + align-items:center
- Add .footer span a.sl-slaed-home { right: 62px } positioning rule
- Add .footer span a.sl-slaed-home:before { content: "\f588" } icon
- templates/admin/fragments/link.html:
- Add is_top_hidden flag support: appends thide CSS class when set
- templates/admin/partials/foot-controls.html:
- Render brand_link via the link fragment when present (before the top link)
- core/system.php:
renderFootControls(): add $withSlaedLink = false parameter; when true, inject a brand_link array with href=//slaed.net and class=sl-slaed-home
- setFoot() admin path: pass true to renderFootControls() to show the link
Remove the legacy preview() compatibility wrapper (was unused after getTplBbEditor removal; getTplPreviewContent() is the direct call target)
Benefits: - Admin logo is crisp on high-DPI screens - Footer brand link uses the existing link fragment — no custom HTML - thide class is now driven by template data, not hardcoded conditionals
Technical notes: - is_top_hidden in link.html appends thide alongside any other class values - The brand link uses is_top_hidden: true so it renders as an icon-only link - preview() removal is safe: getTplPreviewContent() is the direct API
Rewrite getFallbackImage() to resolve the placeholder image using the active theme name instead of iterating a static list of hard-coded candidate paths. Add missing no-image.png assets for the default and simple themes.
Core changes:
- core/classes/parser.php — getFallbackImage():
- Use getTheme() or $conf['theme'] to determine the active theme at runtime
- Build a deduplicated list of candidate themes (active → default → lite → admin)
- Look for templates/<theme>/images/misc/no-image.png in each candidate
- Use BASE_DIR for absolute path checks instead of $this->getRootPath()
- Fall back to an embedded 1×1 transparent GIF if no file is found
- New image assets:
- templates/default/images/misc/no-image.png (951 bytes)
- templates/simple/images/misc/no-image.png (951 bytes)
Benefits: - Fallback image resolution honours the active theme without a fixed path list - New themes are resolved automatically without editing the candidate array - BASE_DIR usage aligns with the rest of the codebase path handling
Technical notes: - Static cache ($fallback) preserved: resolution runs once per request - Embedded GIF fallback remains as last resort when no file exists on disk - templates/admin and templates/lite already had no-image.png; only default and simple were missing the asset
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-content im 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.html in default/lite/simple in diesem Commit gelöscht;
alle Aufrufer sind bereits auf block-content umgestellt
- Frontend-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 gemischter
content-block-Nutzung
- Klarere Trennung von Admin-Spalten-Semantik und freien Klassen
Technical notes:
- content-block.html im admin-Theme wird in diesem Commit gelöscht;
alle Aufrufer sind bereits auf block-content umgestellt
- is_*-Flags sind additiv kombinierbar; Reihenfolge im Template
bestimmt die CSS-Klassen-Reihenfolge
- color_attr in inline-badge ersetzt 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 .block in blocks.css bleibt unberührt für evtl.
noch nicht migrierte Templates
- TODO 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.





