Последнии сообщения форума
Removes the fixed width from .sl-block-sidebar, trims padding and background gradient from .sl-admin-sidebar, removes margin/padding from .sl-admin-content, and adjusts .sl-admin-content-inner and .sl-toolbar spacing for a cleaner fluid layout.
Core changes:
- Admin sidebar block (theme.css — .sl-block-sidebar):
- Removed width: 275px; block now sizes via its flex/grid parent
- Admin sidebar column (theme.css — .sl-admin-sidebar):
- padding: 13px 11px 15px 11px → 8px 0px
- Removed multi-stop background gradient (now inherits parent bg)
- Admin content area (theme.css — .sl-admin-content):
- Removed margin: 8px 6px 15px 0
- Removed padding: 0 0 15px 0
- Admin content inner (theme.css — .sl-admin-content-inner):
- padding: 0 var(--sl-space-lg) 15px → 0px 0px 0px 8px
- Toolbar (theme.css — .sl-toolbar):
- margin: 0 10px 0 5px → 0 0 0 12px
Benefits: - Sidebar width adapts to container; no overflow on narrow viewports - Content area padding controlled at inner level, not duplicated on outer
Technical notes: - No new CSS classes; all changes are targeted property updates - No HTML structure changes required
Adds filterConst() to the Template compiler pipeline so that {{ _UPPER_SNAKE }} tokens are compiled into defined()-guarded PHP echoes instead of being silently dropped or mishandled by filterEcho(). Documents the new syntax in TEMPLATES.md.
Core changes:
- Template compiler (core/classes/template.php — filterConst()):
- Matches {{ _NAME }} where NAME is UPPER_SNAKE with _ prefix, 1-11 chars
- Compiles to: <?= defined('_NAME') ? $this->getSafe(_NAME) : ''; ?>
- Runs before filterEcho() so constant tokens are consumed first
- Negative lookahead/lookbehind prevents matching {{{ _RAW }}} raw tags
- Docs (docs/TEMPLATES.md):
- Added one-line entry for {{ _CONST }} syntax under the runtime features list
Benefits: - Language constants can be used directly in .html fragment files - Compiled output is cache-safe: defined() checked at render time, not compile time - No change to existing {{ var }} or {{{ raw }}} behavior
Technical notes: - Regex: /(?<!\{)\{\{\s([A-Z][A-Z0-9]{0,10})\s\}\}(?!\})/ - getSafe() HTML-escapes the constant value before output - filterConst() is inserted before filterEcho() in the compile() pipeline
Adds getStatExtPanel() which reads fields 8-16 from the statistic log, aggregates them across all rows of the selected archive or current period, and renders an inline dashboard with ring charts, bar charts, and an hourly hit chart. Panel is appended after the existing statistic table.
Core changes:
- getStatExtPanel() (admin/modules/statistic.php):
- Reads days.log + statistic.log (current) or an archive file
Aggregates counter fields 8-12, 14-16 via getCounterField() and sums the 24-slot hours field (index 13)
Ring charts (SVG): Human Traffic %, Mobile Share %, Return Depth %, Search Share % — 4-up grid, responsive 2-col on narrow viewports
Bar charts (2-col grid): Browsers, OS, Devices, Countries, Refcat, New/Returning, Depth, Duration — sorted by count, preserves order where a canonical key order is specified (Devices, Refcat, etc.)
- Hourly hits bar chart (SVG, 24 bars, x-axis labels every 3 hours)
- Falls back to a plain "not available" notice when field 8 is absent
- statistic() (admin/modules/statistic.php):
- Added echo getStatExtPanel($file) after the existing statistic table
Benefits: - One-screen overview of browser/device/geo/session metrics per period - No extra DB queries; reads the same log files as the existing counter - Inline <style> scoped to sl-statx-* classes; no theme.css modifications needed
Technical notes: - Ring chart: uses SVG stroke-dashoffset on a r=38 circle (circumference 238.76) - Bar chart labels truncated at 120px via CSS text-overflow - getStatExtPanel() uses CSS custom properties from the admin theme (--bg, --line, --shadow, --soft, --muted, --blue2, --green, --purple, --orange)
Extends updateStatsTrack() to collect per-hit UA breakdowns, GeoIP country, referral category, hourly distribution, and sliding session state (new/returning, depth, duration). All new data is written as additional pipe-separated fields (indices 8-16) appended to the existing statistic.log line format.
Core changes:
- UA parser (core/system.php — getAgentInfo()):
Detects browser (Chrome, Firefox, Edge, Opera, Safari, IE), OS (Windows, Android, iOS, macOS, Linux), and device (desktop, mobile, tablet, bot)
- Bot detection via UA regex; guest===1 always maps to Bot
- Counter field helpers (core/system.php):
- getCounterField(): parses "key:count,key:count" field into a map
- updateCounterField(): increments a key, keeps top-10 + Other overflow bucket
- Hourly distribution (core/system.php — updateHoursField()):
- Maintains a 24-slot comma-separated hit count per hour
- Session tracking (core/system.php — updateSessionState()):
- File-based sliding window (1800s) keyed by stats_id cookie
- Tracks first-visit, last-visit, hit depth per session
- Returns is_new, depth, duration for the current hit
- Bucket classifiers (core/system.php):
- getSessionDepthBucket(): maps depth to 1 / 2-3 / 4-7 / 8+
- getSessionDurationBucket(): maps seconds to <30s / 30s-3m / 3m-15m / 15m+
- Referral category (core/system.php — getRefCategory()):
- Classifies referer into direct, search, social, or referrer
- updateStatsTrack() extended (core/system.php):
- Gathers agent info, refcat, GeoIP country, session state before write
- Sets fields [8..16] on the statistic.log line in all three write paths
Benefits: - Rich per-day analytics available without changing the core log file structure - Session tracking uses httponly cookie with 1-year TTL, no DB required - All new fields are backward-compatible (absent = treated as empty)
Technical notes: - stats_id cookie set via setcookie() only when headers not yet sent - Fields 8-16 extend the existing 0-7 statistic.log schema non-destructively - Geoip::getCountry() used only if the Geoip class exists (class_exists check)
Adds four standalone HTML demo files to docs/ for the statistics subsystem: a browser analysis demo, a monitor dashboard, and two etalon/reference variants. These files are design references and are not loaded by the CMS at runtime.
Core changes:
- Demo files (docs/):
- statistic-browser-analysis-demo.html — browser/UA analysis visualization
- statistic-monitor-dashboard.html — statistics monitor dashboard layout
- statistic-monitor-etalon-demo.html — etalon reference demo
- statistic-monitor-etalon-v2.html — etalon reference v2
Benefits: - Design references available alongside the codebase for review - No runtime impact; files are not referenced from any CMS module
Technical notes: - Standalone HTML; no CMS dependencies or includes - Located in docs/ which is not served by the web root
Addresses several targeted CSS issues in the admin theme: tightens the tooltip child selector to avoid unintended matches, revises sidebar count badge styling, moves IP/flag rules outside the table context, and replaces the language-link hover background with a filter-based approach.
Core changes:
- Tooltip selector fix (theme.css):
.sl-tip div → .sl-tip > div (and ::after variant) Prevents deep descendant divs inside tooltip content from receiving position:absolute, which broke nested markup
- Sidebar count badge (theme.css):
- Count label link color: warning-strong conditional → always primary
- Removed has([data-sl-toggle-control]) color overrides on anchor
Count value span: added explicit bg-subtle background and border-strong border instead of inheriting from the danger/warning context
- Danger badge: removed background fill; uses border-strong + warning-strong text
- .sl-menu-list-image: border removed for sl_block_1 and sl_block_2 sidebar blocks
- IP / flag layout (theme.css):
Removed .sl-table-list-sort parent scope from .sl-col-ip, .sl-geo-flag, .sl-geo-flag img, .sl-col-ip a — rules now apply globally
- .sl-geo-flag: added justify-content: center
- IP link min-height and line-height: 16px → 24px (matches flag image height)
- Menu grid link (theme.css):
- Default state: removed background: bg-soft (now transparent/inherited)
- Hover: bg changed from primary-tint to bg-soft
- Language hover (theme.css):
- Removed background-color hover on .sl-admin-language-link
- Added filter: brightness(1.08) on hover for subtle brightness effect
- Set explicit background: transparent on both states
- Sort table tbody th padding (theme.css):
- Added rules for tbody th padding to match td spacing in .sl-table-list-sort
Benefits: - Tooltip no longer bleeds position styles into nested content - Sidebar badges visually consistent regardless of warning/normal state - Flag + IP link correctly aligned outside table-only context
Technical notes: - All changes are additive CSS tweaks; no HTML structure changes - No new CSS class names introduced
Replaces raw content_html strings and ad-hoc row_attr usage in the database admin table with the typed column flags already used across other admin tables. Adds is_summary and is_no_sort flags to the table-cells and table-row fragments.
Core changes:
- Admin database module (admin/modules/database.php):
Data rows: all cells now carry typed flags (is_col_id, is_col_count, is_col_date, is_col_actions) and use has_content_text/content_text where HTML escaping is safe
Summary row: replaced bold span content_html cells with typed cells; uses is_summary to render <th> instead of <td>
- Summary row: replaced raw row_attr='data-sort-method="none"' with is_no_sort
- Table head: all columns carry typed flags; removed is_fixed from table call
- Table cells fragment (templates/admin/fragments/table-cells.html):
Added is_summary branch: when true renders <th> elements instead of <td> for the summary/totals row, preserving all class and attribute logic
- Table row fragment (templates/admin/fragments/table-row.html):
- Added is_no_sort: when true emits data-sort-method="none" on the <tr>
- Removed support for raw row_attr (no longer needed after this migration)
Benefits: - Summary row styled as <th> for semantic correctness and proper sort exclusion - Column widths controlled by CSS class flags, not fixed table layout - Consistent with other admin tables; no more ad-hoc row_attr strings
Technical notes: - is_fixed removed from database table; column sizing now via CSS col-* classes - is_summary and is_no_sort are additive fragment flags; no other tables affected
Adds the missing getUserSessionAdminInfo case to the go=5 AJAX dispatcher in index.php and updates the update_query in getUserSessionAdminInfo() to include the correct go value and a CSRF token, preventing open-endpoint access.
Core changes:
- AJAX dispatcher (index.php):
- Added case 'getUserSessionAdminInfo': getUserSessionAdminInfo() to go=5 block
- Admin session info (core/system.php):
update_query changed from 'go=1&op=getUserSessionAdminInfo' to 'go=5&op=getUserSessionAdminInfo&token='.getSiteToken()
Benefits: - AJAX endpoint is CSRF-protected via token parameter - Route correctly uses the go=5 admin-AJAX block instead of go=1
Technical notes: - getSiteToken() generates the per-session CSRF token used project-wide - No change to the HTML output or polling behavior
Adds the GeoLite2 Country and ASN binary database files to storage/geoip/. These files are read directly by the pure-PHP MMDB parser in core/classes/geoip.php.
Core changes:
- Country database (storage/geoip/country.mmdb):
- GeoLite2-Country MMDB, ~8.9 MB
- ASN database (storage/geoip/asn.mmdb):
- GeoLite2-ASN MMDB, ~12 MB
Benefits: - GeoIP lookups work out of the box without a separate download step - Both country and ASN resolution available immediately after clone
Technical notes: - Files are binary MMDB format, read via file_get_contents() and cached - Web access blocked by storage/geoip/.htaccess (deny from all) - Database files should be updated periodically from maxmind.com
Updates the two directory protection files in storage/geoip/ to remove trailing newlines and condense index.html to a single-line redirect. Deletes templates/admin/images/misc/sprite.png which is no longer referenced.
Core changes:
- Storage protection (storage/geoip/.htaccess):
- Removed trailing newline (content unchanged: deny from all)
- Storage index (storage/geoip/index.html):
- Condensed to single-line HTML with meta-refresh redirect to slaed.net
- Removed multi-line doctype/head/body boilerplate
- Admin image cleanup (templates/admin/images/misc/sprite.png):
- Deleted; file is no longer used after icon migration to SVG/Bootstrap-Icons
Benefits: - Consistent with project-wide one-liner protection file convention - Removes orphaned binary asset from admin theme
Technical notes: - No functional changes to directory access control - sprite.png was the last remaining PNG in templates/admin/images/misc/





