[3.0] Theme split (wave 4, part 23) — give the two indexes one copy of the board list loop - #9451
Merged
live627 merged 1 commit intoAug 10, 2026
Conversation
BoardIndex.template.php and MessageIndex.template.php each carried their own copy of the loop that draws a list of boards - the one calling the template_bi_* helpers for the icon, info, stats, last post and children. The two were identical, 32 lines apiece, differing only in the array they walked and in how deeply the emitted HTML was indented. It becomes template_bi_board_list(), living beside the helpers it calls. MessageIndex already loads BoardIndex for those helpers, so there is nothing new to load; SimpleMachines#9403 shared the helpers, this shares the loop that calls them. Markup is untouched. The theme branch renames these classes - up_contain to board_container, info to board_info, lastpost to board_lastpost - but that needs its index.css slice to come with it, so this keeps what is there. Board index and the child board list on a board with children both render identically, compared as normalised HTML. Signed-off-by: Mathias Albert <mathiaspapealbert@hotmail.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
albertlast
force-pushed
the
3.0/theme-shared-board-list
branch
from
August 9, 2026 14:56
1faa2a6 to
fffe000
Compare
Closed
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.
Description
BoardIndex.template.phpandMessageIndex.template.phpeach carried their own copy of the loop that draws a list of boards — the one calling thetemplate_bi_*helpers for the icon, info, stats, last post and children.The two were identical. 32 lines apiece, and once leading whitespace is ignored the only difference is the array they walk:
It becomes
template_bi_board_list(), living beside the helpers it calls.MessageIndex::setupTemplate()already loadsBoardIndexfor those helpers, so there is nothing new to load. #9403 shared the helpers; this shares the loop that calls them.Markup is untouched
The theme branch renames these classes on the way past —
up_contain→board_container,info→board_info,lastpost→board_lastpost— and wraps the whole thing differently. That needs itsindex.cssslice to come with it, so this keeps exactly what is onrelease-3.0today and moves nothing but the loop.Verification
Rendered output of the board index (
#boardindex_table) and of the child board list on a board that has children (?board=1.0), captured before and after and compared as normalised HTML:#boardindex_table#board_1_childboardsWhitespace is collapsed for that comparison, because the two copies indented their output differently and the shared one has to pick a single indentation. The DOM is the same; only the literal indentation inside the message index's copy shifts.
The
template_bi_redirect_*branch is moved verbatim but not exercised — there is no redirect board on the test install.Issues References (Fixes|Related|Closes)
Related: #9403, #7933