Skip to content

Commit b1ddf32

Browse files
boneliferclaude
andauthored
Plan optional first-view-only counting in TODO (#1)
Add an opt-in setting to count only the first view of a topic per session, since phpBB's own repeat-view check misses ?t=N and ?p=N links and matches the wrong topic. Also point the waiting item at the filed ticket (PHPBB-17745) and core pull request (phpbb/phpbb#7092). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 069fba3 commit b1ddf32

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎docs/TODO.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
## Waiting on phpBB
44

5-
- File the tracker ticket for [`core.viewtopic_modify_view_counter_update`](events/viewtopic_modify_view_counter_update.txt) and open the phpBB core pull request.
5+
- Wait for [`core.viewtopic_modify_view_counter_update`](events/viewtopic_modify_view_counter_update.txt) to be merged: tracker ticket [PHPBB-17745](https://tracker.phpbb.com/browse/PHPBB-17745), pull request [phpbb/phpbb#7092](https://github.com/phpbb/phpbb/pull/7092).
66
- Once a phpBB release includes the event, raise the minimum phpBB version in `composer.json` and `ext.php` to that release.
77

88
## Build the extension
99

1010
- Listener on `core.viewtopic_modify_view_counter_update` that sets `update_view_counters` to false when any of the rules below apply.
1111
- `u_viewcountexempt` user permission ("Views do not count"), no one has it by default.
12-
- ACP settings (both off by default, so nothing changes until an admin turns them on):
12+
- ACP settings (all off by default, so nothing changes until an admin turns them on):
1313
- Topic authors don't add views to their own topics (`topic_data['topic_poster']`).
1414
- Administrators don't add views.
15+
- Optional: count only the first view of a topic in a session. phpBB's own repeat-view check looks for `'&t=' . $topic_id` in `session_page`, so reloads of `viewtopic.php?t=N` and `viewtopic.php?p=N` (the links phpBB itself makes) count every time, and a view of topic 1 right after topic 12 is skipped. A maintainer said in [PHPBB-16989](https://tracker.phpbb.com/browse/PHPBB-16989) that counting every view is intended, so this would be opt-in. Matching `t=` as a whole value and mapping `p=` to its topic would fix both cases.
1516
- Decide whether exempt views should still add to inline attachment download counts (the event allows counting one but not the other).
1617
- Migration for the permission and config values, ACP module and language strings.
1718
- Unit tests for the listener and a runtime check on a seed-forum test board.

0 commit comments

Comments
 (0)