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

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

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

Всего: 1045 Доступных коммитов | Отфильтровано: 1045 Коммиты | Страница: 59 / 105
31.03.2026
Refactor: use shared UI helpers for form labels and notes
Автор: Eduard Laas | Дата: 10:42 31.03.2026

Replace inline HTML <div> strings with standardized UI helper functions (getTplAdminHintLabel, getTplAdminSmallNote) in the blocks, configuration, and account modules to ensure consistent styling and encapsulation.

Core changes:

  1. Blocks management (admin/modules/blocks.php):
  2. Use getTplAdminSmallNote for RSS lines information row
  3. Configuration (admin/modules/config.php):
  4. Replace inline <div> hints with getTplAdminHintLabel for captcha, SEO, and graph settings to maintain visual consistency

  5. User accounts (modules/account/admin/index.php):
  6. Update the mail password text panel to use the admin-admins-mail-panel fragment

Benefits:

  • Consistent presentation of hints and small notes across admin forms
  • Cleaner module templates that focus on structure rather than inline HTML
  • Improved maintainability through encapsulated presentation logic

Technical notes:

  • Uses helpers defined in core/helpers.php
  • Fragments are loaded via the standard getHtmlFrag() method
  • Backward compatible: visual output remains consistent with the previous implementation
Refactor: replace inline implode error joins with getStopText()
Автор: Eduard Laas | Дата: 10:41 31.03.2026

Unify error message rendering across various admin modules by replacing inline implode('<br>', ...) with the shared getStopText() helper. Ensures consistent handling of empty error array entries and line breaks.

Core changes:

  1. Admin modules (modules/*/admin/index.php):
  2. Replace inline implode('<br>', \) with getStopText((array)\)
  3. Affected modules: auto_links, clients, files, help, jokes, links, media, money, news, order, pages, shop

Benefits:

  • Centralized logic for formatting error messages
  • Improved code readability across multiple modules
  • Consistent UI presentation for warnings and error alerts

Technical notes:

  • getStopText is a core helper from core/helpers.php
  • (array) cast added for safety where \ variable might be null or scalar
  • No functional change to the rendered HTML output
Feature: add admin HTML fragments for associated-news table
Автор: Eduard Laas | Дата: 10:39 31.03.2026

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:

  1. Associated news table wrapper (admin-news-asso-table.html):
  2. Renders an sl_form table element with {{{ rows_html }}} slot

    • rows_html is populated by iterating admin-news-asso-cell fragments
  3. Associated news cell (admin-news-asso-cell.html):
  4. 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

--------------------------------------------------------------------

Refactor: replace inline implode error joins with getStopText()
Автор: Eduard Laas | Дата: 10:38 31.03.2026

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:

  1. Admin admins module (admin/modules/admins.php):
  2. Remove local getAdmintext(array \) function (replaced by getStopText)
  3. Replace getAdmintext(\) call with getStopText(\) in add()
  4. Whois admin module (modules/whois/admin/index.php):
  5. Replace inline implode('<br>', \) with getStopText((array)\)
  6. Private messages (core/user.php):
  7. 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

--------------------------------------------------------------------

Refactor: add shared admin template helper functions to core/helpers.php
Автор: Eduard Laas | Дата: 10:38 31.03.2026

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:

  1. New UI helper functions (core/helpers.php):
  2. getTplAdminSmallNote(text): standalone sl_small note div for label-less form rows
  3. getStopText(stop): joins non-empty error/stop messages with <br> separators
  4. getTplAdminTextLink(href, label, ...): safe anchor tag for use inside raw HTML slots
  5. getTplAdminTipLine(key, val): one key-value line for tooltip content_html strings
  6. getTplAdminInfoLine(label, value): one label-value line for info block content
  7. getTplAdminTableHead(cols): builds <th> head_html from column label arrays
  8. getTplAdminTableCells(cells): builds <td> cells_html from pre-rendered cell content array
  9. getTplSpan(class, raw_content, title): inline span with CSS class and optional title
  10. 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

--------------------------------------------------------------------

30.03.2026
Docs: fix Status badge URL encoding in README
Автор: Eduard Laas | Дата: 23:31 30.03.2026

Same %20 space-encoding issue as the Migration badge. Replaced %20 with _ for consistency and reliable rendering on GitHub.

Core changes:

  1. Badge URL (README.md):
  2. Replace %20 with _ in Status badge URL

Technical notes:

  • shields.io treats _ as space in path-based badge URLs
Docs: fix Migration badge URL encoding in README
Автор: Eduard Laas | Дата: 23:28 30.03.2026

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:

  1. Badge URL (README.md):
  2. 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
Chore: update docs, tests, lang constants, robots.txt and replace BxSlider with vanilla JS
Автор: Eduard Laas | Дата: 23:21 30.03.2026

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:

  1. JS vanilla migration (templates/lite/assets/js/lib.js):
  2. Replaced jQuery BxSlider slider init with standalone vanilla carousel/slider implementation
  3. No jQuery dependency remaining in lib.js
  4. Language constants (admin/lang/*.php - all 6 locales):
  5. Added _EROBSTD (robots.txt standard label) and _ESAVED (file saved confirmation)
  6. Test suite (tests/):
  7. PhpFileFormatTest.php: expanded PHP file format checks
  8. TemplateValidationTest.php: added testSharedFrontendFragmentsStayInSyncAcrossThemes
  9. Added tests/TextFileEncodingTest.php: new encoding validation for all text files
  10. Documentation (docs/, README.md):
  11. docs/RAW_SLOTS_ADMIN.md: updated raw slot usage reference for admin templates
  12. docs/TEMPLATES.md: updated template system documentation
  13. docs/TEMPLATE_STATUS.md: updated migration status
  14. docs/TESTS.md: added test run reference
  15. README.md: updated migration progress badge (85% -> 90%), removed jQuery from stack list
  16. Infrastructure:
  17. robots.txt: added Disallow for /setup/, /setup.php, /storage/; added Sitemap directive
  18. 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
Templates: add new admin and frontend fragments across default, lite, simple themes
Автор: Eduard Laas | Дата: 23:20 30.03.2026

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:

  1. Admin fragments (templates//fragments/admin-.html):
  2. Added admin-box, admin-form, admin-form-row, admin-form-wide, admin-table, admin-table-row
  3. Added admin-text-input, admin-textarea, admin-number-input, admin-email-input, admin-url-input
  4. Added admin-select, admin-select-option, admin-hidden-input, admin-color-label
  5. Added admin-image-preview, admin-hr-line, admin-info-box, admin-placeholder-box
  6. Added admin-rows-table, admin-tab-content, admin-tabs-setup
  7. Added to all three frontend themes: default, lite, simple
  8. Frontend fragments (templates/simple/fragments/):
  9. Added account-, assoc-, basic-, block-, forum-, liste-, login-, shop-, voting-, users-, messagebox, navi, privat-message
  10. Added to templates/default/fragments/ and templates/lite/fragments/ where missing
  11. Layouts and partials:
  12. Added templates/lite/layouts/main.html, templates/lite/pages/error.html
  13. Added templates/lite/partials/alerts.html, login-logged.html, login-without.html
  14. Added templates/simple/layouts/main.html
  15. Added templates/simple/partials/contact-block.html, forum-teaser.html, menu.html
  16. Added templates/default/partials/contact-block.html, forum-teaser.html
  17. Modified existing fragments:
  18. templates/*/fragments/account-view.html: updated slot names to match new helper output
  19. templates/*/fragments/shop-client-row.html: updated slot names
  20. 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
Refactor: rename admin template helpers to getTpl* prefix across all call sites
Автор: Eduard Laas | Дата: 23:20 30.03.2026

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:

  1. Helper definitions (core/helpers.php, core/admin.php):
  2. Renamed getAdminTable -> getTplAdminTable, getAdminTableRow -> getTplAdminTableRow
  3. Renamed getAdminForm -> getTplAdminForm, getAdminFormRow -> getTplAdminFormRow
  4. Renamed getAdminFormWide -> getTplAdminFormWide, getAdminBox -> getTplBox
  5. Renamed getAdminTextInput -> getTplTextInput, getAdminSelect -> getTplSelect
  6. Renamed getAdminHidden -> getTplHiddenInput, getAdminOption -> getTplOption
  7. Renamed getAdminHintLabel -> getTplAdminHintLabel, getAdminPlaceholderBox -> getTplAdminPlaceholder
  8. Renamed getCategoriesSearch -> getTplAdminCatSearch, getCategoryImageSelect -> getTplCategorySelect
  9. Renamed getCategoryImgPreview -> getTplCategoryPreview, getCatPermRow -> getTplCatPermRow
  10. Renamed getAdminTabName -> getTplAdminTabName, getAdminTabsSetup -> getTplAdminTabsSetup
  11. Renamed getBlockViewGrid -> getTplAdminBlockGrid, getBlockRefreshSelect -> getTplBlockRefresh
  12. Renamed getBlockActionSelect -> getTplBlockAction
  13. core/admin.php: extracted canonical implementations to helpers.php; wrappers remain for backward compat
  14. core/classes/template.php: added dev-mode template error reporting and debug comments
  15. Call site migration (admin/modules/.php, modules//.php, blocks/*.php, core/user.php):
  16. Updated all 88 call sites to use new getTpl* names
  17. 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

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

1 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 105
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

Поделиться
QR-код