Skip to content

Add an optional introduction above the Knowledge Base index - #14

Merged
bonelifer merged 2 commits into
mainfrom
feature/kb-intro-text
Nov 12, 2026
Merged

bonelifer merged 2 commits into
mainfrom
feature/kb-intro-text

Conversation

@bonelifer

Copy link
Copy Markdown
Contributor

Adds an optional introduction above the Knowledge Base index, like the text kinerity/knowledgebase showed there.

Builds on the kinerity import PR. Merge that one first.

  • The ACP configuration page has a new switch, a text box and a "Write the introduction in Markdown" option. The text works like an article: BBCode, smilies and links, or Markdown.
  • It shows under the Knowledge Base title on the index, in both the flat and the hierarchical layout.
  • It is off by default. Migration version_2_0_33 fills the text box with kinerity's text, in the board's default language (from the new default_content.php language file).
  • On a board imported from kinerity it is switched on, so visitors keep seeing the text they saw before.

Tests: tests/kb_intro_test.php covers the default text, the display switch, saving BBCode and Markdown, emptying the text, and the migration. Claude ran the migration on the phpBB 3.3 board imported from kinerity: the intro came up switched on, in the same place as on the kinerity board. In the ACP, Claude saved BBCode and then Markdown text, saw both displayed formatted on the flat and hierarchical index, and saw nothing once the intro was switched off. The full suite passes on phpBB 3.3.x and master.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

🤖 Generated with Claude Code

Base automatically changed from feature/kinerity-import to main November 12, 2026 10:43
@bonelifer bonelifer closed this Nov 12, 2026
@bonelifer bonelifer reopened this Nov 12, 2026
The ACP configuration page gets a switch, a text box and a Markdown
option for a short introduction shown under the Knowledge Base title, on
the hierarchical index and the flat index. It is written in BBCode or
Markdown and stored through the same article_text service as articles.
Migration version_2_0_33 adds it switched off, holding the text
kinerity/knowledgebase showed above its index, and switches it on on a
board imported from kinerity, so its visitors keep seeing it.

Tests: kb_intro_test.php (default text, display switch, saving BBCode
and Markdown, emptying, the migration and its kinerity check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer force-pushed the feature/kb-intro-text branch from 3414417 to be6af8f Compare November 12, 2026 10:44
EPV fails on htmlspecialchars() in inc/kinerity_import.php (merged in
#13, so main fails its EPV check) and inc/intro.php. They now call
phpBB's utf8_htmlspecialchars(), which does the same (ENT_COMPAT,
UTF-8). inc/default_content.php no longer defines IN_PHPBB itself,
which EPV also flagged; phpBB always defines it, and the tests do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer

Copy link
Copy Markdown
Contributor Author

Pushed 77fd815, which fixes the two EPV failures:

  • inc/kinerity_import.php (merged in Import a board's kinerity/knowledgebase data when enabled #13, so main currently fails EPV too) and inc/intro.php now call phpBB's utf8_htmlspecialchars() instead of htmlspecialchars(). It does the same thing (ENT_COMPAT, UTF-8).
  • inc/default_content.php no longer defines IN_PHPBB itself, which EPV also flagged. phpBB always defines it, and the tests do.

Claude ran EPV locally against phpBB 3.3.x and master: no findings outside .github/epv-allowed.txt. The full suite still passes (565 tests).


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

@bonelifer
bonelifer merged commit 0ce0bc8 into main Nov 12, 2026
14 checks passed
@bonelifer
bonelifer deleted the feature/kb-intro-text branch November 12, 2026 11:06
bonelifer added a commit that referenced this pull request Nov 12, 2026
Brings in the index introduction (#14), which also clears the EPV
finding in inc/kinerity_import.php. Both new docs/testing.md sections
are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant