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

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

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

Всего: 1045 Доступных коммитов | Отфильтровано: 1045 Коммиты | Страница: 47 / 105
15.04.2026
Feature: templates — добавить new/ фрагменты: view-field, voting-*, span
Автор: Eduard Laas | Дата: 15:24 15.04.2026

Новые фрагменты в new/ namespace для всех тем (default, lite, simple, admin). Обеспечивают инфраструктуру для getVotingView и getTplViewFieldRows.

Core changes:

  1. view-field.html (default, lite, simple, admin):
  2. Строка отображения custom field: label + value
  3. Использует sl-form-row / sl-form-label / sl-form-value классы
  4. voting-widget.html (default, lite, simple):
  5. Оболочка для всего voting-блока
  6. Условный <form> через has_form; принимает items_html, admin_html, post_html, polls_html, votes_html, comm_html
  7. voting-post.html (default, lite, simple):
  8. Один вариант голосования для ввода (radio/checkbox + label)
  9. voting-view.html (default, lite, simple):
  10. Один вариант с результатом: прогресс-бар + процент + количество голосов
  11. span.html (default, lite, simple):
  12. Универсальный <span class="{{ class }}">{{ text }}</span>

Benefits:

  • HTML вынесен из PHP в шаблоны
  • Все темы синхронизированы — один набор фрагментов на все

Technical notes:

  • Admin тема получает только view-field.html (voting не нужен в admin)
  • Root-level voting-post.html и voting-view.html остаются без изменений
Fix: bbcode driver — декодировать HTML entities перед рендером виджета
Автор: Eduard Laas | Дата: 15:24 15.04.2026

При загрузке значения из БД htmlspecialchars-кодирование уже применено. Без decode шаблон применял его повторно — двойное кодирование при редактировании.

Core changes:

  1. EditorBbcode::getWidget (plugins/editors/bbcode/driver.php):
  2. Добавить html_entity_decode($value, ENT_QUOTES|ENT_HTML5, 'UTF-8') перед getTplBbEditor

    • DB хранит htmlspecialchars-encoded текст
    • getTplBbEditor передаёт value в шаблон через {{ value_text }} — снова кодирует
    • decode разрывает двойное кодирование

Benefits:

  • Сохранённый текст отображается корректно в редакторе при повторном открытии
  • Нет искажения специальных символов (&amp; → & → &amp;amp; и т.д.)

Technical notes:

  • CKEditor не требует этого исправления: использует json_encode + ed.setData()
  • Только BBcode-редактор передаёт значение через HTML-атрибут textarea
Refactor: system — перевести getVotingView на new/ фрагменты
Автор: Eduard Laas | Дата: 15:23 15.04.2026

Весь inline HTML в getVotingView заменён на вызовы $tpl->getHtmlFrag() через new/ namespace. HTML больше не собирается строками в PHP.

Core changes:

  1. getVotingView (core/system.php):
  2. Убрать inline <form>, <h4>, <ul>, </ul>, </form> из PHP
  3. Заменить getHtmlFrag('voting-post',...) на getHtmlFrag('new/voting-post',...)
  4. Заменить getHtmlFrag('voting-view',...) на getHtmlFrag('new/voting-view',...)
  5. Переименовать $cont (loop accumulator) в $items для ясности
  6. Заменить inline <span class="sl_votes">...</span> на getHtmlFrag('new/span',...)
  7. Финальный $cont собирается через getHtmlFrag('new/voting-widget',...)

    • has_form, form_id, title, items_html, admin_html, post_html, polls_html, votes_html, comm_html

Benefits:

  • HTML полностью вынесен в шаблоны
  • Структура voting-widget изменяется только в .html файлах
  • Соответствует архитектурному принципу: данные в PHP, разметка в templates

Technical notes:

  • Новые фрагменты: new/voting-widget, new/voting-post, new/voting-view, new/span
  • Фрагменты нужны во всех frontend темах: default, lite, simple
  • Root-level voting-post.html и voting-view.html остаются без изменений
Fix: helpers — исправить getTplFieldsIn и getTplViewFieldRows
Автор: Eduard Laas | Дата: 15:23 15.04.2026

Два независимых исправления в core/helpers.php для корректной работы custom fields в display и preview путях.

Core changes:

  1. getTplFieldsIn (core/helpers.php):
  2. Заменить getVar('post','field','raw','') на getVar('post','field[]','raw',[])

    • filter_input(INPUT_POST,'field') возвращает null/false для массивов
    • [] суффикс активирует $allarr=true в getVar — читает $_POST['field'] напрямую
  3. Заменить filterFields() + explode на array_values(array_map('strval',$posted))

    • posted массив используется напрямую без лишней фильтрации в display-пути
  4. getTplViewFieldRows (core/helpers.php):
  5. Заменить фрагмент 'view-field' на 'new/view-field'

    • фрагмент перенесён в new/ namespace
  6. Убрать hardcoded ':' из label_text

    • двоеточие теперь добавляется через CSS ::after в new.css

Benefits:

  • Custom fields корректно отображаются в preview
  • Custom fields сохраняют введённые значения после отправки формы
  • label_text чистый — без hardcoded пунктуации в PHP

Technical notes:

  • Фрагмент new/view-field.html должен существовать во всех темах
  • Обратная совместимость: fallback через explode('|') если POST пустой
Fix: news — исправить add() preview, field[], getStopText
Автор: Eduard Laas | Дата: 15:23 15.04.2026

В add()-функции frontend и admin модуля news устранены три независимые ошибки, из-за которых preview не работал корректно при повторных отправках.

Core changes:

  1. Frontend add() (modules/news/index.php):
  2. Заменить тип 'text' на 'raw' для hometext/bodytext в display-пути

    • filterHtml + {{ value_text }} вместе давали двойное кодирование за каждый round-trip
    • 'raw' разрывает цикл; 'text' остаётся только в send() для записи в БД
  3. Заменить getVar('post','field','field') на field[] паттерн с implode

    • filter_input возвращает null для массивов — field[] через getVar корректен
  4. Заменить $stop напрямую на getStopText((array)$stop)

    • шаблон new/alert ожидает строку; PHP-массив давал пустой блок
  5. Вызывать getTplPreviewContent() напрямую вместо preview()-обёртки
  6. Admin add() POST-ветка (modules/news/admin/index.php):
  7. Те же исправления: 'raw', field[] паттерн, implode

Benefits:

  • Текст больше не ломается при повторных preview-отправках
  • Custom fields сохраняют значения в форме после preview
  • Блок предупреждений отображается корректно

Technical notes:

  • send() и admin save() сохраняют 'text' для БД — без изменений
  • Admin DB-ветка (загрузка из БД) — без изменений; decode на уровне драйвера
Refactor: replace misnamed files-add-*-row with new/form-field-row composition
Автор: Eduard Laas | Дата: 13:46 15.04.2026

Remove the module-specific files-add-input-row and files-add-upload-row fragments (wrong naming, wrong abstraction level). Replace them with proper composition of the existing new/form-field-row + new/input / new/file-input fragments. Add new/file-input.html to all 4 themes.

Core changes:

  1. modules/files/index.php — extra fields rewritten:
  2. files-add-upload-row → new/form-field-row + new/file-input
  3. files-add-input-row (×3) → new/form-field-row + new/input with correct variable names: name_attr, value_attr, itype, maxlength_num, placeholder_text

  4. templates/*/fragments/new/file-input.html (all 4 themes) — new:
  5. <input type="file" name="{{ name_attr }}" class="sl-field">
  6. templates/*/fragments/new/files-add-input-row.html (all 4 themes) — deleted
  7. templates/*/fragments/new/files-add-upload-row.html (all 4 themes) — deleted

Benefits:

  • No module-specific fragments in new/ namespace
  • File input reusable via new/file-input across any module
  • Consistent composition pattern: new/form-field-row wraps any input type

Technical notes:

  • new/form-field-row and new/input already existed — no new patterns introduced
Refactor: migrate all form-add call sites to new/ fragment namespace
Автор: Eduard Laas | Дата: 13:44 15.04.2026

All modules that previously used the legacy form-add, files-add-input-row and files-add-upload-row fragments now point exclusively to the new/ namespace. Legacy fragments deleted. New new/ fragments created in all 4 themes.

Core changes:

  1. modules/*.php (9 files) — call site renames:
  2. 'form-add' → 'new/form-add' (auto_links, faq, files, help, jokes, links, money, order, pages)

  3. 'files-add-upload-row' → 'new/files-add-upload-row' (files)
  4. 'files-add-input-row' → 'new/files-add-input-row' (files)
  5. templates/*/fragments/new/ — new fragments added (all 4 themes):
  6. new/files-add-input-row.html: sl-form-row with label + typed input
  7. new/files-add-upload-row.html: sl-form-row with label + file input
  8. templates/*/fragments/ — old fragments deleted (default, lite, simple):
  9. form-add.html (3×)
  10. files-add-input-row.html (3×)
  11. files-add-upload-row.html (3×)

Benefits:

  • No legacy root-level fragment used by any module
  • Single consistent new/ fragment namespace for all add-form templates

Technical notes:

  • No template content changes — only namespace migration
  • admin theme had no form-add.html to delete
Refactor: migrate form-add and files-add rows to sl-form div layout
Автор: Eduard Laas | Дата: 13:41 15.04.2026

Replace the legacy <table class="sl_table_form"> form layout in form-add.html with the same sl-form div structure already used by new/form-add.html. Also update files-add-input-row and files-add-upload-row to emit sl-form-row divs instead of <tr><td> rows, which were invalid inside the new div container.

Core changes:

  1. templates/*/fragments/form-add.html (default, lite, simple):
  2. Replace <table class="sl_table_form"> wrapper with <div class="sl-form">
  3. Replace <tr><td>label</td><td>field</td></tr> rows with <div class="sl-form-row"><label class="sl-form-label">...</label>field</div>

  4. Replace {% if titleval %} condition with {% if lbl_title %}
  5. Replace {% if catselect %} condition with {% if lbl_cat %}
  6. Replace <tr><td colspan="2" class="sl_center"> submit row with <div class="sl-form-submit">

  7. templates/*/fragments/files-add-input-row.html (default, lite, simple):
  8. <tr><td> → <div class="sl-form-row"><label class="sl-form-label">
  9. templates/*/fragments/files-add-upload-row.html (default, lite, simple):
  10. <tr><td> → <div class="sl-form-row"><label class="sl-form-label">

Benefits:

  • form-add and new/form-add now use the same layout — one consistent design
  • All add-form modules (files, faq, jokes, links, pages, help, auto_links, money, order) render identical structure as the news module

  • Valid HTML: no <tr> outside <table>

Technical notes:

  • No PHP changes
  • All call sites already pass lbl_title and lbl_cat — condition change is transparent

  • new/form-add.html unchanged; form-add.html now matches it exactly
Style: add <title> block to bare layout in all frontend themes
Автор: Eduard Laas | Дата: 13:18 15.04.2026

Insert a <title> block into bare.html for default, lite, and simple themes so that bare-layout pages (e.g. print, iframe, standalone views) render a proper document title. Also update the config fingerprint to reflect the changed template layer.

Core changes:

  1. templates/default/layouts/bare.html
  2. templates/lite/layouts/bare.html
  3. templates/simple/layouts/bare.html:
  4. Added <title> tag with block/fallback pattern before {{{ meta }}}: <title>{% block title %}{% if title %}{{ title }}{% else %}{{ sitename }}{% endif %}{% endblock %}</title>

  5. config/local.php:
  6. base_fingerprint updated to reflect new template state

Benefits:

  • Bare-layout pages pass HTML validation (title is required)
  • Consistent title rendering across all layout types

Technical notes:

  • Admin theme bare.html not included (managed separately)
  • Pattern matches existing block structure in main.html and app.html
Chore: remove unused language constants from all locale files
Автор: Eduard Laas | Дата: 13:18 15.04.2026

Delete constants that are no longer referenced anywhere in the codebase after the getTpl* refactoring and admin UI cleanup. All 6 locales (de/en/fr/pl/ru/uk) updated in sync.

Core changes:

  1. admin/lang/*.php (6 locales) — 18 constants removed per locale:
  2. _BOTTOM, _CALENDAR, _CENTER, _INDEX
  3. _INFO_NO, _INFO_NULL
  4. _IP_CIDR_EX, _LISTING, _LOGGED
  5. _NAVI, _PAGENUM, _PRINTS, _STYLE
  6. _TCLOSE, _TMESS, _TOPEN, _TTITLE, _TWARNING
  7. lang/*.php (6 locales) — 3 constants removed per locale:
  8. _RATE2, _RATE4, _SPOILER
  9. modules/changelog/admin/lang/*.php (6 locales) — 1 constant removed:
  10. _CHLOG_ERR_TOKEN (moved to inline validation; no longer a translatable string)

Benefits:

  • Lang files contain only constants that are actively used
  • Reduces risk of accidental reuse of stale identifiers

Technical notes:

  • No PHP logic changes — constants only
  • All locales kept in sync; no locale-specific differences

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

1 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 105
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

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