Журнал изменений
Extend generic fragments to support new boolean flags and rendering variants required by the PHP caller migration. Update partials to use fragment includes instead of inline HTML, completing the transition to a fully data-driven template layer. Applied uniformly to default, lite, and simple themes; plus templates/lite/index.php.
Core changes:
link.html: add onclick_attr pass-through for arbitrary onclick without is_delete; is_cart_checkout added to class chain
- list.html: add is_unordered flag to render <ul> instead of <ol>
- post-div.html: add has_hr flag to render <hr> after the closing </div>
span.html: add is_line_break flag (appends <br>); add content_html slot for raw HTML content alongside existing text slot; is_danger class added to chain
title.html: add title_class parameter to override sl-title on h3; add title_html slot for raw HTML in h2/h3/h4 variants; add is_level_four / h4 rendering variant
- checkbox.html: add is_plain flag for plain label-only layout (used in voting polls)
- radio.html: updated data binding for inline voting list rendering
- form-submit.html: align class/input_attr parameters for form-submit callers
- form-field-row.html: minor slot/attribute alignment
- date-badge.html: add class parameter for custom date badge styling
- login-nav.html: convert inline HTML elements to fragment includes:
- input/password fields → {% include 'fragments/input.html' with ... %}
- submit button → {% include 'fragments/button.html' with ... %}
- lost/register/token/refer/op → fragment includes via data arrays from PHP
- form-add.html, form-wrap.html: attribute normalization and slot alignment
- fieldset-block.html: field/content slot updates
- contact-block.html: minor field alignment
Benefits:
- login-nav partial is now fully fragment-based — no inline HTML strings
- title fragment covers h2/h3/h4 with or without raw HTML content
- span and post-div cover remaining inline layout needs without new fragments
Technical notes:
- Applied identically to default, lite, and simple themes
- templates/lite/index.php updated for related partial/fragment API changes
Replace obsolete single-purpose fragments and partials with generic alternatives across all affected modules. Forms previously delegated to dedicated partials are now built inline using form-add/form-wrap + form-field-row + form-submit, removing the need for thin wrapper partials that added no reusable logic.
Core changes:
submit → form-submit across all callers (account, files, forum, links, money, news/admin, recommend, rss, search, shop, voting, whois, contact):
- Replaces the standalone submit input fragment with the standard form-submit
which integrates class and extra-attribute support
Partial-to-inline form migration:
- contact: contact-form partial → form-add with inlined form-field-row fields
- files/media: files-download-form partial → form-wrap with inline form-submit
- forum: forum-reply-form partial → form-add with form_attr for sl-forum-reply-form
- money: calculator-form partial → form-add with inlined number/result/button fields
- whois: mini-post-form partial → form-add; fieldset-post-form → fieldset-block
Fragment replacements:
- auto_links: auto-links-code-row + auto-links-embed-link/image → table-row + textarea
- auto_links/news: code-table → table open/close with is_form flag
- content/news/links: div-hr → post-div with has_hr flag and id preserved
- content: tip → post-div with date-badge + span(sl_views) inside
- media: media-link-row → form-field-row with link label and input
- voting: voting-basic → post-div with class post-vote
- shop: shop-cart-button → link with is_htmx; shop-kasse-content → post-div
- recommend: recommend-success-text → alert or direct text
Email/notification fragments:
- contact: contact-email-body → message-block partial with lines[]
- recommend, rss, money: respective email fragments → message-block partial
Benefits:
Thin wrapper partials (files-download-form, forum-reply-form, calculator-form, mini-post-form, contact-form) no longer needed; forms built from generic parts
- submit fragment eliminated as a standalone — form-submit is the canonical form
- div-hr, tip, auto-links-code-row removed as call sites are updated
Technical notes:
- No functional behavior changes — structure and HTML output remain equivalent
- All 17 affected module files updated in this commit
Continue the contract-driven fragment migration: replace obsolete single-purpose fragments with boolean-flag extensions of existing generic fragments or consolidated partials, removing the last CSS class strings from PHP callers.
Core changes:
- Database error display (core/classes/pdo.php):
- pdo-error-badge → getHtmlFrag('span', ['label', 'content_html', 'is_danger' => true])
- Utility helpers (core/helpers.php):
- getTplRadioGroup(): radio-group → post-div with class sl-radio-group
- getTplNewGraphic(): graphic → span with icon class and title
- rss_read(): rss-source-title → title fragment (is_level_two) + link (is_blank)
- letter(): line-stack-item → span with sl-line-stack-item class and is_line_break flag
- addFilescanTask(): security-mail-message → getHtmlPart('message-block', ...)
- encode_php(): code-table → table open/close with is_form flag
- render_blocks(): msg-center → post-div with is_center flag
- warnings(): warning-list → list fragment
- Security email (core/security.php):
- addMail(): security-mail-trace → getHtmlPart('message-block', lines[])
- System helpers (core/system.php):
setHead(): login-nav partial extended with pre-built sub-field data arrays (name_field, password_field, submit_button, lost_link, register_link, token_field, etc.)
setCategories(): category-icon → link with img_src (accessible) or span for locked; category-title → link/span with sl-catname class; category-sub-item → post-div
- getVotingView(): voting-post → checkbox/radio with is_plain + list-item
- User/message rendering (core/user.php):
setComShow(): account-comment-section → nested post-div with id=comm/repcsave; submit → form-submit fragment
setMessageShow(): messagebox → post-div with class message-box + title fragment; introduced $messageBox closure to deduplicate the four view-type branches
- getPrivateMessageView(): submit → form-submit fragment
Benefits:
- PHP callers no longer embed CSS class knowledge or HTML structure decisions
- login-nav partial now fully self-contained: all sub-elements passed as data arrays
- Voting form uses standard checkbox/radio fragments instead of custom voting-post
- Security email footers unified through message-block partial
Technical notes:
- security-mail-trace and security-mail-message fragments no longer referenced
- category-icon and category-title fragments no longer referenced from PHP
- voting-post fragment no longer referenced from PHP
- code-table fragment no longer referenced from PHP
Regenerated base_fingerprint after the template and core refactor wave to reflect the current canonical state of the codebase.
Core changes:
- Fingerprint update (config/local.php):
- base_fingerprint: f005dfd5acda9f455681e75d1976bf6c15b89e63 → 9bac3d7739a31f67a5d1f459dec1ae23f316a997
Benefits:
- Config fingerprint matches the refactored codebase state
- Prevents false-positive base-mismatch warnings on next run
Technical notes:
- Automatic regeneration; no logic changes
Add new sl-* CSS rules required by the consolidated partial and updated fragment templates introduced in this refactor wave. Applied uniformly to default, lite, and simple themes.
Core changes:
- Fieldset and text utility classes (*/assets/css/new.css):
- sl-fieldset-form-legend-success, sl-fieldset-form-legend-danger: fieldset legend states
- sl-fieldset-center: centered fieldset content
- sl-fieldset-legend-info: info-state legend color
- sl-text-success, sl-text-danger: inline text state colors
- sl-text-bold: font-weight shorthand
- sl-text-justify: text-align helper
- Alpha navigation letter badge:
- sl-letter: styled inline letter box for alpha-nav links (replaces old inline style)
- Rating system CSS (sl-rate-*):
- sl-rate, sl-urating, sl-crating: star rating bar layout and positioning
- min-rate variants: compact 16px rating bar for content lists
- sl-rate-like, sl-rate-plus, sl-rate-minus: like/dislike button sprites
- sl-rate-num, sl-rate-is: score bubble with directional arrow and active state
data-sl-rating-width attribute selectors (0–100): replace inline style width for CSP compliance and data-attribute-driven rendering
Benefits:
- All visual state decisions moved from PHP into CSS and data-attributes
- data-sl-rating-width eliminates inline style="width:X%" on rating bars
- New utility classes cover fieldset/form feedback states without custom CSS
Technical notes:
- sl-rate-* rules migrated from legacy inline CSS; no functional change
- data-sl-rating-width selectors cover 0–100 integer percent values
- Applied identically to default, lite, and simple themes
Delete all fragment templates that are no longer referenced by PHP callers after the migration to boolean-flag fragments, unified partials, and merged rating/list/action contracts. Applied uniformly to default, lite, and simple themes.
Core changes:
- Fragments replaced by boolean flags in existing fragments:
- category-link → link with is_category; category-select → select
- action-delete → link with is_delete; action-menu-item → list-item
- comment-date → inline-badge with is_comment_date
- comment-avatar → image with is_avatar; comment-rank-image → image
- meta-value → span with label; bold-text → span with is_bold
- br-line, break → removed (handled inline or replaced by list/line-stack-item)
- view-field → field-value fragment; heading-2 → title fragment
- alpha-nav-link, alpha-nav-text → removed (caller handles inline)
- navi-tab-link → link + list-item combination
- Fragments replaced by consolidated partials:
- account-view → partials/account-view; login → partials/login-nav
- contact-form, contact-email-body → partials/contact-form + message-block
- ajax-textarea-form → partials/form-wrap
- forum-reply-form, forum-mod-form, forum-mod-check, forum-mod-checkall → partials/forum-reply-form
- forum-htmx-edit-link, forum-status-img, forum-status-img-link, forum-topic-icon → partials
- files-download-form → partials/files-download-form
- recommend-form, recommend-mail-message → partials/recommend-form + message-block
- rss-info-form, rss-read-forms → respective partials
- session-summary → partials/session-summary
- shop-kasse-form, shop-voting-box → partials/shop-kasse-form
- voting-widget → partials/voting-widget
whois-domain-form, whois-info-button, whois-license-add-button, whois-license-form, whois-output-open/line/close, whois-result → partials/whois-output
- money-email-confirm, money-email-order, order-email-admin → partials + message-block
- comment-list-form → partials/mini-post-form; privat-message → forum-view-basic
- main-slider → partials/main-slider
- Rating duplicates removed:
- rating-bar-live, rating-like-live → merged into rating-bar/rating-like with is_live flag
- Misc micro-fragments removed:
- modul-link, media-link-break, media-post-badge, form-submit-btn
- faq-quicklinks-open, faq-quicklinks-row, faq-quicklinks-close → table/table-row
- partials/alerts, partials/login-without, partials/login
Benefits:
- Removes ~180 dead template files from the repository
- Fragment directory contains only actively used atomic components
- Eliminates the possibility of callers using stale/obsolete contracts
Technical notes:
- All deleted files have confirmed zero callers after previous refactor commits
- Applied identically to default, lite, and simple themes (~180 files total)
Rewrite existing fragment and partial templates to accept boolean semantic flags instead of raw CSS class strings, consolidate conditional rendering logic inside the templates, and merge live/static rating variants into unified fragments. Applied uniformly to default, lite, and simple themes.
Core changes:
- Universal fragments updated to accept boolean flags:
link: is_footer_button, is_last, is_account_button, is_votes, is_comments, is_delete, is_category, is_avatar_link, is_blank
- image: is_avatar (adds sl_avatar class internally)
- span: is_highlight, is_bold, is_message_in/out/save, is_hidden, is_votes
- post-div: is_form_submit, is_center
- table: is_form, is_avatar_grid, is_amount, is_faq; open/close handled internally
- select: is_account (replaces sl-field--account class string)
- button: is_legacy_green (replaces sl_but_green class string)
- textarea: is_editor_area (replaces sl_earea class string)
- comment-action-ajax: is_button_blue flag
- inline-badge: is_comment_date variant
- category-row: is_hidden flag replaces style string
- table-row: is_avatar flag in cell context
- Rating fragments merged and extended:
rating-bar: absorbs rating-bar-live behavior via is_live + target_id flags; has_score replaces nrate class string; data-sl-rating-width attribute for CSS
rating-like: absorbs rating-like-live behavior via is_live flag; has_score replaces nrate class string
- rating-wrap: is_like replaces wrap_class string
- Forum/view fragments updated:
- forum-view-basic: extended with is_private_message flag and new meta fields
- comment.html: updated field names for consistency
- Navigation and account fragments:
- account-nav, account-nav-item: updated slot names
- login-logged, navi, msg-center, main-section, main-content-item: minor updates
- Partials updated:
- view.html, contact-block.html: field name and conditional logic updates
Benefits:
- Templates own their own CSS decisions — PHP passes intent, not class names
- Fewer breaking changes needed for future CSS refactors
- Rating templates unified: 4 fragments → 2 with conditional live behavior
Technical notes:
rating-bar-live and rating-like-live fragments are no longer called from PHP (they remain as dead files until the delete commit removes them)
- All changes are backward-compatible within the new boolean API
Introduce consolidated partial templates and new utility fragments that replace multiple scattered atomic fragments with single reusable view-level contracts. Applied uniformly to default, lite, and simple themes.
Core changes:
- New partial templates (*/partials/):
- account-view: full user profile view shell
- contact-form: contact page form with captcha and field layout
- editor-upload-panel: BB-editor file upload panel with HTMX upload form
- fieldset-block: generic fieldset wrapper with legend and content
- fieldset-post-form: fieldset-wrapped post/comment add form
- files-download-form: file download action form
- form-wrap: generic form container (replaces ajax-textarea-form partial)
- forum-reply-form: forum reply/edit HTMX form
- line-list: ordered/unordered list layout for inline stacked items
- login-nav: login form embedded in site header navigation
- main-slider: front-page image slider partial
- message-block: generic labeled key-value email/notification block
- mini-post-form: compact inline post form
- recommend-form: recommend-to-friend form
- rss-info-form: RSS subscription info and subscribe form
- rss-read-forms: RSS reader add-source form
- session-summary: active session overview table
- shop-kasse-form: shop checkout/order form
- voting-widget: voting poll with results, admin controls, and footer links
- whois-output: WHOIS domain/IP lookup result panel
- New utility fragments (*/fragments/):
- list / list-item: generic ol/ul list and li item (replaces inline HTML lists)
- line-stack-item: stacked inline item wrapper
- debug-section: debug info section header
- debug-stats: CPU/memory stats row in debug panel
- email-noscript: noscript fallback block for HTML emails
- rss-source-title: RSS source title row
- security-mail-message: security event notification email body
Benefits:
- Eliminates inline HTML string concatenation for complex form/view layouts
- Single template file per concept instead of 3-8 micro-fragments per form
- Uniform partial contracts across all three themes
Technical notes:
- Applied identically to default, lite, and simple themes (87 new files total)
- PHP callers updated in preceding commits; these files complete the contract
Update all module callers to match the updated fragment/partial contracts: replace CSS class strings with boolean semantic flags, adopt consolidated partials for forms and views, and align getPageNumbers() calls with the dropped $frag parameter.
Core changes:
- Fragment API normalization (all 20 modules + admin/modules/referers.php):
link: 'class' => 'sl_but_foot' → is_footer_button; 'class' => 'sl_last' → is_last; 'class' => 'sl_but' → is_account_button; 'class' => 'sl_votes/sl_coms' → is_votes/is_comments
image: 'class' => 'sl_avatar' → is_avatar; link_class sl-avatar-link → is_avatar_link; 'img_class' → is_avatar in table-row cells
table: 'class' => 'sl_table_form' → is_form; + is_avatar_grid flag for avatar grids; 'class' => 'sl_table_amount' → is_amount
- post-div: 'class' => 'sl-form-submit' → is_form_submit; 'class' => 'sl_center' → is_center
- select: 'select_class' => 'sl-field--account' → is_account
- submit: 'class' => 'sl_but_blue' removed (fragment uses default style)
- Partial migration:
- contact: contact-form → getHtmlPart('contact-form'); contact-email-body → message-block
- account: account-view → getHtmlPart('account-view')
- faq: faq-quicklinks-open/row/close → table/table-row/table with is_faq flag
- files, forum, whois, shop, rss, recommend, money, order: respective obsolete fragments → partials
- Action element migration:
- action-delete → link with is_delete flag (across forum, content, faq, voting, news, etc.)
- action-menu-item → list-item with content_html key (all editor action menus)
- getPageNumbers() caller updates (admin + all modules):
- Drop first $frag argument from every call site
Benefits:
- Modules no longer carry CSS knowledge — all styling decisions live in templates
- Consistent boolean flag convention across all call sites
- Partial-based forms reduce inline HTML from module PHP files
Technical notes:
- getPageNumbers() breaking change handled in all 21 affected call sites
- No functional behavior changes — pure API contract migration
Replace raw CSS class strings and obsolete fragment names with boolean semantic flags and consolidated partial templates, completing the contract-driven template layer. getPageNumbers() signature simplified by removing the unused $frag parameter.
Core changes:
- Fragment/partial API migration (core/helpers.php):
- getPageNumbers(): remove dead $frag param, update all internal call sites
- getTplViewFieldRows(): view-field → field-value, label → label key rename
- getTplBbEditor(): inline HTML → getHtmlPart('editor-upload-panel', ...)
- getTplAjaxTextarea(): ajax-textarea-form → getHtmlPart('form-wrap', ...) + inlined buttons
- getRatingAsync(): nrate class string → has_score bool; rating-like-live/rating-bar-live merged into unified rating-like/rating-bar with is_live flag; wrap_class → is_like bool
- getTplCategorySelect(): category-select → getHtmlFrag('select', ...)
- Security email templates (core/security.php):
- addHackReport/addWarnReport: security-report-email + br-line → getHtmlPart('message-block', lines[])
- System helpers (core/system.php):
- setHead(): getHtmlFrag('login') → getHtmlPart('login-nav')
- filterTextHighlight(): remove admin-only span-raw branch, use span with is_highlight flag
- setCategories(): style string → is_hidden bool; category-link → link with is_category flag; category-row style → is_hidden
- addSitemapTask(): inline HTML ol/li → list/list-item fragments; add $tpl to globals
- getNaviTabs(): navi-tab-link → link + list-item
- getVotingView(): action-delete → link with is_delete; action-menu-item → list-item; voting-widget → getHtmlPart; CSS class strings → is_* booleans; width calculation clamped with max/min/round
- User/message templates (core/user.php):
- setComShow: submit class removed (default style)
- setMessageShow: post-div class → is_center bool
- getPrivateMessageView: action-menu-item → list-item; comment-date → inline-badge with is_comment_date; comment-rank-image → image; meta-value → span with label; privat-message → forum-view-basic with is_private_message; span class strings → is_* booleans
Benefits:
- PHP callers no longer embed CSS class strings, removing style coupling
- Partial contracts centralize layout logic in templates
- Unified rating-like and rating-bar fragments (removed *-live duplicates)
- Cleaner boolean API reduces fragile string concatenation
Technical notes:
- getPageNumbers() signature change is breaking for all callers (all updated in this commit)
- rating-like-live and rating-bar-live fragments no longer referenced from PHP
- message-block partial replaces security-report-email + br-line combination