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
30 changes: 21 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
.github export-ignore
.gitignore export-ignore
.gitattributes export-ignore
build.xml export-ignore
composer.lock export-ignore
phpunit.xml.* export-ignore
scripts export-ignore
tests export-ignore
README.MD export-ignore
# Shared line endings and binary files
* text=auto eol=lf

# Never convert line endings in binary files
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.webp binary
*.ico binary

.github/ export-ignore
.gitignore export-ignore
.gitattributes export-ignore
build.xml export-ignore
composer.lock export-ignore
phpunit.xml.* export-ignore
scripts/ export-ignore
tests/ export-ignore
README.md export-ignore
docs/images/ export-ignore
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 phpBB's own checks (code
# sniffer, EPV) on phpBB 3.3 with PHP 8.3.
on:
push:
branches:
- master
pull_request:
branches:
- master

permissions:
contents: read

jobs:
lint:
name: PHP ${{ matrix.php }} lint
runs-on: ubuntu-24.04
strategy:
matrix:
php: ['8.3', '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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/build/
/build/
/vendor/
16 changes: 0 additions & 16 deletions README.MD

This file was deleted.

62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Print All Posts

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

Lets users who can print topics in a forum print every post in a topic on one page.

## Features

- Adds a **Print all** link to the **Topic tools** menu, next to phpBB's own **Print view**. It opens in a new tab.
- phpBB's print view shows one page of posts at a time. **Print all** shows every post in the topic on a single printable page.
- Uses phpBB's existing **Can print topic** forum permission. Users without it don't see the link and can't open the page.

## Screenshots

<table>
<tr>
<td align="center"><a href="docs/images/screenshots/printallposts-topic-tools.png"><img src="docs/images/screenshots/printallposts-topic-tools.png" width="440" height="79" alt="The Print all link in the Topic tools menu, under Print view"></a><br>Print all in the Topic tools menu</td>
<td align="center"><a href="docs/images/screenshots/printallposts-print.png"><img src="docs/images/screenshots/printallposts-print.png" width="440" height="226" alt="The print page showing all four posts of a topic that spans two pages"></a><br>Every post on one printable page</td>
</tr>
</table>

Click a screenshot for the full size.

## Requirements

- phpBB 3.3.19 or later
- PHP 8.3.36 or later

## Installation

1. Copy the extension to `/ext/phpbbmodders/printallposts`
2. In the Administration Control Panel, go to **Customise → Manage extensions**
3. Enable the **Print all posts in a topic** extension

### Upgrading from `rmcgirr83/printallposts`

This extension used to be Rich McGirr's `rmcgirr83/printallposts`. To move to this version:

1. Disable the old **Print all posts in a topic** extension in the ACP. Do **not** delete its data.
2. Upload this version to `/ext/phpbbmodders/printallposts` and enable it. The new version won't enable while the old one is still on, and it removes the old extension's entry from the extension list when it is enabled.
3. Delete the `/ext/rmcgirr83/printallposts` folder and purge the board cache.

If you disable the old extension from the command line (`bin/phpbbcli.php`) instead of the ACP, run `bin/phpbbcli.php cache:purge` before enabling the new one; the command-line disable doesn't clear the cache.

## Contributing

Contributions are welcome!

- **Bug reports**: [Open an issue](https://github.com/phpbbmodders/printallposts/issues).
- **Everything else** (questions, feature requests, ideas, general discussion): [Use Discussions](https://github.com/orgs/phpbbmodders/discussions), or the [community forum](https://www.phpbbmodders.com/community/).
- Pull requests are welcome for bug fixes or discussed features.

## Acknowledgments

- Extension by Rich McGirr ([RMcGirr83](https://github.com/rmcgirr83)).
- Documentation assisted by [Claude](https://www.anthropic.com/claude).

## License

This extension is licensed under the **GNU General Public License v2.0**.

See [license.txt](license.txt) for more information.
84 changes: 42 additions & 42 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"name": "phpbbmodders/printallposts",
"type": "phpbb-extension",
"description": "Allows users, if they have the print topic permission for the forum the topic is located, to be able to print view all posts in a topic.",
"homepage": "https://www.phpbbmodders.com/",
"version": "1.0.4",
"time": "2026-10-22",
"keywords": [
"phpbb",
"extension",
"print all posts in a topic",
"communication"
],
"license": "GPL-2.0-only",
"authors": [
{
"name": "phpBB Modders",
"email": "board@phpbbmodders.com",
"homepage": "https://www.phpbbmodders.com/",
"role": "Extension Developer"
},
{
"name": "Rich McGirr",
"role": "Past Developer"
}
],
"require": {
"php": ">=8.3.36",
"composer/installers": "~1.0.0"
},
"extra": {
"display-name": "Print all posts in a topic",
"soft-require": {
"phpbb/phpbb": ">=3.3.19,<4.0.0@dev"
},
"version-check": {
"host": "www.phpbb.com",
"directory": "/customise/db/extension/print_all_posts_in_a_topic",
"filename": "version_check",
"ssl": true
}
}
{
"name": "phpbbmodders/printallposts",
"type": "phpbb-extension",
"description": "Lets users who can print topics in a forum print every post in a topic on one page.",
"homepage": "https://www.phpbbmodders.com/",
"version": "1.0.4",
"time": "2026-10-22",
"keywords": [
"phpbb",
"extension",
"print all posts in a topic",
"communication"
],
"license": "GPL-2.0-only",
"authors": [
{
"name": "phpBB Modders",
"email": "board@phpbbmodders.com",
"homepage": "https://www.phpbbmodders.com/",
"role": "Extension Developer"
},
{
"name": "Rich McGirr",
"role": "Past Developer"
}
],
"require": {
"php": ">=8.3.36",
"composer/installers": "~1.0.0"
},
"extra": {
"display-name": "Print all posts in a topic",
"soft-require": {
"phpbb/phpbb": ">=3.3.19,<4.0.0@dev"
},
"version-check": {
"host": "www.phpbb.com",
"directory": "/customise/db/extension/print_all_posts_in_a_topic",
"filename": "version_check",
"ssl": true
}
}
}
Binary file added docs/images/screenshots/printallposts-print.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions styles/prosilver/template/event/viewtopic_topic_tools_after.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if U_PRINTALLPOSTS %}
<li>
<a href="{{ U_PRINTALLPOSTS }}" target="_blank" title="{{ lang('PRINT_ALL_POSTS') }}">
<i class="icon fa-print fa-fw" aria-hidden="true"></i><span>{{ lang('PRINT_ALL_POSTS') }}</span>
</a>
</li>
{% if U_PRINTALLPOSTS %}
<li>
<a href="{{ U_PRINTALLPOSTS }}" target="_blank" title="{{ lang('PRINT_ALL_POSTS') }}">
<i class="icon fa-print fa-fw" aria-hidden="true"></i><span>{{ lang('PRINT_ALL_POSTS') }}</span>
</a>
</li>
{% endif %}
Loading