Skip to content

Add settings to show or hide each navigation link - #51

Merged
bonelifer merged 2 commits into
masterfrom
feature/nav-link-settings
Nov 2, 2026
Merged

bonelifer merged 2 commits into
masterfrom
feature/nav-link-settings

Conversation

@bonelifer

Copy link
Copy Markdown
Contributor

Contact Admin adds a "Contact us" link to both the header and the footer navigation bar, and one template variable controlled both. Fred Rimbert asked on the phpBB Modders forum for a way to keep only one of them: https://www.phpbbmodders.com/community/viewtopic.php?t=150

Changes

  • Two new settings under ACP » Extensions » Contact Admin » General options: Show link in header navigation and Show link in footer navigation.
  • New migration m6_update_data adds contactadmin_header_link and contactadmin_footer_link, both on, so boards that update see no change.
  • The listener sets S_CONTACTADMIN_HEADER_LINK and S_CONTACTADMIN_FOOTER_LINK, and the event templates in prosilver and scaffoldBB check them.
  • The contact page, and the links on failed logins and the registration page, are not affected. With both links off, the page still works at its route.
  • README features list mentions the settings.

Testing

Claude tested this branch on two boards:

  • phpBB 3.3 (SQLite, phpbb-test-board): smoke_test.py came back clean (guest and admin pages, routes, the ACP page, and the disable → delete data → enable round trip). The new Contact Admin check in feature_checks.py (phpbbmodders/phpbb-release-tools, branch feature-checks-contactadmin) passed 9/9. It saves header off, footer off and both off through the ACP form, checks which links show, checks that the contact form still loads, and checks that no other setting changed. No PHP errors were logged. On master the same check skips the new part and passes.
  • phpBB 4.0.0-a3-dev (seed-forum, branch bind-mounted): Claude saved the same three combinations in the ACP through the browser and checked the board index as a guest after each one. With both off, no contact link shows and the form still loads.

PHP lint passes on 7.4 and 8.4. Not tested: scaffoldBB in the browser (its template change is the same one-line condition), and phpBB 4.0 through the scripted check, since feature_checks.py builds 3.3 boards only.

On phpBB 4.0, each link shows up twice in the HTML. prosilver 4.0 repeats the navbar block inside its responsive "☰" menu. This already happens on master and is not changed here.


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

bonelifer and others added 2 commits November 1, 2026 18:55
The extension adds a "Contact us" link to both the header and the footer
navigation bars, and one variable controlled both. Two new ACP settings
under General options turn each link on or off separately. A new
migration adds them switched on, so boards that update see no change.
The contact page, and the links on failed logins and the registration
page, are not affected.

Requested by Fred Rimbert on the phpBB Modders forum (t=150).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bonelifer
bonelifer merged commit 39f813c into master Nov 2, 2026
6 checks passed
@bonelifer
bonelifer deleted the feature/nav-link-settings branch November 2, 2026 01:16
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