[PR #593] [MERGED] #541 - Disable comments #5676

Closed
opened 2026-02-05 10:13:54 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/593
Author: @Abijeet
Created: 11/15/2017
Status: Merged
Merged: 12/7/2017
Merged by: @ssddanbrown

Base: masterHead: disable-comments


📝 Commits (4)

  • 0b967d8 Merge pull request #2 from BookStackApp/master
  • 6bb7b54 Added code in the settings to disable comments. Based on that hiding the comments section on the page display.
  • 7a5bd23 Added language translation for the new settings icons.
  • 6a54733 Adding testcases for comments disable / enable setting.

📊 Changes

15 files changed (+69 additions, -9 deletions)

View changed files

📝 app/Http/Controllers/PageController.php (+7 -1)
📝 resources/lang/de/settings.php (+2 -0)
📝 resources/lang/en/settings.php (+2 -0)
📝 resources/lang/es/settings.php (+2 -0)
📝 resources/lang/fr/settings.php (+2 -1)
📝 resources/lang/it/settings.php (+2 -1)
📝 resources/lang/ja/settings.php (+3 -1)
📝 resources/lang/nl/settings.php (+2 -0)
📝 resources/lang/pl/settings.php (+2 -0)
📝 resources/lang/pt_BR/settings.php (+2 -0)
📝 resources/lang/ru/settings.php (+2 -0)
📝 resources/lang/sk/settings.php (+2 -0)
📝 resources/views/pages/show.blade.php (+6 -5)
📝 resources/views/settings/index.blade.php (+5 -0)
tests/Entity/CommentSettingTest.php (+28 -0)

📄 Description

Towards #541

Following has been done,

  1. Added an option under app settings - Disable comments
  2. If this is turned on then,
    1. Adding comments is disabled.
    2. Existing comments will not be shown.
    3. The entire comments section is removed and no message is shown stating that comments are disabled.

Two things are debatable here,

  1. Do we show a message stating that comments are disabled? Not sure if it's needed, but can be easily added.
  2. Do we show existing comments? I removed them to save an extra query to fetch the comments.

TODO

  • Add test cases for this option.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/593 **Author:** [@Abijeet](https://github.com/Abijeet) **Created:** 11/15/2017 **Status:** ✅ Merged **Merged:** 12/7/2017 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `master` ← **Head:** `disable-comments` --- ### 📝 Commits (4) - [`0b967d8`](https://github.com/BookStackApp/BookStack/commit/0b967d84ad1ed630fc72974afa3351461881e9ba) Merge pull request #2 from BookStackApp/master - [`6bb7b54`](https://github.com/BookStackApp/BookStack/commit/6bb7b5465fd5d62693723f75151b4dcc1914bad7) Added code in the settings to disable comments. Based on that hiding the comments section on the page display. - [`7a5bd23`](https://github.com/BookStackApp/BookStack/commit/7a5bd239090732a1fb0f47e81c52325b307b7842) Added language translation for the new settings icons. - [`6a54733`](https://github.com/BookStackApp/BookStack/commit/6a54733f2be8d09ee8d908e378eaa00a4dccf39d) Adding testcases for comments disable / enable setting. ### 📊 Changes **15 files changed** (+69 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `app/Http/Controllers/PageController.php` (+7 -1) 📝 `resources/lang/de/settings.php` (+2 -0) 📝 `resources/lang/en/settings.php` (+2 -0) 📝 `resources/lang/es/settings.php` (+2 -0) 📝 `resources/lang/fr/settings.php` (+2 -1) 📝 `resources/lang/it/settings.php` (+2 -1) 📝 `resources/lang/ja/settings.php` (+3 -1) 📝 `resources/lang/nl/settings.php` (+2 -0) 📝 `resources/lang/pl/settings.php` (+2 -0) 📝 `resources/lang/pt_BR/settings.php` (+2 -0) 📝 `resources/lang/ru/settings.php` (+2 -0) 📝 `resources/lang/sk/settings.php` (+2 -0) 📝 `resources/views/pages/show.blade.php` (+6 -5) 📝 `resources/views/settings/index.blade.php` (+5 -0) ➕ `tests/Entity/CommentSettingTest.php` (+28 -0) </details> ### 📄 Description Towards #541 Following has been done, 1. Added an option under app settings - **Disable comments** 2. If this is turned **on** then, 1. Adding comments is disabled. 2. Existing comments will not be shown. 3. The entire comments section is removed and no message is shown stating that comments are disabled. Two things are debatable here, 1. _Do we show a message stating that comments are disabled?_ Not sure if it's needed, but can be easily added. 2. _Do we show existing comments?_ I removed them to save an extra query to fetch the comments. ### TODO - [x] Add test cases for this option. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:13:54 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5676