Журнал изменений
Introduce two new Mustache-style HTML fragment files that render a checkbox table for selecting news items associated with a record, keeping the markup out of PHP and in the template layer.
Core changes:
- Associated news table wrapper (admin-news-asso-table.html):
Renders an sl_form table element with {{{ rows_html }}} slot
- rows_html is populated by iterating admin-news-asso-cell fragments
- Associated news cell (admin-news-asso-cell.html):
Renders a single <td> with a named checkbox input
- name: associated[], value: {{ cid }}, checked state: {{{ checked }}}
- Displays article title {{ ctitle }} as inline label text
Benefits:
- Separates HTML structure from PHP controller logic
- Reusable fragments composable via getHtmlFrag() calls
- Consistent with existing admin fragment template conventions
Technical notes:
- Triple-brace {{{ }}} used for pre-rendered HTML slots (rows_html, checked)
- Double-brace {{ }} used for plain-text values (cid, ctitle) requiring escaping
- Backward compatible: fragments are new additions, no existing files changed
--------------------------------------------------------------------
Types: Refactor | Feature | Fix | Docs | Style | Test | Chore | Perf
Bullets: - main point, * sub-detail
--------------------------------------------------------------------
Unify stop/error message rendering across modules by replacing ad-hoc inline implode('<br>', ...) calls with the new shared getStopText() helper introduced in core/helpers.php, removing the now-redundant local getAdmintext() wrapper from admins.php.
Core changes:
- Admin admins module (admin/modules/admins.php):
- Remove local getAdmintext(array \) function (replaced by getStopText)
- Replace getAdmintext(\) call with getStopText(\) in add()
- Whois admin module (modules/whois/admin/index.php):
- Replace inline implode('<br>', \) with getStopText((array)\)
- Private messages (core/user.php):
- Replace inline implode('<br>', (array)\) with getStopText((array)\)
Benefits:
- Single source of truth for error message formatting
- Eliminates duplicate logic across three independent modules
- Consistent handling of empty/null stop entries via array_filter
Technical notes:
- getStopText filters empty strings via array_filter before joining
- Cast to (array) preserved where \ may be a scalar at call site
- Backward compatible: output is identical to previous inline logic
--------------------------------------------------------------------
Types: Refactor | Feature | Fix | Docs | Style | Test | Chore | Perf
Bullets: - main point, * sub-detail
--------------------------------------------------------------------
Add a set of small, focused helper functions that generate reusable HTML fragments for admin panels, keeping presentation logic in helpers and out of individual module files.
Core changes:
- New UI helper functions (core/helpers.php):
- getTplAdminSmallNote(text): standalone sl_small note div for label-less form rows
- getStopText(stop): joins non-empty error/stop messages with <br> separators
- getTplAdminTextLink(href, label, ...): safe anchor tag for use inside raw HTML slots
- getTplAdminTipLine(key, val): one key-value line for tooltip content_html strings
- getTplAdminInfoLine(label, value): one label-value line for info block content
- getTplAdminTableHead(cols): builds <th> head_html from column label arrays
- getTplAdminTableCells(cells): builds <td> cells_html from pre-rendered cell content array
- getTplSpan(class, raw_content, title): inline span with CSS class and optional title
- getTplAdminStatusBadge(state, yes, no): sl_green/sl_red badge span for status display
Benefits:
- Eliminates repetitive inline HTML string construction across modules
- Centralises HTML-escaping rules in one place, reducing XSS risk
- Provides a consistent API for all admin panel fragment generation
Technical notes:
- All attribute values are escaped via htmlspecialchars with ENT_QUOTES/UTF-8
- raw_content in getTplSpan is intentionally not escaped (caller responsibility)
- Backward compatible: no existing signatures changed
--------------------------------------------------------------------
Types: Refactor | Feature | Fix | Docs | Style | Test | Chore | Perf
Bullets: - main point, * sub-detail
--------------------------------------------------------------------
Same %20 space-encoding issue as the Migration badge. Replaced %20 with _ for consistency and reliable rendering on GitHub.
Core changes:
- Badge URL (README.md):
- Replace %20 with _ in Status badge URL
Technical notes:
- shields.io treats _ as space in path-based badge URLs
shields.io path badges on GitHub were rendering incorrectly due to double percent-encoding of the space character (%20). Replaced %20 with underscore (_) which shields.io treats as a space and GitHub does not mangle.
Core changes:
- Badge URL (README.md):
Replace %20 with _ in Migration badge URL
- Prevents double-decoding of percent-encoded space by GitHub
Benefits:
- Badge renders correctly on GitHub
Technical notes:
- shields.io treats _ as space in path-based badge URLs
- %25 encoding for % sign is unaffected and remains correct
Miscellaneous updates accompanying the jQuery removal and getTpl* migration: lang constants for new editor operations, expanded test coverage, documentation refresh, robots.txt hardening, and vanilla BxSlider replacement in lib.js.
Core changes:
- JS vanilla migration (templates/lite/assets/js/lib.js):
- Replaced jQuery BxSlider slider init with standalone vanilla carousel/slider implementation
- No jQuery dependency remaining in lib.js
- Language constants (admin/lang/*.php - all 6 locales):
- Added _EROBSTD (robots.txt standard label) and _ESAVED (file saved confirmation)
- Test suite (tests/):
- PhpFileFormatTest.php: expanded PHP file format checks
- TemplateValidationTest.php: added testSharedFrontendFragmentsStayInSyncAcrossThemes
- Added tests/TextFileEncodingTest.php: new encoding validation for all text files
- Documentation (docs/, README.md):
- docs/RAW_SLOTS_ADMIN.md: updated raw slot usage reference for admin templates
- docs/TEMPLATES.md: updated template system documentation
- docs/TEMPLATE_STATUS.md: updated migration status
- docs/TESTS.md: added test run reference
- README.md: updated migration progress badge (85% -> 90%), removed jQuery from stack list
- Infrastructure:
- robots.txt: added Disallow for /setup/, /setup.php, /storage/; added Sitemap directive
- config/comments.php, config/fields.php: whitespace normalization
Benefits:
- Full jQuery removal from lit theme frontend JS
- New test covers UTF-8 encoding and cross-theme fragment sync
- robots.txt now blocks sensitive paths from crawlers
Technical notes:
- lib.js vanilla implementation replaces #slider-head and #slaed_sites BxSlider instances
- No behavior change for end users
Introduce missing fragment and partial files required by the template engine after the admin helper and module migration, and add complete new layout and page files for lite and simple themes.
Core changes:
- Admin fragments (templates//fragments/admin-.html):
- Added admin-box, admin-form, admin-form-row, admin-form-wide, admin-table, admin-table-row
- Added admin-text-input, admin-textarea, admin-number-input, admin-email-input, admin-url-input
- Added admin-select, admin-select-option, admin-hidden-input, admin-color-label
- Added admin-image-preview, admin-hr-line, admin-info-box, admin-placeholder-box
- Added admin-rows-table, admin-tab-content, admin-tabs-setup
- Added to all three frontend themes: default, lite, simple
- Frontend fragments (templates/simple/fragments/):
- Added account-, assoc-, basic-, block-, forum-, liste-, login-, shop-, voting-, users-, messagebox, navi, privat-message
- Added to templates/default/fragments/ and templates/lite/fragments/ where missing
- Layouts and partials:
- Added templates/lite/layouts/main.html, templates/lite/pages/error.html
- Added templates/lite/partials/alerts.html, login-logged.html, login-without.html
- Added templates/simple/layouts/main.html
- Added templates/simple/partials/contact-block.html, forum-teaser.html, menu.html
- Added templates/default/partials/contact-block.html, forum-teaser.html
- Modified existing fragments:
- templates/*/fragments/account-view.html: updated slot names to match new helper output
- templates/*/fragments/shop-client-row.html: updated slot names
- templates/admin/fragments/: updated admin-voting, admin-shop, admin-security, admin-rss, admin-replace, admin-media, admin-lang, admin-fields, admin-account fragments
Benefits:
- All template fragments required by migrated PHP helpers are now present
- Consistent fragment set across default, lite, simple themes
- No missing fragment errors at runtime after getTpl* migration
Technical notes:
- Fragments follow Mustache {{ }} and {{{ }}} slot conventions
- New admin fragments are identical across all three frontend themes
Standardize the naming convention for all template-rendering helper functions by migrating from the mixed getAdmin/getCat/getBlock* prefix set to a single getTpl* prefix, making the template layer explicit and consistent.
Core changes:
- Helper definitions (core/helpers.php, core/admin.php):
- Renamed getAdminTable -> getTplAdminTable, getAdminTableRow -> getTplAdminTableRow
- Renamed getAdminForm -> getTplAdminForm, getAdminFormRow -> getTplAdminFormRow
- Renamed getAdminFormWide -> getTplAdminFormWide, getAdminBox -> getTplBox
- Renamed getAdminTextInput -> getTplTextInput, getAdminSelect -> getTplSelect
- Renamed getAdminHidden -> getTplHiddenInput, getAdminOption -> getTplOption
- Renamed getAdminHintLabel -> getTplAdminHintLabel, getAdminPlaceholderBox -> getTplAdminPlaceholder
- Renamed getCategoriesSearch -> getTplAdminCatSearch, getCategoryImageSelect -> getTplCategorySelect
- Renamed getCategoryImgPreview -> getTplCategoryPreview, getCatPermRow -> getTplCatPermRow
- Renamed getAdminTabName -> getTplAdminTabName, getAdminTabsSetup -> getTplAdminTabsSetup
- Renamed getBlockViewGrid -> getTplAdminBlockGrid, getBlockRefreshSelect -> getTplBlockRefresh
- Renamed getBlockActionSelect -> getTplBlockAction
- core/admin.php: extracted canonical implementations to helpers.php; wrappers remain for backward compat
- core/classes/template.php: added dev-mode template error reporting and debug comments
- Call site migration (admin/modules/.php, modules//.php, blocks/*.php, core/user.php):
- Updated all 88 call sites to use new getTpl* names
- No behavior change; pure mechanical rename
Benefits:
- Single coherent getTpl* namespace for all template helpers
- Canonical implementations live in core/helpers.php; admin.php retains thin wrappers
- Template error reporting improves debuggability in dev mode
Technical notes:
- Backward-compatible: old admin wrappers in admin.php still delegate to getTpl canonical functions
- No DB or API changes
Remove all jQuery-dependent plugin bundles and replace core UI utilities with a standalone vanilla JS module, eliminating jQuery as a runtime dependency for all page-level functionality.
Core changes:
- Plugin removal (plugins/):
- Deleted plugins/jquery/ (jquery.js, jquery-ui.js, jquery.cookie.js, jquery.slaed.js, tinycon.js, ui/ bundle)
- Deleted plugins/fancybox/ (jquery.fancybox.js and all helpers/assets)
- Deleted plugins/uploadify/ (jquery.uploadify.js, uploadify.swf, assets)
- Deleted plugins/ckeditor/adapters/jquery.js (jQuery adapter)
- Deleted plugins/system/tablesort.min.js (moved to plugins/tablesort/)
- Deleted plugins/codemirror/*/index.html (demo pages, not runtime code)
- Added plugins/system/slaed.js (vanilla replacement for jquery.slaed.js)
- Added plugins/tablesort/ (standalone tablesort bundle)
- Template JS (templates/):
- Deleted templates/lite/assets/js/jquery.bxslider.js
- Added templates/lite/assets/js/tabs.js and templates/default/assets/js/tabs.js (vanilla tab init)
- Updated theme.css in default and lite: removed BxSlider/jQuery UI styles, added vanilla tab CSS
- Removed jQuery UI .ui-autocomplete CSS rule from system.css in admin/default/lite
- Removed jQuery and jQuery UI badge links from layouts/app.html, layouts/home.html, index.html
- Config and runtime (config/, core/system.php, plugins/system/global-func.js):
- config/global.php: removed jQuery/FancyBox/Uploadify from script_f and css_f load lists
- core/system.php: replaced jQuery UI datepicker in datetime() with native HTML5 input; fixed garbled UTF-8 in getTranslit() and filterSlug() transliteration maps
- plugins/system/global-func.js: added vanilla syncNativeDateTimeInput() and fetchUserSuggestions() to replace jQuery UI autocomplete and datepicker
- Encoding fixes (templates/*/fragments/editor-translate-panel.html):
- Fixed garbled double-encoded Cyrillic characters in all four theme variants
Benefits:
- Eliminates jQuery and jQuery UI as page-level runtime dependencies
- Reduces total JS payload by ~30 KB (minified jQuery + jQuery UI)
- Resolves broken Cyrillic rendering in transliteration and editor panels
- Tab UI now works independently via vanilla setAdminTabs() and CSS
Technical notes:
- FancyBox (.screens, .site-link) still referenced in templates; requires separate replacement with native <dialog> or GLightbox
- CloseOpen(), HideShow(), Upper(), CheckBox(), TranslateLang() migrated to slaed.js as vanilla functions
- datetime() now emits native <input type="datetime-local"> with hidden sync field
Replace the legacy AjaxLoad and ddtabcontent runtime across admin and frontend flows with HTMX-based async interactions and a new shared admin tabs layer. This also completes the tablesorter-to-Tablesort migration, cleans up route and helper naming to match project rules, and finalizes the shared template extraction work for repeated admin HTML builders.
Core changes:
- Async transport and routing cleanup (index.php, core/system.php, core/user.php, core/admin.php):
Replaced legacy AjaxLoad-based endpoints and callers with HTMX-friendly async flows
- Renamed async handlers and route ops to rule-compliant names
- Fixed shared pager/query generation and CSRF propagation for async requests
- Updated admin info, favorites, private messages, cart, rating, comment, voting, editor, block, category, upload, and session flows
- Fixed shared admin fragment responses and account pagination URL encoding
- Shared admin templates and tabs modernization (core/helpers.php, admin/modules/.php, templates/admin/fragments/):
- Extracted repeated admin table, form, action, row, input, image, and tab setup HTML into reusable fragments and helpers
- Replaced the legacy tabs runtime with the new setAdminTabs layer while keeping module rendering stable
- Removed obsolete admin tab script fragments and legacy tab id contracts
- Tablesort migration and frontend fragment cleanup (plugins/system/tablesort.min.js, plugins/jquery/jquery.slaed.js, templates/*):
- Introduced Tablesort as the shared table sorting runtime and removed jquery.tablesorter and jquery.metadata from active use
- Migrated sortable headers to data-sort-method markers and restored sort state visuals with the existing SLAED CSS contract
- Converted remaining theme fragments from inline AjaxLoad handlers to HTMX interactions across admin, default, lite, and simple templates
Benefits:
- Removes legacy async JavaScript transport and dead sorter dependencies from active runtime code
- Centralizes repeated admin HTML patterns in shared fragments with cleaner helper boundaries
- Aligns async routes, helpers, and tabs behavior with current naming and template rules
Technical notes:
- Adds plugins/system/tablesort.min.js and removes jquery.tablesorter.js, jquery.tablesorter.min.js, and templates/admin/assets/js/jquery.metadata.js
- Renames multiple async route ops and helper functions; old legacy route names are no longer preserved
- Includes database total-row sort protection, account pager URL normalization, and updated admin/page render coverage