Последнии сообщения форума
admin/info/modules/ru.md was missing a trailing newline at end of file. No content change.
Core changes:
- admin/info/modules/ru.md:
- Add missing trailing newline (EOF) to last line
- admin/info/admins/ru.md:
- Normalize CRLF line endings to LF
Benefits: - Consistent file endings across all documentation files - Eliminates spurious diff noise in future patches
Technical notes: - Content unchanged; whitespace normalization only
animateSlide previously measured scrollHeight before showing the element, producing zero on hide and an incorrect start height on show. Running simultaneous slide animations on the same element also left orphaned animation state. This commit cancels any in-progress animations before starting a new one, sets the initial height explicitly after the element is visible (triggering a reflow), and switches from ease to linear easing to prevent height overshoot on fast toggles.
Core changes:
- Animation cancellation (plugins/system/slaed.js — animateSlide):
Call element.getAnimations() and cancel all active animations before starting * Prevents stacked/conflicting animations when toggled rapidly
- Height measurement fix:
For show: set height 0px and trigger reflow before reading scrollHeight * Ensures correct endHeight even on first-time display
For hide: capture offsetHeight into style.height before animating * Prevents jump when element has non-auto height
- Easing change:
Switch from 'ease' to 'linear' * Avoids perceived overshoot at end of animation at high durations
Benefits: - Collapse/expand no longer glitches when triggered before previous animation ends - Correct height on all browsers regardless of display timing - Predictable animation feel for UI elements like toggle-form-block
Technical notes: - getAnimations() is supported in all modern browsers; gracefully defaults to [] - No changes to the public HideShow / SlideUp / SlideDown API surface - Opacity keyframe removed from slide animation (only height animates now)
Add new admin UI fragments and extend existing ones to support the flash notification system, collapsible form blocks, HTMX-driven pager links, and a unified module footer. Remove five legacy fragments replaced by the new generic API. Add alerts.js for auto-hiding flash banners. Extend new.css with all new component styles.
Core changes:
- New fragments:
- new/toggle-form-block.html: collapsible labeled form section with optional add-trigger
- new/module-foot.html: module list footer combining pager and bulk-action select
- new/image-preview.html: generic inline image preview by id/src/alt
- rating-like-live.html: HTMX-wired rating widget (rate1_query / rate5_query)
- rating-like.html: static rating widget (no HTMX) for non-admin contexts
- Deleted fragments (replaced by generic API):
- admin-fields-field-block.html → new/toggle-form-block
- admin-ratings-module-block.html → new/toggle-form-block
- admin-referers-search-form.html → new/form subtitle
- admin-replace-field-block.html → new/toggle-form-block
- comment-bulk-actions.html → inline new/div rows
- Updated fragments:
- new/alert.html: add is_flash / alert_attr support; render sl-alert-flash-bar
- new/form.html: add actions_html slot alongside submit_label
- new/pager-link.html: support query/target_id/push_url for HTMX pagination
- new/table.html: add is_wrapless branch that omits basecont wrapper
- pager-link.html: add query/target_id/push_url branch for HTMX
- comment.html: replace date+IP inline text with meta_tip slot; add z-index to actions
- CSS (templates/admin/assets/css/new.css):
- .sl-toggle-form-block and inner grid layout
- .sl-alert-flash / .sl-alert-flash-bar auto-hide animation
- .sl-plus sprite icon for collapsible triggers
- .sl-module-foot layout classes
- .sl-ratings-inner-row and .sl-lang-edit-row column overrides
- Responsive breakpoint for toggle-form-block-item
- Fix .sl-div-actions margin-top (was padding-top)
- JS (templates/admin/assets/js/alerts.js):
- initAdminAlerts(): binds auto-hide timer to [data-sl-autohide] elements
- Runs on DOMContentLoaded and htmx:load for HTMX-injected content
Benefits: - Flash alerts auto-dismiss after 15 s without user interaction - Pager links in admin lists are HTMX-navigable with browser history push - Collapsible form blocks reduce visual noise in fields/ratings/replace modules - Module footer unifies pager + bulk-action placement across all list views
Technical notes: - rating-like-live.html replaces hover_query with separate rate1_query/rate5_query - is_wrapless on new/table renders a bare <table> for use inside other containers - alerts.js must be included in the admin layout after htmx.js - Deleted fragments have no remaining callers after commit 4
Replace all inline token-check error pages with setRedirect flash calls. Migrate table rendering, form widgets, and action menus to the new fragment API (new/table, new/div, new/row-actions, new/select, new/input, new/form, new/toggle-form-block). Drop legacy getTplAdminNavi in favor of getTplAdminTabs across all remaining modules. Affected: admins, blocks, categories, comments, config, database, editor, favorites, fields, groups, lang, messages, modules, monitor, newsletter, privat, ratings, referers, replace, uploads.
Core changes:
- Token-check pattern (all modules):
- Replace full setHead/echo/setFoot guard blocks with $warn = !checkSiteToken()
- Pass flash text and $warn flag to setRedirect() on every POST/GET action
- Use _TOKENMISS (warn) or _SUCC* (success) constants from the new lang set
- Navigation migration (groups, ratings, lang, modules, newsletter, replace, referers):
- Replace getTplAdminNavi with getTplAdminTabs
- Remove getTplAdminTabsSetup and getTplAdminConfSave wrapper calls
- Form widget migration (fields, groups, lang, modules, ratings, newsletter, replace):
- Replace getTplTextInput / getTplSelect / getTplOption with new/input, new/select, new/select-option
- Replace getTplAdminFormRow with new/div rows array
- Replace getTplAdminTableHead / getTplAdminTable / getTplAdminTableRow with new/table, new/table-row, new/table-cells
- Replace getTplAdminActionMenu / getTplLinkAction with new/row-actions items
- fields module:
- Complete rewrite: runtime tab system using getTplAdminTabs is_runtime mode
- Replace admin-fields-field-block with new/toggle-form-block
- Fix field data parsing: use array_pad/explode instead of preg_match
- ratings module:
- Replace admin-ratings-module-block with new/toggle-form-block
- Replace radio_form with getTplRadioGroup for all per-module radio groups
- comments module:
- Add module-filter select with live onchange submit
- Replace comment-bulk-actions fragment with new/div rows + new/select
- Wrap list bottom in new/module-foot fragment
- Extend getTplPager call to filter by modul when selected
- referers module:
- Replace admin-referers-search-form with inline new/form subtitle
- Add token to all action URLs
- replace module:
- Replace admin-replace-field-block with new/toggle-form-block
- Migrate sort select to new/select-option
- favorites / privat modules:
- Use is_wrapless table, getTplPager with HTMX target
- favorites: deletion moved to module (op=delete) with token + confirm dialog
- Misc modules (blocks, categories, database, editor, config, monitor, uploads):
- Align token handling to $warn pattern
- Add _SUCC* flash messages on successful saves
Benefits: - Eliminates ~40 duplicated inline error-page guard blocks - Consistent UX: every action returns a flash notification instead of blank reload - All form and table UI rendered through the new fragment API - Removes dependency on getTplAdminNavi and related legacy helpers
Technical notes: - getTplAdminNavi is now unused across all admin modules - All destructive GET actions include getSiteToken() in the URL - Field data for fields.php now uses 1-based index (field1/field2 instead of field2/field3) - No database schema changes
Introduce a session-based one-shot flash message system and thread it through setRedirect, setFoot, and admin helpers. Extend getTplPager with optional HTMX target/push-url so paginated admin lists become fully AJAX-navigable. Fix token-less delete URLs in getAdminCategoryList and getAdminBlockList, and migrate getAdminFavoriteList/getAdminPrivateList from the legacy getAsyncPager to getTplPager. Remove the standalone deleteAdminFavorite function now that favorites deletion is handled by the refactored favorites module.
Core changes:
- Flash message API (core/system.php):
- Add setFlash(string $text, bool $warn): stores one-time flash in $_SESSION
- Add getFlashHtml(): renders and clears flash on next page load
- Extend setRedirect() with optional $text/$warn params that call setFlash
- Prepend getFlashHtml() to setFoot() admin content buffer
- HTMX pager (core/helpers.php):
- getTplPager() accepts target_id and push_url options
- $link closure passes query/target_id/push_url to new/pager-link when set
- setTplAdminInfoPage() uses flash-style alert for token miss and success save
- Admin helper fixes (core/admin.php):
- getAdminCategoryList delete URL: add op=delete, token, correct param names
- getAdminBlockList: add token to activate and delete action URLs
- Rename table flag disable_sort -> is_wrapless (renamed in template)
- getAdminFavoriteList: migrate to getTplPager, add delete token, decode title
- getAdminPrivateList: migrate to getTplPager, add delete token, decode title
- Remove deleteAdminFavorite() — deletion handled in favorites module directly
- Routing (index.php):
- Remove deleteAdminFavorite case from go=5 HTMX dispatch table
- Comment moderation (core/system.php — ashowcom):
- Update action URLs to new name/op/token scheme (op=edit, op=approve, op=delete)
- Show activate/deactivate label based on current comment status
- Replace inline date/IP rendering with new/title-tip fragment
- Add modul filter support via GET param
- Wrap comment list close tag consistently
- Rating live widget (core/system.php — ratingLikeHover):
- Switch template from rating-like to rating-like-live
- Pass rate1_query and rate5_query instead of hover_query
- Async pager link fix (core/system.php — getAsyncPagerLink):
- Prepend 'index.php?' to non-empty query strings
Benefits: - Eliminates page-reload-based error/success messages in favor of flash toasts - AJAX pager in admin lists no longer requires full-page reload - All destructive action URLs now carry CSRF tokens - Removed dead code (deleteAdminFavorite)
Technical notes: - Flash data stored in $_SESSION['slaed_flash']; cleared after first read - HTMX pager links degrade gracefully to plain hrefs when target_id is absent - is_wrapless replaces disable_sort in new/table.html (same semantic, better name) - Breaking: deleteAdminFavorite op removed from index.php dispatch
Normalize array alignment from padded to compact style, replace the Unicode copyright symbol with the ASCII equivalent in file headers, and update runtime config values (privat anum, referers key order, local fingerprint).
Core changes:
- Config headers (config/comments,favorites,privat,referers,users.php):
- Replace '# Copyright © ...' with '# Copyright (c) ...' for ASCII safety
- Array alignment (config/privat,referers,users.php):
Remove trailing-space alignment padding from array keys * Compact style consistent with other config files in the project
- Runtime values:
- config/privat.php: increase privat anum from 25 to 50
- config/referers.php: reorder refer_t before referb for logical grouping
- config/local.php: update base_fingerprint to current build hash
Benefits: - Eliminates inconsistent array formatting across config files - ASCII copyright is safe in all encodings and editors - Config values reflect current production defaults
Technical notes: - No functional behavior change in the application - Alignment change is whitespace-only, does not affect PHP semantics - base_fingerprint is auto-generated; update is routine
Add six new success-notification constants to all six frontend languages and extend admin-lang files with _SORTORDER and an updated _TOKENMISS. These constants are consumed by the new setRedirect/setFlash API introduced in core/system.php.
Core changes:
- Frontend languages (lang/de,en,fr,pl,ru,uk.php):
Add _SUCCSAVE, _SUCCDELETE, _SUCCCLEAR, _SUCCUPLOAD, _SUCCFILESAVE, _SUCCSTATUS * Six new localized flash-message strings for post-action feedback
- Admin languages (admin/lang/de,en,fr,pl,ru,uk.php):
- Add _SORTORDER constant for sort-order UI label
- Update _TOKENMISS to include a trailing exclamation mark
Benefits: - Enables human-readable flash notifications after every admin action - Keeps all user-facing strings in language files, not hardcoded in PHP - Consistent message set across all six supported locales
Technical notes: - Constants follow existing _SUCC* naming pattern - No behavior change in existing code; new constants extend the set - Admin lang change is non-breaking: only the display text is modified
Replace static op-based tabs in config() with runtime link-based tab navigation using the new links/is_runtime/tabs_id/tabs_sync_selector API in getTplAdminTabs. Simplify info() to a single setTplAdminInfoPage call. Remove inline tabs-panel wrapping from each config section (panel rendering handled by new/tabs-panel in form).
Core changes:
- config() (admin/modules/config.php):
- Build links array with href, rel, is_active, label, title per tab
- Pass is_runtime, tabs_id, tabs_index and tabs_sync_selector to getTplAdminTabs
- Remove individual tabs-panel wrappers around $taba..$tabg sections
- Tabs panel wrapping now provided by the form fragment tabs-panel contract
- info() (admin/modules/config.php):
Replace full inline implementation (tab nav, markdown render, HTMX form) with setTplAdminInfoPage using ops array matching the config tab URL pattern
Benefits: - Config tabs now driven by client-side runtime (data-sl-tabs-init); no page reload - tabs_sync_selector syncs active tab index into hidden input[name=tab] on switch - info() reduced from ~50 lines to a single helper call
Technical notes: - tabs_index initialised from $ctab (validated 0-6); persisted in sessionStorage by tabs.js - info-link tab carries data-sl-tab-info-link for URL sync on tab switch - Removes dependency on full inline info tab render in this module
Reflects the current state of tracked assets after this refactor wave.
Core changes:
- config/local.php:
- Update base_fingerprint to b1eb1cf42212ffc5135e26ff202dc4cf93f7b366
Technical notes: - Local-only config; not part of the distributed base config
Label constants must not contain trailing punctuation; colons are added by the rendering layer (label fragments or form rows).
Core changes:
- admin/lang/*.php (de, en, fr, pl, ru, uk):
- _OGRAPHT: remove trailing ':' from all 6 language files
- _SCHEMAT: remove trailing ':' from all 6 language files
Benefits: - Consistent with all other label constants in the project - Prevents double colon when rendered via label fragment
Technical notes: - Values-only change; keys and structure unchanged





