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

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

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

Всего: 1045 Доступных коммитов | Отфильтровано: 1045 Коммиты | Страница: 61 / 105
26.03.2026
Refactor: unify theme asset structure and fix CSS image path resolution
Автор: Eduard Laas | Дата: 11:03 26.03.2026

Moves all theme CSS/JS files from theme root and legacy js/ directories into a consistent assets/css/ and assets/js/ layout across all themes, and fixes broken image URL references caused by the deeper file location.

Core changes:

  1. Theme asset structure (templates/admin, default, lite, simple):
  2. Move CSS files from theme root into assets/css/
  3. Move JS files from js/ into assets/js/
  4. Move fonts into assets/css/fonts/
  5. Remove old root-level and js/ directories
  6. CSS image path fix (all theme CSS files):
  7. Replace url(images/) with url(../../images/) to correctly resolve paths relative to new assets/css/ location

  8. doCss() path resolver (core/system.php):
  9. Replace str_replace('../', '') + naive prefix with proper relative path resolution that correctly handles ../ navigation

  10. Layout hardcoded script tags (all themes admin.html, lite home.html):
  11. Remove redundant hardcoded script tags; files are now auto-loaded via getThemeAssets()

  12. modules/shop/index.php:
  13. Update theme.css existence check to assets/css/theme.css
Feature: add smart asset injection and shortname syntax to Template engine
Автор: Eduard Laas | Дата: 09:37 26.03.2026

Introduces automatic CSS/JS loading for partials and components, shortname resolution for include and component tags, and a restructured asset pipeline in doCss/doScript with vendor subdirectory support.

Core changes:

  1. Asset injection system (core/classes/template.php):
  2. Add $assets property collecting CSS/JS per render pass

    • Reset at start of getHtmlPage(), getHtmlPart(), getHtmlFrag()
    • Reset in finally block of getPageHtml()
  3. Add addAssetPath(): registers companion .css/.js files at runtime
  4. Add getAssetMarkup(): renders collected tags for standalone output
  5. Add mergePageAssets(): injects assets into links/scripts data for layouts
  6. Fix evaluation order bug in fallback render path (line 75)
  7. Shortname syntax (core/classes/template.php):
  8. include and component tags now accept bare names without path or extension

    • 'header' auto-resolves to 'partials/header.html'
    • 'modal' auto-resolves to 'partials/modal.html'
  9. Asset pipeline (core/system.php):
  10. Add getAssetFiles(): resolves config entries as files or directories
  11. getThemeAssets(): scan vendor subdirectories two levels deep; deduplicate
  12. doCss(): delegate file resolution to getAssetFiles() + getThemeAssets()
  13. doScript(): same restructure as doCss
  14. Documentation (docs/, CONTRIBUTING.md, UPGRADING.md, admin/info/template/ru.md):
  15. Document shortname syntax, smart asset loading and component/slot support
  16. Update test list and runtime feature status

Benefits:

  • Assets are collected centrally and injected into <head> via layout data
  • No duplicate <link>/<script> tags regardless of how many times a partial is used
  • Zero runtime I/O overhead: file existence checked only at addAssetPath call
  • Vendor CSS/JS under assets/vendor/<lib>/<type>/ now auto-loaded

Technical notes:

  • Asset deduplication uses href/src as array key
  • Cache hash reverted to theme + path + mtime only (CSS/JS checked at runtime)
  • Shortname expansion applies only when path has no slash and no .html suffix
25.03.2026
Update Phoenix Template Engine docs and adjust cache paths & regex
Автор: Eduard Laas | Дата: 15:29 25.03.2026
Docs: update Phoenix Template Engine developer documentation
Автор: Eduard Laas | Дата: 10:19 25.03.2026

Revise the template admin guide to reflect the current architecture: component/slot syntax, corrected cache path, removal of legacy layout tags, and clarified fragment/partials directory roles.

Core changes:

  1. Architecture section (admin/info/template/ru.md):
  2. Rename title to "Phoenix Template Engine" to match class identity
  3. Clarify layouts/partials/fragments roles with updated descriptions
  4. Note cache dir: storage/cache/templates/<theme>/
  5. State that legacy layouts and {%MODULE%}-style tags are removed

Benefits:

  • Documentation matches the implemented template system
  • Developers get accurate directory and directive references

Technical notes:

  • Russian-language documentation file, no code changes
Test: align test suite with fragment variable API changes
Автор: Eduard Laas | Дата: 10:19 25.03.2026

Update tests to reflect renamed template variables in partials/preview.html and the new required fragment path convention for frontend themes.

Core changes:

  1. Variable name update (tests/Unit/AdminPreviewBridgeFlowTest.php):
  2. Replace fields/fields1/fields2/fields3 with title_html/body_a/body_b/body_c in all three test scenarios (direct render, missing theme, bridge flow)

  3. Required fragment path update (tests/TemplateValidationTest.php):
  4. Change required template check from basic.html/title.html to fragments/basic.html/fragments/title.html for frontend themes

Benefits:

  • Tests reflect the actual template variable contract
  • Fragment path validation aligned with new theme structure

Technical notes:

  • No test logic changed, only variable names and path strings updated
  • All three AdminPreviewBridgeFlow scenarios updated consistently
Refactor: replace inline HTML with fragment-based rendering functions
Автор: Eduard Laas | Дата: 10:19 25.03.2026

Extract all inline HTML string construction from system.php and admin.php into dedicated template fragment helper functions, backed by per-theme atomic fragment HTML files. Legacy standalone templates deleted; new fragment files added for all four themes (admin, default, lite, simple).

Core changes:

  1. Fragment rendering functions (core/system.php):
  2. Replace inline foot/category/pager HTML with renderFootControls(), categoryIconLink(), categoryTitleLink(), categoryIconText(), categoryTitleText(), categoryTextLink(), categorySubItem(), categoryRow(), pagerLink(), pagerCurrent()

  3. Add head_html, blocks_left, blocks_right, blocks_down to adminvars
  4. Admin UI fragment functions (core/admin.php):
  5. Replace inline tab list/link HTML with adminTabListOpen(), adminTabListClose(), adminTabLink()

  6. Add adminInfoCountValue() helper using admin-info-count fragment
  7. Legacy core removed (core/template.php):
  8. File deleted; functionality fully absorbed by Template class
  9. New fragment HTML files (templates/*/fragments/):
  10. Add ~50 atomic fragment files per theme: comment, editor, admin-block, session, preview-title, foot-controls, navi-lower, etc.

  11. Update partials/preview.html variable API: fields → title_html, fields1 → body_a, fields2 → body_b, fields3 → body_c

  12. Update fragments/comment.html for all themes
  13. Legacy templates removed:
  14. Delete basic.html, title.html, preview.html, spoiler.html, warn.html, basic-changelog*.html, layouts/main.html and similar per-theme files

Benefits:

  • Inline HTML fully removed from PHP business logic
  • Theme authors can override any UI fragment without touching PHP
  • Consistent, semantic variable names across all fragment templates

Technical notes:

  • partials/preview.html variables renamed: fields/fields1/fields2/fields3 → title_html/body_a/body_b/body_c (breaking for custom themes)

  • renderFootControls() replaces hardcoded foot_html string
  • All themes must provide required fragment files
Refactor: add component/slot compilation to Template class
Автор: Eduard Laas | Дата: 10:19 25.03.2026

Introduce {% component %}/{% endcomponent %} and {% slot %}/{% endslot %} directives into the template compiler, enabling partials to receive isolated props and inlined slot payloads. Correct the view cache directory path from cache/view/ to cache/templates/ for consistency with storage layout.

Core changes:

  1. Component/slot filters (core/classes/template.php):
  2. Add filterComp() for {% component 'partials/foo.html' with vars %}...{% endcomponent %}

    • Path restricted to partials/ subdirectory
    • Prevents nested component blocks
    • Passes isolated props array and slot body to getComp()
  3. Add filterSlot() for {% slot name %}...{% endslot %} placeholders
  4. Compilation pipeline (core/classes/template.php):
  5. Register filterComp() and filterSlot() in compileCode()
  6. Add $slots property for slot state tracking
  7. Cache path correction (core/classes/template.php):
  8. Change cache dir: storage/cache/view/{theme} → storage/cache/templates/{theme}

Benefits:

  • Reusable partials with dynamic slot content
  • Template logic stays declarative and HTML-author-friendly
  • Cache path aligned with storage layout convention

Technical notes:

  • Component nesting is explicitly blocked at compile time
  • Slot body is passed as raw string evaluated in partial scope
  • No existing templates used {% component %}, no migration needed
24.03.2026
Refactor: complete lite theme migration and test suite fixes
Автор: Eduard Laas | Дата: 22:54 24.03.2026

Finalize Phase 6–9 changes for the lite theme and clean up test support files after Phase 12 legacy removal.

Core changes:

  1. Lite theme layout migration (templates/lite/):
  2. Delete index.html and index-main.html (legacy shell files)
  3. Refactor index.php to data-only provider
  4. Update layouts/app.html and layouts/home.html to new engine contract
  5. Add partials: menu.html, forum-teaser.html, contact-block.html
  6. Add fragments: forum-pagenum.html, forum-teaser-item.html
  7. Admin theme fragments (templates/admin/fragments/):
  8. Add admin-lang-item.html and admin-menu-item.html
  9. Test suite (tests/):
  10. Remove getThemeLoad/getThemeFile stubs from ViewTestBootstrap.php
  11. Fix if/endif balance regex in TemplateValidationTest.php
  12. Remove stale lite-menu assertion in ViewBridgeSmokeTest.php

Benefits:

  • Lite theme fully decoupled from legacy shell rendering
  • All themes consistent with new Template engine contract
  • Test suite passes cleanly after legacy stub removal
Feature: universal theme asset discovery and legacy shell removal
Автор: Eduard Laas | Дата: 22:53 24.03.2026

Add automatic CSS/JS loading from theme directories, removing the need to manually list theme files in config. Remove legacy admin shell files and the archived default_old theme directory as part of Phase 12 cleanup.

Core changes:

  1. Universal theme asset loader (core/system.php):
  2. Add getThemeAssets(theme, ext) — scans theme root, assets/vendor/*/, assets/{ext}/, and legacy js/ subdir in the correct load order

  3. Modify doCss() to auto-append theme CSS dirs (root, vendor, assets/css)
  4. Modify doScript() to auto-append theme JS files via getThemeAssets()
  5. Config decoupling (config/global.php):
  6. Remove templates/[theme]/ and plugins/bootstrap/ from css_f (bootstrap now loaded from theme vendor dir automatically)

  7. Theme assets are fully discovered at runtime, not config-driven
  8. Legacy removal (templates/admin/, templates/default_old/):
  9. Delete templates/admin/index.html and index-home.html (Phase 12)
  10. Delete templates/default_old/ directory (archived legacy theme)
  11. Clean up templates/admin/index.php (data-only provider)
  12. Fix statistic path (core/user.php):
  13. Replace CONFIG_DIR with COUNTER_DIR for statistic.log read

Benefits:

  • Adding a new theme requires zero config changes for CSS/JS loading
  • Vendor libs bundled with a theme are picked up automatically
  • Load order guaranteed: root → vendor → assets/css|js

Technical notes:

  • getThemeAssets() uses glob() with GLOB_ONLYDIR for vendor subdirs
  • Applies to both frontend and admin rendering paths
  • Cache invalidation: existing CSS/JS caches are bypassed on next request
Refactor: migrate setHead/setFoot to Template-based page rendering
Автор: Eduard Laas | Дата: 15:38 24.03.2026

Replace the string-replace index.php pipeline in setHead()/setFoot() with $tpl->getHtmlPage(); introduce pages, layouts, partials and fragments for all themes; migrate setExit() in access.php and security.php to the same engine.

Core changes:

  1. Render pipeline (core/system.php):
  2. setHead() buffers output via ob_start() and stores vars in $sitevars / $adminvars
  3. setFoot() renders the full page via $tpl->getHtmlPage() using those vars
  4. Unified theme resolution: getTheme() no longer returns 'admin' for ADMIN_FILE
  5. $tpl always instantiated with resolved theme (no more separate admin branch)
  6. addblocks() calls for left/right/down/message/center/foot moved into setFoot()
  7. setExit() migration (core/access.php, core/security.php):
  8. Both versions replaced inline HTML with $tpl->getHtmlPage('message')
  9. alert fragment used for the error message body
  10. Template structure — new files per theme (admin, default, lite, simple):
  11. layouts: app.html, home.html, admin.html, bare.html
  12. pages: module.html, home.html, admin.html, login.html, message.html, preview.html
  13. partials: login.html, registration.html, searchbox.html, preview.html
  14. fragments: block-left, code, comment, form-conf, hide, list-bottom, open, close, pagenum, panel-admin, panel-modul, quote, spoiler, voting-*, basic-monitor, basic

  15. Fragment updates:
  16. title.html extended in all themes with icon/subtitle/content layout block
  17. Theme head/foot vars (templates/admin/index.php, templates/lite/index.php):
  18. getAdminHeadVars() / getThemeHeadVars() / getThemeFootVars() return plain array keys (no {%key%} format) to match the new Template data contract

  19. Fixes and tests:
  20. modules/news/index.php: guard is_user() before $user[1] access
  21. tests: updated AdminLoginBridgeFlowTest, AdminPreviewBridgeFlowTest, AdminSearchboxBridgeFlowTest for unified theme; added ViewBridgeSmokeTest cases for module/home page render; added AdminPageRenderFlowTest

  22. Config:
  23. config/global.php: sitekey rotated, active theme set to 'simple'

Benefits:

  • Page rendering fully managed by the Template class for all themes and contexts
  • setHead/setFoot no longer depend on index.php file or string-replace placeholders
  • All three render contexts (frontend, admin, exit) use the same engine

Technical notes:

  • index.php file is no longer read or parsed by setHead/setFoot
  • {%placeholder%} vars in theme index.php files are no longer used for page assembly

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

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

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