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

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

Всего: 899 Доступных коммитов | Отфильтровано: 899 Коммиты | Страница: 34 / 90
15.04.2026
Refactor: editor and parser classes — template-based rendering, new API
Автор: Eduard Laas | Дата: 11:59 15.04.2026

Migrate Editor::getSelect() and all editor drivers to use template fragments and the new getTplTextarea() array API. Parser refactored with private helper methods for image normalization.

Core changes:

  1. Editor class (core/classes/editor.php):
  2. Editor::getSelect(): removed inline <select>/<option> HTML

    • Now uses new/select + new/select-option fragments
    • Added $selectAttr parameter for OnChange and other attributes
  3. Editor drivers (plugins/editors/*/driver.php):
  4. All drivers: textarea() → getTplTextarea(['id', 'name', ...]) array call
  5. bbcode/driver.php: removed legacy textarea() call
  6. ckeditor, codemirror, plain, tinymce, toastui: updated call signatures
  7. Parser class (core/classes/parser.php):
  8. Extracted getRootPath(), getFallbackImage(), buildImageError(), normalizeImageSource(), normalizeHtmlImages() as private helpers

  9. checkbox-input fragment used for checklist rendering

Benefits:

  • Editor select rendering is now theme-switchable via new/select fragment
  • Consistent array API across all driver implementations
  • Parser logic split into focused private methods

Technical notes:

  • Editor::getSelect() signature: added optional $selectAttr = '' parameter
  • All editor drivers call getTplTextarea() — textarea() no longer used
Refactor: system.php — remove inline HTML, migrate all output to fragments
Автор: Eduard Laas | Дата: 11:59 15.04.2026

Replace all inline HTML string construction in PHP with $tpl->getHtmlFrag() calls. No HTML is built directly in PHP code anymore — all output is delegated to template fragments.

Core changes:

  1. HTML-in-PHP removal — standalone helper functions (core/system.php):
  2. new_graphic(): spans → new/graphic fragment
  3. user_geo_ip(): img/a → geo-ip-flag + link-btn-blank fragments
  4. adminblock(): table/hr → admin-block-links fragment
  5. user_info(): anchor → breadcrumb-link fragment
  6. warnings(): ol/li → warning-list + action-menu-item fragments
  7. commentMetaColor/Avatar/RankImage/Signature(): → dedicated fragments
  8. alphaNavLink/Text(): → alpha-nav-link/text fragments
  9. naviTabsLink/Content(): → navi-tab-link/content fragments
  10. pagerDots(): → pager-dots fragment
  11. categorySubItem(): → category-sub-item fragment
  12. breadcrumbLink(): → breadcrumb-link fragment
  13. debugSection(): → debug-section fragment
  14. ratingWrap(): → rating-wrap fragment
  15. add_menu(): → editor-action-menu + action-menu-item fragments
  16. renderFootControls(): → foot-controls fragment
  17. editorActionMenu/commentActionMenu/votingActionMenu(): li wrapping → action-menu-item
  18. HTML-in-PHP removal — larger functions (core/system.php):
  19. encode_php(): table/tr/td/pre/code/div → code-row/table/hljs/block fragments
  20. render_blocks(): div.sl_center → msg-center fragment
  21. ashowcom(): form/span/a/div → comment-list-form/date/num-link/text fragments
  22. updateVotingResult(): meta refresh × 3 → meta-refresh fragment
  23. API updates (core/admin.php, core/user.php):
  24. getTplMoveControls(): positional → array call sites updated
  25. textarea()/getAjaxTextarea() → getTplTextarea/getTplAjaxTextarea array API
  26. getTplHiddenInput(): legacy positional call → array call
  27. Editor::getSelect(): + $selectAttr param, inline HTML removed

Benefits:

  • Zero inline HTML in core PHP files — full separation of logic and markup
  • All rendering is theme-switchable via fragment overrides
  • Consistent $tpl->getHtmlFrag() pattern throughout

Technical notes:

  • comment-list-form fragment wraps admin bulk-action form
  • ashowcom $hclass remains as data attribute string (passed to comment.html)
Refactor: helpers.php — array API, new getTpl* functions, naming rules
Автор: Eduard Laas | Дата: 11:58 15.04.2026

Migrate all helper functions to uniform array-based parameter API. Add new template helpers, enforce variable naming rules (max 8 chars, lowercase letters only, no snake_case), and remove = alignment padding.

Core changes:

  1. New functions (core/helpers.php):
  2. getTplFieldsIn(): new-layout field rows via new/form-field-row fragment
  3. getTplHiddenInput(): updated to accept 'attr' key
  4. getTplFormSubmit(): new form submit bar with preview/delete controls
  5. getTplTextarea(): rich-text editor textarea with upload config
  6. getTplAjaxTextarea(): inline HTMX edit form with save/back buttons
  7. Refactored functions (core/helpers.php):
  8. getTplBbEditor(): parameter $opt → $data
  9. getTplPager(): $opt → $data, $url_extra → $urlx, = alignment removed
  10. getTplMoveControls(): positional params → array $data
  11. getTplUserSearchInput(): $minlength → $mlen
  12. getTplFieldsIn(): $field_html → $fhtml
  13. Alignment cleanup (core/helpers.php):
  14. Removed = padding in getTplFormSubmit, getTplMoveControls, getTplTextarea
  15. helpers-old.php:
  16. Migrated getHtmlFrag() calls to new/ fragment namespace

Benefits:

  • Consistent array API across all getTpl* helpers
  • Variable names comply with .rules/global.md (2–8 chars, lowercase)
  • No alignment padding — easier diffs and code review

Technical notes:

  • getTplTextarea and getTplAjaxTextarea exist only in helpers.php
  • system.php previously had textarea() and getAjaxTextarea() — removed there
14.04.2026
Chore: update config fingerprint after template layer changes
Автор: Eduard Laas | Дата: 15:45 14.04.2026

Auto-generated base_fingerprint reflects the new template file set introduced by the new/ fragment layer across all three themes.

Core changes:

  1. config/local.php:
  2. Updated: base_fingerprint to current codebase state

Benefits:

  • Config stays in sync with deployed template files

Technical notes:

  • Fingerprint is computed automatically on template structure changes
Refactor: news module — migrate frontend to new/ template layer
Автор: Eduard Laas | Дата: 15:42 14.04.2026

Replaces legacy content-card/content-view/liste-wrap/liste-basic fragments with new/ layer equivalents. Fixes admin URLs. Adds CSRF token to frontend delete links. Adds refer=2 support to admin actions() so frontend-initiated deletes redirect back to the frontend.

Core changes:

  1. Card grid view (modules/news/index.php — news()):
  2. Card: getTplContentCard → $tpl->getHtmlFrag('new/card', ...)
  3. Fixed: edit URL op=news_add → name=news&op=add
  4. Fixed: delete URL op=news_admin&typ=d → name=news&op=actions&typ=d
  5. Added: refer=2 and CSRF token on frontend delete link
  6. Alert: alert → new/alert
  7. Liste view (modules/news/index.php — liste()):
  8. Table: liste-wrap → new/table (5 cols: id/title/cat/poster/date)
  9. Rows: liste-basic → new/table-row-liste
  10. Letter nav: extracted from liste-wrap param to standalone output
  11. Alert: alert → new/alert
  12. Full view (modules/news/index.php — view()):
  13. Renderer: getTplContentView → $tpl->getHtmlFrag('new/view', ...)
  14. Removed HTML from PHP: <br><br> separators between hometext, bodytext and fields replaced with direct concatenation

  15. Fixed: edit URL op=news_add → name=news&op=add
  16. Fixed: delete URL op=news_admin → name=news&op=actions with token
  17. Admin actions handler (modules/news/admin/index.php):
  18. Added: $refer_val to distinguish refer=1 (admin tab) vs refer=2
  19. refer=1 → admin panel status=1 tab (pending news, unchanged)
  20. refer=2 → index.php?name=news (frontend list page)

Benefits:

  • No HTML strings in PHP — all markup in fragments
  • Admin URLs follow consistent name=MODULE&op=ACTION pattern
  • Frontend delete secured with CSRF token and refer redirect

Technical notes:

  • news/view() fields appended to rawtext (no separate fields param)
  • new/card.html reuses all sl-* classes defined in new.css
  • new/table-row-liste.html covers 5-column liste layout
Refactor: content module — migrate frontend to new/ template layer
Автор: Eduard Laas | Дата: 15:41 14.04.2026

Replaces legacy content-list and title fragments with new/ layer equivalents. Fixes admin URLs to match the name=content&op=action pattern. Adds CSRF token to frontend delete links. Fixes refer redirect in the admin delete handler so frontend-initiated deletes return to the frontend, not the admin panel.

Core changes:

  1. Frontend list view (modules/content/index.php — content()):
  2. Table: content-list-open → new/table (sortable, col_id/title/func)
  3. Rows: content-list-basic → new/table-row-content with new/tip
  4. Pager: setArticleNumbers → getTplPager with prefix new/
  5. Alert: alert → new/alert
  6. Removed: body from SELECT (unused in list)
  7. Fixed: duplicate ?? fallback in config reads
  8. Frontend view (modules/content/index.php — view()):
  9. Renderer: title+filterDoc echo → new/view fragment
  10. Removed HTML from PHP: fields separator moved to template
  11. Fixed: rss_read result stored in $rss, not $conf['content']
  12. Added: CSRF token on delete link, is_moder edit/delete nav
  13. Admin delete handler (modules/content/admin/index.php):
  14. Added: $refer flag (GET refer=1)
  15. Redirect: refer=1 → index.php?name=content (frontend) otherwise → admin.php?name=content

Benefits:

  • No HTML strings in PHP — all markup in fragments
  • Admin URLs follow consistent name=MODULE&op=ACTION pattern
  • Frontend delete secured with CSRF token

Technical notes:

  • new/view.html handles fields via {% if fields %}<br><br>{{{ fields }}}
  • Admin refer flag mirrors pattern used in news module (refer=2)
Refactor: getTplPager — add prefix option for new/ fragment namespace
Автор: Eduard Laas | Дата: 15:40 14.04.2026

Frontend modules using the new/ template layer need to call pager-link, pager-dots, and pager fragments from the new/ subdirectory. The prefix option allows callers to pass 'new/' and get new-layer fragments without duplicating pager logic.

Core changes:

  1. getTplPager (core/helpers.php):
  2. Added: $prefix = (string)($opt['prefix'] ?? '')
  3. Changed: pager-link, pager-dots, pager fragment calls now use $prefix
  4. Closure captures $prefix via use() for link rendering
  5. Added missing space after current page number for consistent spacing

Benefits:

  • No duplicate pager code for new/ vs legacy fragment paths
  • modules/content/index.php and future modules pass prefix: 'new/'
  • Legacy callers unaffected (prefix defaults to empty string)

Technical notes:

  • Fragment path: $prefix.'pager-link' resolves to 'new/pager-link'
  • Space after current page item aligns with non-current item spacing
Style: remove duplicate border-bottom from .fullview in theme.css
Автор: Eduard Laas | Дата: 15:40 14.04.2026

The sl-fullview article in new/view.html already renders a <hr> element before the footer buttons, making the CSS border-bottom on .fullview produce a visible double line.

Core changes:

  1. theme.css — .fullview (templates/default/assets/css/theme.css):
  2. Removed: border-bottom: 1px solid #ebebee
  3. Kept: padding-bottom: 25px
  4. theme.css — .fullview (templates/lite/assets/css/theme.css):
  5. Same change applied

Benefits:

  • Single visual separator (the <hr>) in full article view
  • Eliminates visible double-line regression in default and lite themes

Technical notes:

  • Legacy .fullview class still used by old content-view.html fragments
  • new/view.html uses sl-fullview — border handled by <hr> in markup
Feature: add new/ frontend template layer — fragments and CSS
Автор: Eduard Laas | Дата: 15:40 14.04.2026

Introduces a unified new/ fragment namespace for all frontend modules. All fragments use sl-* CSS class naming (hyphen), defined in new.css alongside the sl_* legacy classes in system.css/theme.css.

Core changes:

  1. New fragment set (templates/*/fragments/new/):
  2. alert.html — inline alert block (warn/info variants)
  3. card.html — article card for grid layouts (sl-post sl-card)
  4. navi.html — frontend navigation menu (sl-navi-menu)
  5. pager.html, pager-link.html, pager-dots.html — paginator
  6. table.html — sortable table wrapper with optional columns
  7. table-row.html — generic table row wrapper
  8. table-row-content.html — standard 3-column article row
  9. table-row-liste.html — 5-column liste row (title/cat/poster/date)
  10. tip.html — hover tooltip with date and read-count
  11. view.html — full-page article view (sl-post sl-fullview)
  12. New CSS layer (templates/*/assets/css/new.css):
  13. sl-post, sl-card, sl-fullview, sl-title, sl-meta, sl-meta-foot
  14. sl-entry-content, sl-rate-box, sl-pull-right
  15. sl-table, sl-table-head, sl-table-body, sl-table-cell, sl-table-col-num
  16. sl-pager and all pager sub-elements
  17. sl-navi-menu
  18. Applied identically to default, lite, and simple themes

Benefits:

  • Single source of truth for new-layer class naming across all themes
  • No HTML in PHP — all presentation moved to fragments
  • Clear separation: sl- (new.css) vs sl_ (legacy)

Technical notes:

  • Fragments deployed identically to all three themes (default, lite, simple)
  • new.css comments follow admin new.css style (simple slash-star groups)
  • Backward compatible: legacy fragments untouched
13.04.2026
Docs: add EDITORS.md and PARSER.md architecture documents
Автор: Eduard Laas | Дата: 23:19 13.04.2026

Adds two new architecture reference documents for subsystems introduced in the editor system migration. These files are referenced in the README documentation table and describe the stable contracts that contributors should follow when extending or integrating editors and the content parser.

Core changes:

  1. docs/EDITORS.md:
  2. Describe the pluggable Editor class architecture and manifest.json format
  3. Document ContentDriver and CodeDriver interfaces
  4. List bundled drivers and their intended roles
  5. docs/PARSER.md:
  6. Describe Parser class and filterContent() API
  7. Document filterMarkdown() legacy shim and migration path
  8. Clarify safe vs. unsafe parsing contexts

Benefits:

  • New contributors have a single reference for editor and parser integration
  • Eliminates undocumented API surface for two actively used subsystems

Technical notes:

  • Documents describe current repository state only; no forward-looking promises

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

1 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 90

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

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