Журнал изменений
Move all legacy template-helper functions out of system.php and helpers-old.php into helpers.php, applying the getTpl* naming convention and SLAED variable-naming rules. Removes the last large block of mixed-concern render functions from system.php.
Core changes:
- core/helpers.php — new getTpl* functions added:
- getTplNewGraphic, getTplRadioForm, getTplGenderSelect, getGenderText
- getTplTitleTip, getTplFieldsOut, getTplSearchResultTitle, getTplMoneyCalcForm
- getTplEditorPreview, getTplEditorInsert, getTplEditorMenu, getTplEditorRow, getTplEditorTable
- getTplCommentLink, getTplCommentJs, getTplCommentDelete, getTplCommentMenu
- getTplCommentMeta, getTplCommentColor, getTplCommentAvatar, getTplCommentRank, getTplCommentSign
- getTplAlphaLink, getTplAlphaText
- getTplTabLink, getTplTabContent, getTplTabWrap
- getTplPagerLink, getTplPagerCurrent, getTplPagerDots, getAsyncPagerLink
- getTplCatIcon, getTplCatIconText, getTplCatTitle, getTplCatText, getTplCatTitleText
- getTplCatSubitem, getTplCatRow, getTplCategorySelect (image variant renamed to getTplImageSelect)
- getTplBlockPosition, getTplBlockRefresh, getTplBlockAction, getTplBlockView
- getTplAdminHintLabel, getTplAdminSmallNote, getTplAdminTipLine, getTplAdminInfoLine
- getTplAdminTableHead, getTplAdminTableCells, getTplAdminStatusBadge, getTplAdminLangHint
- getTplAdminListForm, getTplAdminSubmitButton, getTplAdminSection
- getTplCatPermRow, getTplCatTab, getTplCatSubmitRow, getTplAdminConfSave, getTplCatForm
- getTplAdminAccountSearch, getTplAdminBlockGrid, getTplAdminSearchDrop, getTplAdminCatSearch
- getTplVotingLink, getTplVotingDelete, getTplVotingMenu, getRatingAsync
- core/system.php — corresponding legacy functions removed:
- new_graphic, radio_form, get_gender, gender
- editorFilePreview, editorInsertAction, editorActionMenu, editorFilesRow, editorFilesTable
- commentActionLink, commentActionJs, commentActionDelete, commentActionMenu
- commentMetaText, commentMetaColor, commentAvatar, commentRankImage, commentSignature
- alphaNavLink, alphaNavText, naviTabsLink, naviTabsContent, naviTabsWrap
- pagerLink, pagerCurrent, pagerDots, getAsyncPagerLink (old signature)
- categoryIconLink, categoryIconText, categoryTitleLink, categoryTextLink
- categoryTitleText, categorySubItem, categoryRow, categorySelect, categorySelectOption
- breadcrumbLink, getRatingAsync (old location)
- getCommentAsyncAction, getEditorAsyncAction (moved)
- core/helpers-old.php — removed duplicates/superseded functions:
- getTplAdminAjaxAction, getTplSearchResultTitle (old version)
- getTplCatPermRow, getTplCatTab, getTplCatSubmitRow, getTplAdminConfSave, getTplCatForm
- getTplAdminAccountSearch, getBlockModules, getTplAdminBlockGrid, getTplAdminSearchDrop
- getTplAdminCatSearch, getTplCategorySelect (image variant), getTplBlockPosition/Refresh/Action/View
- getTplAdminHintLabel, getTplAdminSmallNote, getTplAdminTipLine, getTplAdminInfoLine
- getTplAdminTableHead, getTplAdminTableCells, getTplAdminStatusBadge, getTplAdminLangHint
- getTplMoneyCalcForm, getTplAdminListForm, getTplAdminSubmitButton, getTplAdminSection
- core/admin.php — edit_list() removed (superseded by getTplAdminListForm)
Benefits:
- system.php focuses on runtime logic; all render helpers live in helpers.php
- Consistent getTpl* naming across the entire codebase
- Variable names comply with SLAED 2–8 char lowercase rule
Technical notes:
getTplCategorySelect (image picker) renamed to getTplImageSelect to avoid collision with the new getTplCategorySelect (category dropdown)
- All moved functions retain identical template fragment calls
- No fragment files changed in this commit
Align all 4 themes (default, lite, simple, admin) with the new template layer: update shared fragment markup to use sl-* CSS classes, sync layout partials, and remove admin-* fragments from frontend themes (default/lite/simple) that belong exclusively to the admin theme.
Core changes:
- Account forms (default/lite/simple):
account-login-form, account-edit-form, account-newuser-form, account-passlost-form, account-password-form, account-privat-message-form, account-rss-select-form, account-rss-url-form, account-avatar-upload updated to current markup conventions
- Layouts (all 4 themes):
- app.html, main.html, home.html, bare.html synced across themes
- CSS (default, admin):
- new.css: sl-* class additions for new fragment layer
- system.css: cleanup in default and admin themes
- Fragment updates (all themes):
- form-add.html, form-select.html, contact-form.html, login.html
- editor-code-panel.html, editor-text-panel.html
- block-login-form.html, block-search-form.html, block-languages-select.html
- files-add-input-row.html, files-add-upload-row.html
- media-form-add.html, media-link-row.html
- shop-kasse-form.html, shop-partners-form.html
- recommend-form.html, rss-info-form.html, rss-read-forms.html
- whois-add-form.html, whois-domain-form.html, whois-license-form.html
- pager-dots.html, button.html, money-calculator-form.html (admin)
- partials: changelog.html, contact-block.html
- Admin fragment cleanup (default/lite/simple — 120 files deleted):
Removed all admin-* fragments from non-admin themes; they are only rendered in the admin theme and must not exist in frontend themes
Benefits:
- Themes stay in sync; no stale admin markup in frontend
- CSS class naming consistent with sl-* convention
- Fragment structure aligned with new/ template layer
Technical notes:
- Admin theme retains all admin-* fragments unchanged
- No PHP changes in this commit
Add all new template fragments required by the HTML-in-PHP removal refactor and the new/ namespace for reusable form controls and UI components. All fragments are added to all 4 themes (default, lite, simple, admin).
Core changes:
- new/ namespace — form controls (all 4 themes):
- input.html, textarea.html, select.html, select-option.html
- hidden.html, button.html, form-submit.html, form-add.html, form-field-row.html
- ajax-textarea-form.html
- new/ namespace — layout and UI (all 4 themes):
- grid.html, card.html, div-hr.html, cat-navi.html
- related.html, related-item.html, graphic.html
- msg-center.html, alert.html (new/)
- new/ namespace — code rendering (all 4 themes):
- code-block.html, code-row.html, code-table.html, code-hljs.html
- System UI fragments (root level, all 4 themes):
- comment-avatar.html, comment-num-link.html, comment-text.html
- comment-list-form.html, alpha-nav-link.html, alpha-nav-text.html
- navi-tab-link.html, navi-tab-content.html, pager-dots.html
- category-sub-item.html, rating-wrap.html, warning-list.html
- debug-section.html, admin-block-links.html, geo-ip-flag.html
- Shared UI fragments (root level, all 4 themes):
- button.html, ajax-textarea-form.html, checkbox-input.html
- file-input.html, multi-select.html, radio-option.html, select-option.html
Benefits:
- All HTML output from PHP helper functions now has a fragment counterpart
- new/ namespace provides reusable form controls for all frontend modules
- Theme-specific overrides possible for any fragment independently
Technical notes:
- new/ fragments are identical across all 4 themes by default
- Root-level fragments match existing PHP function output exactly
- pager-dots.html added to root level (used by both old pagerDots() and getTplPager())
Replace all legacy function calls across modules and blocks with the new array-based getTpl* API. Includes mass-converted textarea() → getTplTextarea() call sites and related API updates.
Core changes:
- textarea() → getTplTextarea([]) (all modules):
- Converted 31 files via balanced-paren argument parser
All positional args mapped to named array keys: id, name, value, mod, rows, placeholder, required
- getAjaxTextarea() → getTplAjaxTextarea([]) (modules/forum, user):
- Updated call sites with named array parameters
- getTplHiddenInput() positional → array API:
- modules/forum/index.php: subject, id, fid, pid, cat hidden inputs
- modules/help/index.php: pid, catid, posttype hidden inputs
- fields_in() → getTplFieldsIn([]) (modules/news/index.php):
- New div-based field rows instead of legacy <tr><td> table layout
- Other module updates:
- modules/content/index.php: migrated to new/ template fragments
- modules/news/index.php: getTplTextInput class sl_field (no inline style)
- blocks/block-login.php, block-user_info.php: API updates
Benefits:
- No module code references deprecated textarea() or getAjaxTextarea()
- Consistent named-array call convention throughout all modules
- getTplFieldsIn() replaces table-based fields_in() for new layouts
Technical notes:
- textarea() and getAjaxTextarea() remain in system.php as deprecated wrappers
- fields_in() unchanged — still used for legacy table forms (forum, account)
Migrate Editor::getSelect() and all editor drivers to use template fragments and the new getTplTextarea() array API. Parser refactored with private helper methods for image normalization.
Core changes:
- Editor class (core/classes/editor.php):
Editor::getSelect(): removed inline <select>/<option> HTML
- Now uses new/select + new/select-option fragments
- Added $selectAttr parameter for OnChange and other attributes
- Editor drivers (plugins/editors/*/driver.php):
- All drivers: textarea() → getTplTextarea(['id', 'name', ...]) array call
- bbcode/driver.php: removed legacy textarea() call
- ckeditor, codemirror, plain, tinymce, toastui: updated call signatures
- Parser class (core/classes/parser.php):
Extracted getRootPath(), getFallbackImage(), buildImageError(), normalizeImageSource(), normalizeHtmlImages() as private helpers
- checkbox-input fragment used for checklist rendering
Benefits:
- Editor select rendering is now theme-switchable via new/select fragment
- Consistent array API across all driver implementations
- Parser logic split into focused private methods
Technical notes:
- Editor::getSelect() signature: added optional $selectAttr = '' parameter
- All editor drivers call getTplTextarea() — textarea() no longer used
Replace all inline HTML string construction in PHP with $tpl->getHtmlFrag() calls. No HTML is built directly in PHP code anymore — all output is delegated to template fragments.
Core changes:
- HTML-in-PHP removal — standalone helper functions (core/system.php):
- new_graphic(): spans → new/graphic fragment
- user_geo_ip(): img/a → geo-ip-flag + link-btn-blank fragments
- adminblock(): table/hr → admin-block-links fragment
- user_info(): anchor → breadcrumb-link fragment
- warnings(): ol/li → warning-list + action-menu-item fragments
- commentMetaColor/Avatar/RankImage/Signature(): → dedicated fragments
- alphaNavLink/Text(): → alpha-nav-link/text fragments
- naviTabsLink/Content(): → navi-tab-link/content fragments
- pagerDots(): → pager-dots fragment
- categorySubItem(): → category-sub-item fragment
- breadcrumbLink(): → breadcrumb-link fragment
- debugSection(): → debug-section fragment
- ratingWrap(): → rating-wrap fragment
- add_menu(): → editor-action-menu + action-menu-item fragments
- renderFootControls(): → foot-controls fragment
- editorActionMenu/commentActionMenu/votingActionMenu(): li wrapping → action-menu-item
- HTML-in-PHP removal — larger functions (core/system.php):
- encode_php(): table/tr/td/pre/code/div → code-row/table/hljs/block fragments
- render_blocks(): div.sl_center → msg-center fragment
- ashowcom(): form/span/a/div → comment-list-form/date/num-link/text fragments
- updateVotingResult(): meta refresh × 3 → meta-refresh fragment
- API updates (core/admin.php, core/user.php):
- getTplMoveControls(): positional → array call sites updated
- textarea()/getAjaxTextarea() → getTplTextarea/getTplAjaxTextarea array API
- getTplHiddenInput(): legacy positional call → array call
- Editor::getSelect(): + $selectAttr param, inline HTML removed
Benefits:
- Zero inline HTML in core PHP files — full separation of logic and markup
- All rendering is theme-switchable via fragment overrides
- Consistent $tpl->getHtmlFrag() pattern throughout
Technical notes:
- comment-list-form fragment wraps admin bulk-action form
- ashowcom $hclass remains as data attribute string (passed to comment.html)
Migrate all helper functions to uniform array-based parameter API. Add new template helpers, enforce variable naming rules (max 8 chars, lowercase letters only, no snake_case), and remove = alignment padding.
Core changes:
- New functions (core/helpers.php):
- getTplFieldsIn(): new-layout field rows via new/form-field-row fragment
- getTplHiddenInput(): updated to accept 'attr' key
- getTplFormSubmit(): new form submit bar with preview/delete controls
- getTplTextarea(): rich-text editor textarea with upload config
- getTplAjaxTextarea(): inline HTMX edit form with save/back buttons
- Refactored functions (core/helpers.php):
- getTplBbEditor(): parameter $opt → $data
- getTplPager(): $opt → $data, $url_extra → $urlx, = alignment removed
- getTplMoveControls(): positional params → array $data
- getTplUserSearchInput(): $minlength → $mlen
- getTplFieldsIn(): $field_html → $fhtml
- Alignment cleanup (core/helpers.php):
- Removed = padding in getTplFormSubmit, getTplMoveControls, getTplTextarea
- helpers-old.php:
- Migrated getHtmlFrag() calls to new/ fragment namespace
Benefits:
- Consistent array API across all getTpl* helpers
- Variable names comply with .rules/global.md (2–8 chars, lowercase)
- No alignment padding — easier diffs and code review
Technical notes:
- getTplTextarea and getTplAjaxTextarea exist only in helpers.php
- system.php previously had textarea() and getAjaxTextarea() — removed there
Auto-generated base_fingerprint reflects the new template file set introduced by the new/ fragment layer across all three themes.
Core changes:
- config/local.php:
- Updated: base_fingerprint to current codebase state
Benefits:
- Config stays in sync with deployed template files
Technical notes:
- Fingerprint is computed automatically on template structure changes
Replaces legacy content-card/content-view/liste-wrap/liste-basic fragments with new/ layer equivalents. Fixes admin URLs. Adds CSRF token to frontend delete links. Adds refer=2 support to admin actions() so frontend-initiated deletes redirect back to the frontend.
Core changes:
- Card grid view (modules/news/index.php — news()):
- Card: getTplContentCard → $tpl->getHtmlFrag('new/card', ...)
- Fixed: edit URL op=news_add → name=news&op=add
- Fixed: delete URL op=news_admin&typ=d → name=news&op=actions&typ=d
- Added: refer=2 and CSRF token on frontend delete link
- Alert: alert → new/alert
- Liste view (modules/news/index.php — liste()):
- Table: liste-wrap → new/table (5 cols: id/title/cat/poster/date)
- Rows: liste-basic → new/table-row-liste
- Letter nav: extracted from liste-wrap param to standalone output
- Alert: alert → new/alert
- Full view (modules/news/index.php — view()):
- Renderer: getTplContentView → $tpl->getHtmlFrag('new/view', ...)
Removed HTML from PHP: <br><br> separators between hometext, bodytext and fields replaced with direct concatenation
- Fixed: edit URL op=news_add → name=news&op=add
- Fixed: delete URL op=news_admin → name=news&op=actions with token
- Admin actions handler (modules/news/admin/index.php):
- Added: $refer_val to distinguish refer=1 (admin tab) vs refer=2
- refer=1 → admin panel status=1 tab (pending news, unchanged)
- refer=2 → index.php?name=news (frontend list page)
Benefits:
- No HTML strings in PHP — all markup in fragments
- Admin URLs follow consistent name=MODULE&op=ACTION pattern
- Frontend delete secured with CSRF token and refer redirect
Technical notes:
- news/view() fields appended to rawtext (no separate fields param)
- new/card.html reuses all sl-* classes defined in new.css
- new/table-row-liste.html covers 5-column liste layout
Replaces legacy content-list and title fragments with new/ layer equivalents. Fixes admin URLs to match the name=content&op=action pattern. Adds CSRF token to frontend delete links. Fixes refer redirect in the admin delete handler so frontend-initiated deletes return to the frontend, not the admin panel.
Core changes:
- Frontend list view (modules/content/index.php — content()):
- Table: content-list-open → new/table (sortable, col_id/title/func)
- Rows: content-list-basic → new/table-row-content with new/tip
- Pager: setArticleNumbers → getTplPager with prefix new/
- Alert: alert → new/alert
- Removed: body from SELECT (unused in list)
- Fixed: duplicate ?? fallback in config reads
- Frontend view (modules/content/index.php — view()):
- Renderer: title+filterDoc echo → new/view fragment
- Removed HTML from PHP: fields separator moved to template
- Fixed: rss_read result stored in $rss, not $conf['content']
- Added: CSRF token on delete link, is_moder edit/delete nav
- Admin delete handler (modules/content/admin/index.php):
- Added: $refer flag (GET refer=1)
Redirect: refer=1 → index.php?name=content (frontend) otherwise → admin.php?name=content
Benefits:
- No HTML strings in PHP — all markup in fragments
- Admin URLs follow consistent name=MODULE&op=ACTION pattern
- Frontend delete secured with CSRF token
Technical notes:
- new/view.html handles fields via {% if fields %}<br><br>{{{ fields }}}
- Admin refer flag mirrors pattern used in news module (refer=2)