Последнии сообщения форума
Финальный шаг консолидации: все 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
Все admin-фрагменты, ранее лежавшие в templates/admin/fragments/new/, перенесены в корень templates/admin/fragments/. PHP-вызовы в admin-модулях обновлены: new/hidden → hidden, new/textarea → textarea и т.д. Метка _CHECKOP в bulk-action формах оформлена через span.sl-action-label.
Core changes:
- Admin templates (templates/admin/fragments/):
- Move new/{hidden,input,textarea,select,select-option,file-input} to root
- Move new/{code-block,code-hljs,code-row,code-table,graphic,msg-center} to root
- Move new/{ajax-textarea-form,view-field} to root
- Add link.html and list-bottom.html fragments
- Delete link-btn.html and link-btn-blank.html (replaced by link.html)
- Delete residual new/button.html (already exists at root)
- Admin CSS (templates/admin/assets/css/new.css, system.css):
- Add .sl-action-label styles for bulk-action form labels
- Admin modules (admin/modules/comments.php, modules/news/admin/index.php, modules/shop/admin/index.php):
- Wrap _CHECKOP with span.sl-action-label instead of bare string + colon
- news/admin: extract pager into variable; use list-bottom fragment for footer
- news/admin: add sl-th-center class to checkbox column header
Benefits: - Admin fragment namespace consistent with frontend (no new/ prefix) - Bulk-action label has semantic markup for CSS styling
Technical notes: - templates/admin/fragments/new/ directory fully removed - link-btn/link-btn-blank replaced by generic link.html fragment
template.php передаёт sourceType/sourceName в getView, чтобы сообщения об ошибке показывали реальный тип («fragment») и имя файла, а не «view». editor.php переключён с new/select, new/select-option на корневые фрагменты.
Core changes:
- Template engine (core/classes/template.php):
Pass sourceType and sourceName through getView for accurate error context * reportTemplateError and getTemplateDebugComment now receive fragment type/name * sanitizeData unsets the two new local vars to prevent template leakage
- Improve getTemplateErrorMessage for render-failed vs not-found distinction
- Editor class (core/classes/editor.php):
- Replace getHtmlFrag('new/select-option', ...) with getHtmlFrag('select-option', ...)
- Replace getHtmlFrag('new/select', ...) with getHtmlFrag('select', ...)
Benefits: - Clearer error diagnostics when a fragment render fails - Editor fragment calls aligned with root-level fragment architecture
Technical notes: - No interface changes; getView signature extended with optional params (default '') - editor.php: fragments select and select-option exist at root level in all themes
Константа _CHECKOP использовалась как метка перед select-элементом в bulk-action формах. Длинная формулировка «The action marked with» заменена на «Action» во всех 6 языковых файлах. Теперь метка выводится через span.sl-action-label и не нуждается в хвостовом двоеточии.
Core changes:
- Language constants (lang/{de,en,fr,pl,ru,uk}.php):
- Replace verbose _CHECKOP definition with short «Action» equivalent
Benefits: - Removes redundant colon-suffix logic from PHP callers - Consistent short label across all locales
Technical notes: - Change is backward-compatible: same constant key _CHECKOP, new value
Два новых фрагмента для admin-шаблонов: универсальная кнопка-ссылка и полноценный шаблон монитора системы.
Core changes:
- link-btn.html:
Ссылка с href, title, class и label — без target="_blank" (в отличие от link-btn-blank.html)
- basic-monitor.html:
- Полный HTML/CSS/JS шаблон для страницы системного монитора
- Карточки: CPU, память, диск, uptime, сервер, PHP, MySQL
- CSS-переменные (--bg-card, --primary, --accent и др.)
- SVG-knobs для метрик нагрузки; таблицы процессов и расширений
Benefits: - link-btn покрывает внутренние ссылки (дополняет link-btn-blank) - basic-monitor централизует разметку монитора в шаблоне
Technical notes: - basic-monitor содержит встроенные <style> и <script> - Рендерится через {% if show_layout %} условный блок
Добавить два новых фрагмента для admin-шаблонов и объявить global $tpl в двух функциях monitor.php.
Core changes:
- foot-controls.html:
Условный рендер: top_label (ссылка-якорь наверх), time_html, license_html, debug_html в футере admin-страницы
- link-btn-blank.html:
- Ссылка с target="_blank", классом и title-атрибутом
- admin/modules/monitor.php:
global $tpl добавлен в getMonitorServerStats() и getMonitorRuntimeStats()
Benefits: - Фрагменты foot-controls и link-btn-blank повторно используемы - monitor-функции получают доступ к $tpl для рендера
Technical notes: - foot-controls использует OnClick="Upper(...)" (legacy scroll-хелпер)
Переписать modules/pages/index.php по образцу modules/news/index.php: new/ фрагменты, getTplPager с url_extra, устранить SQL-инъекции, привести код к конвенциям SLAED.
Core changes:
- pages() — список страниц:
- getTplContentCard → new/card (width: 100) + new/grid
- setArticleNumbers → getTplPager с url_extra
- $cat/$ncat → прямой $ncat; $field/$orderby inline → if/elseif/else
- SQL: "cid = '".$ncat."'" → 'cid = '.(int)$ncat; array_map('intval')
- $ismoder/$token перед loop; edit_href/delete_href с name=pages + token
- $offset = (int)(($num - 1) * $unum) — убрано двойное присваивание
- view() — просмотр страницы:
- getTplContentView → new/view (единый шаблон)
- fields через getTplFieldsOut; pagebreak-поддержка сохранена
- Связанные записи: assoc-логика → new/related + new/related-item
- liste() — табличный список:
- liste-wrap/liste-basic → new/table + new/table-row-liste
- add() / send():
- hometext/bodytext/field type 'raw'; getTplPreviewContent
- INSERT многострочный; (int)$user[0]; $db убран из add()
- new/alert + getStopText
Benefits: - Устранены SQL-инъекции; единообразие с Etalon - Консистентные edit_href/delete_href (name=pages)
Technical notes: - 4-space indentation; switch ($op) с пробелом - $user убран из globals pages()





