Журнал изменений
Replace per-purpose fragment names with generic consolidated fragments across all 21 modules, consistent with the new flat fragment API introduced in the core layer.
Core changes:
- hit-badge → inline-badge (modules/auto_links, files, links, media, news, recommend, rss, search, shop, users, whois):
- Added is_hits, is_download flags for CSS class variants
- Renamed title → title_text, text → label
- form-option → select-option (modules/account, contact, faq, files, help, jokes, links, money, news, pages, rss, search, shop, users):
- Renamed value → value_attr, label → label_text, selected → is_selected (bool)
- action-link → link (modules/clients, content, files, forum, links, media, money, pages, search, shop, users):
- Added is_button_blue, is_comment, is_read flags for CSS class variants
- Misc fragment renames per module:
- clients-list-basic/open → table open/close with cells array
- users-stats/top/rules basic/open → table open/close with cells array
- shop-order/partner/client rows/tables → table open/close with cells array
- navi-lower fragment → navi-lower partial (getHtmlPart)
- auto-links-code-table → code-table
- reads-badge → inline-badge with is_download flag
- media-link-item → link with is_media_ed2k/is_media_http flags
- back-button → span with is_back flag
- category-image → link with is_card_image flag
Benefits:
- Completes fragment consolidation across all PHP layers
- Single source of truth per HTML pattern (link, span, table, etc.)
- Boolean flags replace per-purpose fragment files
Technical notes:
- No behavior change; output HTML is functionally identical
- navi-lower moved from getHtmlFrag to getHtmlPart (partials directory)
Replace per-purpose fragment names with generic consolidated fragments (select, input, link, span, table-row, table, post-div, meta-value) to match the new flat fragment API where each fragment handles multiple variants via boolean flags.
Core changes:
- Fragment renames (core/helpers.php):
- refresh-select-time → select (name_attr, options_html)
- multi-select → select (added is_multiple, is_name_array flags)
- user-search → input (added is_user_search, endpoint_attr flags)
- Fragment renames (core/system.php):
- span with class → span (is_highlight, is_geo_flag flags)
- navi-tab-content → post-div
- geo-ip-flag → span (is_geo_flag flag)
- comment-num-link → link (is_num_anchor flag)
- comment-meta-color → meta-value
- comment-text → post-div
- shop-cart-table open/close pattern consolidated into single call
- Fragment renames (core/user.php):
- account-mail-link → link (label_html, is_blank flags)
- account-user-button → link (is_account_button, is_blank flags)
- account-pm-list-row → table-row (cells array)
- account-pm-list-table → table open/close pattern
- account-favorites-row → table-row (cells array)
- account-favorites-table → table open/close pattern
- comment-meta-color → meta-value
- form-option → select-option (value_attr, label_text, is_selected)
Benefits:
- Reduces fragment count from ~80 to ~30 consolidated fragments
- All rendering variants controlled by boolean flags in PHP
- Consistent API across all call sites
Technical notes:
- No behavior change; output HTML is functionally identical
- table open/close pattern: getHtmlFrag('table', ['open'=>true,...]) ... getHtmlFrag('table', [])
Реструктуризация шаблонов: крупные фрагменты (form-add, view, liste) вынесены из fragments/ в partials/. Добавлены новые фрагменты для head-ссылок, скриптов, сессий и превью изображений.
Core changes:
- Удалены fragments (default, lite, simple):
- form-add.html, media-form-add.html → partials/form-add.html
- view.html → partials/view.html
- table-row-liste.html → inline в table-row.html (единый фрагмент)
- whois-add-form.html, whois-status.html → инлайн в модуле
- account-privat-tab-pane.html → заменён post-div фрагментом
- Новые fragments (default, lite, simple):
- head-link.html, head-script-src.html, head-script-inline.html
- image-preview.html, session-row.html, session-summary.html
- action-delete.html, action-menu-item.html
- editor-action-insert.html, editor-action-menu.html
- forum-reply-form.html, forum-topic-icon.html
- Новые fragments (admin):
- img-preview.html, editor-action-insert.html, span-raw.html
- Обновлённые fragments:
- table-row.html: объединяет старый table-row-liste в единый условный шаблон
- alert.html: поддержка messages-массива вместо text-строки
- media-link-row.html: переход с table-разметки на div.sl-form-row
- textarea.html: добавлен placeholder_text
- partials/preview-content.html: title_html → title_text (безопасный вывод)
- category-row.html: обновлены переменные разметки
- CSS (new.css, все темы):
- Добавлены стили для session-table, image-preview-toggle, image-preview-mini
Benefits:
- Чёткое разграничение: fragments — атомарные UI-элементы, partials — страничные блоки
- Новые фрагменты устраняют inline-HTML в PHP-коде
- preview-content.html не допускает XSS через title ({{ вместо {{{)
Technical notes:
- Новые partials/view.html, form-add.html, liste.html добавлены во все темы
- table-row.html обратно совместим через условие cells_html
Компоненты вне core/ и modules/ переведены с устаревших хелперов на прямые вызовы $tpl->getHtmlFrag(). Устранены зависимости от удалённых функций getTplImageSelect, getTplCategoryPreview, getMailLink и др.
Core changes:
- admin/modules/categories.php:
- Локальная функция getAdminCategoryImageSelect() заменяет getTplImageSelect()
- getTplCategoryPreview() → getHtmlFrag('img-preview', ...)
- admin/modules/admins.php:
- getMailLink() → getHtmlFrag('link', ['href' => 'mailto:...'])
- alert messages передаётся как массив через 'messages'
- admin/modules/config.php, monitor.php, referers.php:
- getTplExternalAction() → getHtmlFrag('comment-action-link', ...)
- getTplSpan() → getHtmlFrag('span-raw', ...)
- setPageNumbers() → getPageNumbers()
- blocks/block-login.php, block-user_info.php:
- getTplTextInput / getTplHiddenInput → прямые getHtmlFrag-вызовы
- plugins/editors/*:
- getHtmlScriptSrc / getHtmlCssLink → head-script-src / head-link фрагменты
- config/local.php:
- Обновлён base_fingerprint
Benefits:
- Все PHP-компоненты проекта унифицированы на одном механизме рендера
- Удалены последние явные зависимости от helpers-old.php
Technical notes:
- getAdminCategoryImageSelect() определена локально в categories.php
- fingerprint обновлён после реструктуризации шаблонов
Все фронтенд-модули переведены с устаревших обёрток (getTplMetaRefresh, getTplGenderSelect, getTplSelectOption, getTplRadioForm, getTplFieldsOut и др.) на прямые вызовы $tpl->getHtmlFrag() с явными именами фрагментов.
Core changes:
- account (modules/account/index.php, admin/index.php):
- getTplMetaRefresh() → getHtmlFrag('meta-refresh', ...)
- getTplGenderSelect() → getHtmlFrag('select', ...) с inline-опциями
- getTplRadioForm() → getTplRadioGroup() с явными опциями
- account-privat-tab-pane → post-div
- alert 'text' → 'messages' для массивов ошибок
- forum (modules/forum/index.php):
- getTplForumIcon / getTplForumReplyForm → прямые getHtmlFrag-вызовы
- Пагинация и фрагменты обновлены
- media, links, files, help, faq, pages (modules/*/index.php):
- Замена getTplSearchResultTitle, getTplMoneyCalcForm, getTplViewFieldRows
- Миграция form/view/liste на новые partials
- news, search, shop, whois, users, voting и другие модули:
- getStopText() заменён передачей массива messages напрямую
- Все getHtmlFrag-вызовы унифицированы
Benefits:
- Устранены десятки тонких обёрток, код модулей стал однообразным
- alert-фрагмент получает messages-массив вместо pre-joined строки
- Удалены зависимости от helpers-old.php во всех модулях
Technical notes:
- getTplFieldsOut() переименован в getTplViewFieldRows() (уже в предыдущем commit)
- setPageNumbers() вызывается как getPageNumbers() там где применимо
Удалён устаревший helpers-old.php со старыми обёртками. Все вызовы getHtmlScriptSrc(), getHtmlHeadLink(), getTplHiddenInput() и прочих функций-обёрток заменены на прямые вызовы $tpl->getHtmlFrag().
Core changes:
- helpers-old.php (core/helpers-old.php):
Файл удалён полностью
- Все функции перенесены или заменены inline-вызовами $tpl->getHtmlFrag()
- helpers.php (core/helpers.php):
- Удалены мёртвые обёртки: getTplRefreshTimeSelect(), getTplMoneyCalcForm(), getTplSearchResultTitle()
- getTplAddDateTime() и getTplBbEditor() мигрированы на getHtmlFrag('hidden', ...)
- getTplPreviewContent() передаёт title_text вместо title_html
- getTplFieldsIn() инлайнит input-рендер напрямую
- system.php (core/system.php):
- getHtmlScriptSrc/Inline/CssLink заменены на head-script-src/head-script-inline/head-link фрагменты
- filterTextHighlight() использует span/span-raw фрагменты через preg_replace_callback
- getNaviTabs() инлайнит рендер через navi-tab-link/content/wrap фрагменты
- access.php / security.php (core/):
- getTplFragmentName('head-link-css') заменён на прямой вызов head-link фрагмента
- favicon и CSS-ссылки рендерятся через head-link фрагмент
- user.php (core/user.php):
- getTplHiddenInput / getTplTextInput заменены на getHtmlFrag('hidden'/'input')
- getPrivateMessageView() принимает string|array $stop
Benefits:
- Устранён слой обёрток-посредников, снижена цикломатическая сложность
- Рендер HTML унифицирован через единственный механизм $tpl->getHtmlFrag()
- Удалён мёртвый файл helpers-old.php
Technical notes:
- getTplFragmentName() больше не нужна, вызовы заменены литеральными именами
- preg_replace заменён на preg_replace_callback для доступа к $tpl в замыкании
Финальный шаг консолидации: все frontend-фрагменты приведены к структуре templates/{default,lite,simple}/fragments/*.html без поддиректорий. new/ поддиректория удалена. Добавлены фрагменты для форм, рейтинга, навигации, аккаунта и личных сообщений. Устаревшие дубликаты удалены.
Core changes:
- Renamed from new/ to root (per theme: default, lite, simple):
assoc-item, card, code-block, code-hljs, code-row, code-table, form-add, form-field-row, graphic, grid, hidden, input, msg-center, pager, related, related-item, select, shop-basic, shop-cart-item-row, shop-cart-table, span, table, table-row, table-row-content, table-row-liste, textarea, tip, view, view-field, voting-widget
- New fragments added (per theme):
- category-icon, category-title (icon/title with optional link)
- edit-tip, editor-file-row (editor UI helpers)
- inline-badge, link (generic UI elements)
- radio, radio-group (form radio controls)
- rating-bar-live (HTMX 5-star voting)
- title-tip-item (sub-item for title-tip pre-render)
- Modified fragments:
- assoc-wrap, checkbox-input, forum-view-change: contract updates
- breadcrumb-link: removed (merged into link contract)
- CSS new.css: add .sl-radio-group flex layout
- Deleted old root fragments (replaced by contracts above):
- login, login-logged, login-without (→ login/login-* contracts in system.php)
comment, comment-action-ajax/link, comment-avatar, comment-bulk-actions, comment-date, comment-list-form, comment-meta-color, comment-num-link, comment-rank-image, comment-signature, comment-text
account-comment-section/form, account-message-admin-note, account-nav, account-nav-item, account-pm-icon-link, account-pm-list-row, account-pm-list-table, account-privat-message-form, account-user-button
- account-favorite-add/off/on, account-favorites-row/table
- messagebox, privat-message
- alpha-nav-link, alpha-nav-text, navi-tab-link, navi-tab-content, navi-tabs-wrap
- categories, category-row, category-select, category-sub-item
- rating-like, rating-like-live, rating-bar, rating-wrap, file-input
- kasse-basic, kasse-wrap, meta-refresh
- Various block-, action-, basic-* legacy fragments no longer referenced
Benefits:
- Fragment namespace flat and consistent: no subdirectory lookup
- ~130+ obsolete fragments removed per theme
- PHP helpers/modules resolve fragments without path manipulation
Technical notes:
- templates/*/fragments/new/ directories fully removed
- All login, comment, account, PM, rating, form fragments now at root
- sl-radio-group CSS added to all three theme new.css files
helpers.php, helpers-old.php и system.php переключены с new/-префикса на прямые корневые имена фрагментов. getTplTitleTip переписан: каждый item рендерится отдельным вызовом getHtmlFrag('title-tip-item'), результат передаётся в title-tip как content, так как for-циклы шаблона не поддерживают sub-ключи вложенных объектов.
Core changes:
- core/helpers.php:
- getTplTitleTip: pre-render items via title-tip-item; pass content string to title-tip
All getHtmlFrag('new/...') calls renamed to direct fragment names: radio-option, radio, radio-group, file-input, alpha-nav-link, alpha-nav-text, navi-tab-link, navi-tab-content, navi-tabs-wrap, category-icon, category-title, category-sub-item, category-row, category-select, rating-like-live, rating-like, rating-bar-live, rating-bar, rating-wrap
- core/helpers-old.php:
- setPageNumbers: key rename pager→items, page→limit; fragment pager (no new/)
- getTplAjaxAction: comment-action-ajax (no new/)
- Comment action links: comment-action-link (no new/)
- core/system.php:
- getAsyncPager: key rename pager→items, page→limit; fragment pager (no new/)
- Login fragments: login-logged, login, login-without (no new/)
Comment fragments: comment-date, comment-num-link, comment-text, comment, comment-list-form (no new/)
- Categories: categories (no new/)
Benefits:
- Fragment resolution unified: all calls use root-level names in all themes
- getTplTitleTip contract explicit: no hidden for-loop dependency on sub-keys
Technical notes:
- pager fragment data keys changed: pager→items, page→limit (breaking if caller uses old keys)
- title-tip-item fragment required alongside title-tip
Все 24 frontend-модуля переведены на единый Etalon-стандарт рендеринга: замена HTML-строк в PHP на getHtmlFrag-вызовы с корневыми фрагментами, удаление inline-HTML из PHP, использование общих контрактов (view, table, card, form-add, grid, alert, pager).
Core changes:
- Content modules (auto_links, changelog, contact, content, faq, files, help, jokes, links, main, media, money, recommend, rss, search, sitemap):
- Replace inline HTML with getHtmlFrag calls (view, table, card, alert, pager)
- Remove raw string concatenation for list rows
- Use table-row-liste, table-row-content contracts
- Complex modules (account, forum, shop):
- account: migrate to account-* fragment contracts; remove inline tab HTML
- forum: replace open form/table HTML with fragment contracts
- shop: migrate cart, product, order views to shop-basic, shop-cart-* fragments
- Utility modules (clients, news, order, pages, users, voting, whois):
- news: align with table/pager/view contract
- voting: migrate vote form to fragment-based render
- whois: replace inline HTML output with view/card fragments
Benefits:
- Zero inline HTML remaining in frontend module render paths
- All modules share the same fragment contract surface (view, table, card, alert)
- Simplified future migration: contract changes propagate to all modules at once
Technical notes:
- modules/news/index.php and modules/pages/index.php share identical Etalon pattern
- shop cart/order fragments (shop-basic, shop-cart-*) are theme-independent
- No DB schema or URL changes
Все плагины редакторов обновлены: getHtmlFrag('new/hidden', ...), getHtmlFrag('new/textarea', ...) заменены на корневые имена без префикса. В slaed.js функция initCloseOpenBlocks переименована в initToggleBlocks для ясности назначения.
Core changes:
- Editor plugins (plugins/editors/*/driver.php):
- ckeditor: new/hidden → hidden
- codemirror: new/textarea → textarea
- plain: new/textarea → textarea
- tinymce: new/textarea → textarea
- toastui: new/textarea → textarea (see driver.php)
- System JS (plugins/system/slaed.js):
- Rename initCloseOpenBlocks() to initToggleBlocks() for clarity
Benefits:
- Fragment calls consistent with root-level architecture across all plugin drivers
- Function name reflects actual toggle behaviour, not directional close/open
Technical notes:
- No functional change to JS toggle logic; rename only