Журнал изменений

Фильтр и поиск

Всего: 899 Доступных коммитов | Отфильтровано: 899 Коммиты | Страница: 13 / 90
13.05.2026
Feature: extended statistics tracking — browser, OS, device, country, session
Автор: Eduard Laas | Дата: 15:29 13.05.2026

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:

  1. UA parser (core/system.php — getAgentInfo()):
  2. Detects browser (Chrome, Firefox, Edge, Opera, Safari, IE), OS (Windows, Android, iOS, macOS, Linux), and device (desktop, mobile, tablet, bot)

  3. Bot detection via UA regex; guest===1 always maps to Bot
  4. Counter field helpers (core/system.php):
  5. getCounterField(): parses "key:count,key:count" field into a map
  6. updateCounterField(): increments a key, keeps top-10 + Other overflow bucket
  7. Hourly distribution (core/system.php — updateHoursField()):
  8. Maintains a 24-slot comma-separated hit count per hour
  9. Session tracking (core/system.php — updateSessionState()):
  10. File-based sliding window (1800s) keyed by stats_id cookie
  11. Tracks first-visit, last-visit, hit depth per session
  12. Returns is_new, depth, duration for the current hit
  13. Bucket classifiers (core/system.php):
  14. getSessionDepthBucket(): maps depth to 1 / 2-3 / 4-7 / 8+
  15. getSessionDurationBucket(): maps seconds to <30s / 30s-3m / 3m-15m / 15m+
  16. Referral category (core/system.php — getRefCategory()):
  17. Classifies referer into direct, search, social, or referrer
  18. updateStatsTrack() extended (core/system.php):
  19. Gathers agent info, refcat, GeoIP country, session state before write
  20. 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)
12.05.2026
Docs: add statistic monitor and browser analysis demo files
Автор: Eduard Laas | Дата: 15:34 12.05.2026

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:

  1. Demo files (docs/):
  2. statistic-browser-analysis-demo.html — browser/UA analysis visualization
  3. statistic-monitor-dashboard.html — statistics monitor dashboard layout
  4. statistic-monitor-etalon-demo.html — etalon reference demo
  5. 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
Style: CSS fixes — tooltip selector, sidebar badges, IP/flag layout, language hover
Автор: Eduard Laas | Дата: 15:34 12.05.2026

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:

  1. Tooltip selector fix (theme.css):
  2. .sl-tip div → .sl-tip > div (and ::after variant) Prevents deep descendant divs inside tooltip content from receiving position:absolute, which broke nested markup

  3. Sidebar count badge (theme.css):
  4. Count label link color: warning-strong conditional → always primary
  5. Removed has([data-sl-toggle-control]) color overrides on anchor
  6. Count value span: added explicit bg-subtle background and border-strong border instead of inheriting from the danger/warning context

  7. Danger badge: removed background fill; uses border-strong + warning-strong text
  8. .sl-menu-list-image: border removed for sl_block_1 and sl_block_2 sidebar blocks
  9. IP / flag layout (theme.css):
  10. 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

  11. .sl-geo-flag: added justify-content: center
  12. IP link min-height and line-height: 16px → 24px (matches flag image height)
  13. Menu grid link (theme.css):
  14. Default state: removed background: bg-soft (now transparent/inherited)
  15. Hover: bg changed from primary-tint to bg-soft
  16. Language hover (theme.css):
  17. Removed background-color hover on .sl-admin-language-link
  18. Added filter: brightness(1.08) on hover for subtle brightness effect
  19. Set explicit background: transparent on both states
  20. Sort table tbody th padding (theme.css):
  21. 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
Refactor: database table — typed column flags, summary <th> row, is_no_sort attribute
Автор: Eduard Laas | Дата: 15:34 12.05.2026

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:

  1. Admin database module (admin/modules/database.php):
  2. 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

  3. Summary row: replaced bold span content_html cells with typed cells; uses is_summary to render <th> instead of <td>

  4. Summary row: replaced raw row_attr='data-sort-method="none"' with is_no_sort
  5. Table head: all columns carry typed flags; removed is_fixed from table call
  6. Table cells fragment (templates/admin/fragments/table-cells.html):
  7. Added is_summary branch: when true renders <th> elements instead of <td> for the summary/totals row, preserving all class and attribute logic

  8. Table row fragment (templates/admin/fragments/table-row.html):
  9. Added is_no_sort: when true emits data-sort-method="none" on the <tr>
  10. 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
Fix: register getUserSessionAdminInfo AJAX route with CSRF token
Автор: Eduard Laas | Дата: 15:34 12.05.2026

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:

  1. AJAX dispatcher (index.php):
  2. Added case 'getUserSessionAdminInfo': getUserSessionAdminInfo() to go=5 block
  3. Admin session info (core/system.php):
  4. 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
Chore: add MaxMind GeoIP2 Lite database files
Автор: Eduard Laas | Дата: 10:29 12.05.2026

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:

  1. Country database (storage/geoip/country.mmdb):
  2. GeoLite2-Country MMDB, ~8.9 MB
  3. ASN database (storage/geoip/asn.mmdb):
  4. 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
Chore: simplify geoip storage protection files; delete legacy sprite.png
Автор: Eduard Laas | Дата: 10:29 12.05.2026

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:

  1. Storage protection (storage/geoip/.htaccess):
  2. Removed trailing newline (content unchanged: deny from all)
  3. Storage index (storage/geoip/index.html):
  4. Condensed to single-line HTML with meta-refresh redirect to slaed.net
  5. Removed multi-line doctype/head/body boilerplate
  6. Admin image cleanup (templates/admin/images/misc/sprite.png):
  7. 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/
Refactor: replace user_geo_ip() with Geoip class methods throughout codebase
Автор: Eduard Laas | Дата: 10:29 12.05.2026

Removes the legacy user_geo_ip() function from core/system.php and replaces all call sites across admin modules, frontend modules, and core files with the typed Geoip class methods (getIpHtml, getFlagHtml, getCountry, getInfo). Also removes the now-redundant getGeoipInfo() and getGeoipCountry() wrappers.

Core changes:

  1. System core (core/system.php):
  2. Removed user_geo_ip() function (flag + IP link rendering with legacy $id param)
  3. Removed getGeoipInfo() and getGeoipCountry() thin wrapper functions
  4. getUserSessionInfo(): replaced user_geo_ip($host, 3) with Geoip::getFlagHtml()

    • 2 call sites updated (registered user, bot)
  5. getUserSessionAdminInfo(): replaced 5 call sites with Geoip::getFlagHtml()
  6. ashowcom(): replaced user_geo_ip($com_host, 4) with Geoip::getIpHtml()
  7. Core user (core/user.php):
  8. getPrivateMessageView(): user_geo_ip($ip_sender, 4) → Geoip::getIpHtml()
  9. Frontend entry (index.php):
  10. Language auto-detection: replaced user_geo_ip(getIp(), 2) with Geoip::getCountry() using ISO 2-letter code lookup table

    • Removed string-matching against country names
    • Added compact array map: ['GB'=>'en','US'=>'en','CA'=>'en','AU'=>'en',
'FR'=>'fr','DE'=>'de','PL'=>'pl','RU'=>'ru','UA'=>'uk']
  1. Admin modules (comments, security, config):
  2. comments.php: 2 call sites → Geoip::getIpHtml()
  3. security.php: 1 call site → Geoip::getIpHtml()
  4. config.php: getGeoipRows() calls Geoip::getInfo() directly
  5. Frontend/admin modules (13 files):
  6. account/admin/index.php, account/index.php, auto_links/admin/index.php, faq/admin/index.php, files/admin/index.php, forum/index.php, help/admin/index.php, jokes/admin/index.php, links/admin/index.php, media/admin/index.php, money/admin/index.php, news/admin/index.php, order/admin/index.php, pages/admin/index.php, users/index.php, whois/admin/index.php

  7. All user_geo_ip($ip, 4) → Geoip::getIpHtml($ip)
  8. account/index.php: user_geo_ip($ip, 2) → Geoip::getInfo() with country_name

Benefits:

  • user_geo_ip() fully removed; all IP display goes through the Geoip class
  • ISO code-based language detection is cleaner and extensible
  • No functional regression: output HTML shape unchanged

Technical notes:

  • user_geo_ip() $id param modes (1=ip, 2=country_name, 3=flag, 4=flag+link) replaced by explicit Geoip method names

  • getip() renamed to getIp() in index.php call (case correction)
  • All replacements are one-to-one; no logic change in surrounding code
Refactor: migrate GeoIP config from geoip.php to flat geoip_* keys in global.php
Автор: Eduard Laas | Дата: 10:29 12.05.2026

Removes the separate config/geoip.php file and merges GeoIP settings directly into config/global.php as flat top-level keys (geoip_anon, geoip_asn, geoip_cache, geoip_country, geoip_enabled, geoip_store, geoip_test). Aligns config schema with the Geoip class refactor.

Core changes:

  1. Config migration (config/global.php):
  2. Removed legacy geo_ip key
  3. Added flat geoip_* keys replacing nested geoip.php structure
  4. Config deletion (config/geoip.php):
  5. File removed; settings now live in global.php
  6. Config fingerprint (config/local.php):
  7. Updated base_fingerprint after schema change
  8. Admin config panel (admin/modules/config.php):
  9. getGeoipPanel(): reads $conf['geoip_*'] flat keys instead of $conf['geoip'][...]
  10. getGeoipRows(): calls Geoip::getInfo() directly; removed getGeoipInfo() wrapper
  11. Removed checkPerms(CONFIG_DIR.'/geoip.php') call from panel output
  12. save(): GeoIP settings now written into global.php via existing setConfigFile()
  13. Removed separate setConfigFile('geoip.php', ...) block
  14. Redirect simplified: testip param removed from redirect; test IP persisted in geoip_test key of global.php instead

Benefits:

  • Single config file for all settings; no extra file to manage
  • Consistent with existing global.php admin save pattern

Technical notes:

  • Old geo_ip boolean key removed; replaced by geoip_enabled int key
  • setConfigFile('geoip.php') call and geoip.php file both eliminated
  • No URL or DB schema changes
Refactor: rewrite Geoip as standalone pure-PHP MMDB reader; drop geoip2 library
Автор: Eduard Laas | Дата: 10:29 12.05.2026

Removes the geoip2/geoip2 Composer dependency and replaces the MaxMind PHP SDK reader with a self-contained pure-PHP MMDB binary parser inside the Geoip class. All lookup results and public API shape remain unchanged.

Core changes:

  1. Geoip class (core/classes/geoip.php):
  2. Removed getReader() which required GeoIp2\Database\Reader
  3. Added getMmdb(): loads and caches the raw MMDB binary payload + metadata
  4. Added getRecord(): walks the radix search tree to locate a data record
  5. Added getMmdbNode(), getMmdbDecode(), getMmdbValue(), getMmdbSize(), getMmdbPointer(), getMmdbUint(): pure-PHP MMDB binary format decoder

  6. Extracted getCountryData() and getAsnData() private helpers with own caches
  7. Config keys changed from nested $conf['geoip'][...] to flat $conf['geoip_*']
  8. Added getFlagHtml(): returns flag <span> HTML for a given IP
  9. Added getIpHtml(): returns flag + IP link HTML for admin display
  10. getCountry(): now calls getCountryData() directly; avoids full getInfo() cost
  11. Composer (composer.json):
  12. Removed geoip2/geoip2 ^3.1 requirement

Benefits:

  • Zero external runtime dependency for GeoIP lookups
  • Database files read with file_get_contents() and cached in static property
  • Fully self-contained; works without Composer autoload for GeoIP

Technical notes:

  • Supports MMDB record sizes 24, 28, and 32 bits
  • IPv4-in-IPv6 mapping handled via 96-bit prefix traversal
  • Backward compatible: getInfo(), getCountry(), getEmpty(), getFileInfo() unchanged

Всего: 899 на 90 страницах по 10 на каждой странице

1 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 90

Хотите опробовать SLAED CMS в действии?

Идеи и предложения
Обратная связь