Repository navigation
Keep category memberships, for template categories, sub-categories and sort keys - #81
Merged
Merged
Conversation
…d sort keys Which articles are in which category is now kept in a table, worked out from an article's rendered live version whenever it changes, and for every article that uses a template when the template changes. That lets a category list the articles a template puts in it, list the category pages that are in it as sub-categories, and sort its members by the key after the bar, which the parser now keeps. [[:Category:Name]] is a plain link to the category's page. A cron task fills the table for existing articles in batches; until then the lists work as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bonelifer
added a commit
that referenced
this pull request
Oct 15, 2026
A category page now lists its sub-categories (#81) a page at a time, with their own page links (`substart`), so moving through them keeps the page of articles, and the other way round. Each sub-category shows how many articles it holds, and how many sub-categories when it has any, counted for the whole page in one query (`category_members::counts()`). The TODO's last category item is done. Claude tested it: - Unit tests on phpBB 3.3 and master, with a database test for the counts (a version that isn't live doesn't count). - On the seed-forum 3.3 board, at two items per page, with four sub-categories and three articles in one category: the sort-key order and counts, page 2 of the sub-categories, and each list's links keeping the other's page. - On the seed-forum 4.0 board: the category pages load. --- Investigated and written by [Claude](https://www.anthropic.com/claude) on behalf of William Jacoby ([bonelifer](https://github.com/bonelifer)). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which articles are in which category is now kept in a table (
wiki_category_member). It is worked out from an article's rendered live version whenever that changes, and for every article that uses a template when the template changes. That gives:[[Category:Stubs]]inside a template's<includeonly>lists every article using it in Stubs.[[Category:Name|Key]]files the article under Key. The parser now keeps the key.[[:Category:Name]]: a plain link to the category page that doesn't put the article in it.Existing articles are filled in by a cron task, 50 at a time, after the update. Until it finishes, the category lists read the articles' text as before. The table uses a numeric key, since two names would make too long a key for SQL Server.
Claude tested it:
[[:Category:...]]link, and a move taking the memberships along. Found and fixed: a category whose only member was a sub-category showed the "create" page.Investigated and written by Claude on behalf of William Jacoby (bonelifer).
🤖 Generated with Claude Code