A NodeBB plugin that allows administrators and moderators to archive topics, making them read-only and hiding them from standard topic listings. Archived topics remain accessible via direct links and can be listed on a dedicated archive page.
- Archive/Unarchive Topics: Mark topics as archived with a simple button in the topic toolbar
- Read-Only Enforcement: Prevent new replies to archived topics
- Archive Listings: Dedicated
/archivepage to browse archived topics with pagination - Permission Control: Configurable permissions for who can archive topics
- Admin Control Panel: Bulk archive operations and plugin settings
- Search Integration: Optional inclusion/exclusion of archived topics in search results
npm install nodebb-plugin-archive- Clone or download this repository to your NodeBB's
node_modulesdirectory:
cd /path/to/nodebb/node_modules
git clone https://github.com/avocadoheather/nodebb-plugin-archive.git-
Install from NodeBB Admin Control Panel:
- Go to Admin Control Panel → Extend → Plugins
- Find "NodeBB Archive Plugin" and click Activate
-
Or install via command line:
./nodebb activate nodebb-plugin-archive
./nodebb restartNavigate to Admin Control Panel → Plugins → Archive to configure:
| Setting | Description | Default |
|---|---|---|
| Allow topic owners to archive | Let topic creators archive their own topics | false |
| Include archived in search | Show archived topics in search results | false |
| Auto-archive after (days) | Automatically archive topics after N days of inactivity | 0 (disabled) |
In the ACP Archive page, you can:
- Enter comma-separated topic IDs (e.g.,
123,456,789) - Click Archive or Unarchive to perform bulk operations
-
Archive a Topic:
- Open any topic
- Click the folder icon (📁) in the topic toolbar
- Topic becomes read-only and gets archived
-
Unarchive a Topic:
- Open an archived topic
- Click the open folder icon (📂) in the topic toolbar
- Topic becomes active again
-
View Archived Topics:
- Visit
/archiveon your forum - Browse paginated list of all archived topics
- Click any topic to view (read-only)
- Visit
- Archived topics are marked with visual indicators
- Cannot reply to archived topics (composer is disabled)
- Can still view archived topics via direct links
- May or may not appear in search (depends on admin setting)
All endpoints require authentication and appropriate permissions.
POST /api/v3/plugins/archive/topic/:tid
Content-Type: application/json
{
"archived": true
}Response:
{
"status": { "code": "ok", "message": "OK" },
"response": {
"tid": 123,
"archived": 1
}
}GET /api/v3/plugins/archive/topics?page=1&perPage=20&cid=5Response:
{
"status": { "code": "ok", "message": "OK" },
"response": {
"topics": [...],
"pagination": {
"page": 1,
"perPage": 20,
"total": 45
}
}
}The plugin provides these hooks for other plugins:
action:archive.topic.set- Fired when a topic is archivedaction:archive.topic.unset- Fired when a topic is unarchived
By default, the following users can archive/unarchive topics:
- Administrators (always)
- Global Moderators (always)
- Category Moderators (for topics in their categories)
- Topic Owners (if enabled in settings)
The plugin stores:
- Topic Field:
archivedflag (0 or 1) on each topic - Sorted Set:
archive:topics(ordered by last post time) - Category Sets:
archive:cid:<cid>for category-specific listings
- Ensure plugin is activated:
./nodebb plugins - Restart NodeBB:
./nodebb restart - Check NodeBB logs for errors
- Verify you have admin/moderator permissions
- Check if "Allow topic owners" setting matches your needs
- Ensure you're viewing a valid, non-deleted topic
- Verify topic IDs are correct and exist
- Check that you have permissions for all topics
- Try smaller batches if dealing with many topics
npm test- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Initial archive functionality
- Topic archiving with read-only enforcement
- Archive page and admin settings
- Bulk operations support
MIT License - see LICENSE file for details.
- Issues: GitHub Issues
- NodeBB Community: NodeBB Community Forums
- Documentation: NodeBB Plugin Development