Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint

# PHP syntax check on the lowest PHP version this extension supports and the
# newest one phpBB 3.3 supports. tests.yml runs the tests, code sniffer and
# EPV on phpBB 3.3 and 4.0.
on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
lint:
name: PHP ${{ matrix.php }} lint
runs-on: ubuntu-24.04
strategy:
matrix:
php: ['7.4', '8.4']
steps:
- uses: actions/checkout@v4

- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2

- name: PHP syntax check
run: find . -name '*.php' -not -path './.git/*' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l

- name: Validate composer.json
run: composer validate --no-check-all --no-check-publish
45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
# phpBB 3.3.x compatibility
call-tests-3-3-x:
name: Extension tests (phpBB 3.3.x)
uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@3.3.x
with:
EXTNAME: phpbbmodders/seenotes
# EPV runs in the epv job below instead
EPV: 0
PHPBB_BRANCH: '3.3.x'
RUN_FUNCTIONAL_TESTS: 0
PRIMARY_PHP_VERSION: '7.4'
PHP_VERSION_MATRIX: '["7.4", "8.0", "8.1", "8.2"]'

# phpBB 4.0 (master) compatibility
call-tests-master:
name: Extension tests (phpBB master / 4.0)
uses: phpbb-extensions/test-framework/.github/workflows/tests.yml@master
with:
EXTNAME: phpbbmodders/seenotes
# EPV runs in the epv job below instead
EPV: 0
PHPBB_BRANCH: 'master'
RUN_FUNCTIONAL_TESTS: 0
PRIMARY_PHP_VERSION: '8.2'
PHP_VERSION_MATRIX: '["8.2", "8.3", "8.4"]'

# EPV (Extension Pre Validator), failing on any Fatal or Error finding not
# listed in .github/epv-allowed.txt
epv:
uses: phpbbmodders/.github/.github/workflows/epv.yml@v1
with:
EXTNAME: phpbbmodders/seenotes
PHPBB_BRANCHES: '["3.3.x", "master"]'
45 changes: 35 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,45 @@
admin KbTest1234!
# See Notes

[![Tests](https://github.com/phpbbmodders/seenotes/actions/workflows/tests.yml/badge.svg)](https://github.com/phpbbmodders/seenotes/actions/workflows/tests.yml) [![Lint](https://github.com/phpbbmodders/seenotes/actions/workflows/lint.yml/badge.svg)](https://github.com/phpbbmodders/seenotes/actions/workflows/lint.yml)

Lets moderators mark a member with a staff-only reason from a list the administrators set, and keep dated notes under each reason.

> **Status: design stage.** There is no code yet. The planned behavior is in [`docs/design.md`](docs/design.md).
## Features

- **ACP → Extensions → See Notes → Reasons**: administrators set up the list of reasons, each with a description, a color, and an on/off switch. Seven starter reasons (Moderation queue, Spam watch, Warez, Conduct, Possible returning member, Staff in contact, General) are added on first enable, ready to edit or remove. A switched-off reason can't be given any more, but members who have it keep it and its notes.
- **MCP → Moderator notes** and **ACP → Manage users → Moderator notes**: give a member a reason, choose which reason is current (or none), and add notes under each reason.
- **Notes use BBCode**, smilies and links, following the board's private message settings, so a PM sent to the member can be pasted into a quote for other staff.
- **Only staff see it.** The current reason shows as "SEE NOTES: Moderation queue (3)" on the member's profile, next to their posts, on the MCP post, report and approval queue pages, and in the MCP topic view. It links to the notes. A member with no current reason shows "SEE NOTES: NONE", which links straight to the form that gives one.
- The member's latest **phpBB user notes** (warnings, bans and so on) show read-only on the same page.
- Separate permissions for seeing, adding, editing notes, deleting notes and deleting a reason entry, with matching administrator permissions.
- Every change goes into the moderator log. Deleting a reason with all its entries is off by default, and needs the reason's name typed to confirm.
- A member's entries and notes are deleted with the member.

The full design is in [`docs/design.md`](docs/design.md).

## Planned features
## Screenshots

- Administrators set up the list of reasons in the ACP, and can switch each one on or off.
- Moderators give a member one or more reason entries, each with its own notes, and choose which one is current.
- The current reason shows in the member's profile and mini-profile, only to staff with permission.
- Separate permissions for seeing, managing, editing notes, deleting notes and deleting entries.
- Every change goes into the moderator log.
<table>
<tr>
<td><a href="docs/images/screenshots/seenotes-mcp-notes.png"><img src="docs/images/screenshots/seenotes-mcp-notes.png" width="440" height="591" alt="MCP Moderator notes page for a member"></a></td>
<td><a href="docs/images/screenshots/seenotes-mcp-post.png"><img src="docs/images/screenshots/seenotes-mcp-post.png" width="440" height="300" alt="MCP post details with a SEE NOTES notice"></a><br><br><a href="docs/images/screenshots/seenotes-viewtopic.png"><img src="docs/images/screenshots/seenotes-viewtopic.png" width="440" height="58" alt="The reason in a post's mini-profile"></a><br><br><a href="docs/images/screenshots/seenotes-profile-none.png"><img src="docs/images/screenshots/seenotes-profile-none.png" width="440" height="113" alt="SEE NOTES: NONE on a profile"></a></td>
</tr>
</table>

Click an image for the full size. All screenshots, with captions: [docs/images/screenshots](docs/images/screenshots/README.md).

## Requirements

- phpBB 3.3.19 or later, including phpBB 4.0
- PHP 7.4 or later (phpBB 4.0 itself needs PHP 8.2 or later)
- phpBB 3.3.19 or later, including phpBB 4.0 (tested on its 4.0.0-a3 development version)
- PHP 8.3.36 or later

## Installation

1. Copy the extension to `/ext/phpbbmodders/seenotes`
2. In the Administration Control Panel, go to **Customise → Manage extensions**
3. Enable the **See Notes** extension
4. Review the starter reasons under **Extensions → See Notes → Reasons**, and add, rename or switch off any you like

## Contributing

Expand All @@ -27,7 +51,8 @@ Contributions are welcome!

## Acknowledgments

- Design written with [Claude](https://www.anthropic.com/claude).
- Design reviewed by [kaileymsnay](https://github.com/kaileymsnay), who asked for BBCode in notes.
- Code, tests and documentation written with [Claude](https://www.anthropic.com/claude).

## License

Expand Down
37 changes: 37 additions & 0 deletions acp/main_info.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
*
* See Notes extension for the phpBB Forum Software package
*
* @copyright (c) 2026, phpBB Modders, https://www.phpbbmodders.com/
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/

namespace phpbbmodders\seenotes\acp;

/**
* ACP module information
*/
class main_info
{
public function module()
{
return [
'filename' => '\phpbbmodders\seenotes\acp\main_module',
'title' => 'ACP_SEENOTES',
'modes' => [
'reasons' => [
'title' => 'ACP_SEENOTES_REASONS',
'auth' => 'ext_phpbbmodders/seenotes && acl_a_seenotes_settings',
'cat' => ['ACP_SEENOTES'],
],
'settings' => [
'title' => 'ACP_SEENOTES_SETTINGS',
'auth' => 'ext_phpbbmodders/seenotes && acl_a_seenotes_settings',
'cat' => ['ACP_SEENOTES'],
],
],
];
}
}
Loading
Loading