Skip to content

Node.js based forum software built for the modern web

feat: add topic templates per category, closes #13649

Barış Soner Uşaklı0311b98ed7d9
diff --git a/install/package.json b/install/package.json
index 6a5457e093..9e94fa1ed3 100644
--- a/install/package.json
+++ b/install/package.json
@@ -97,7 +97,7 @@
"multer": "2.0.2",
"nconf": "0.13.0",
"nodebb-plugin-2factor": "7.5.10",
- "nodebb-plugin-composer-default": "10.3.0",
+ "nodebb-plugin-composer-default": "10.3.1",
"nodebb-plugin-dbsearch": "6.3.2",
"nodebb-plugin-emoji": "6.0.3",
"nodebb-plugin-emoji-android": "4.1.1",
diff --git a/public/language/en-GB/admin/manage/categories.json b/public/language/en-GB/admin/manage/categories.json
index d66dd814a1..7532cd9cd1 100644
--- a/public/language/en-GB/admin/manage/categories.json
+++ b/public/language/en-GB/admin/manage/categories.json
@@ -17,6 +17,8 @@
"federatedDescription": "Federated Description",
"federatedDescription.help": "This text will be appended to the category description when queried by other websites/apps.",
"federatedDescription.default": "This is a forum category containing topical discussion. You can start new discussions by mentioning this category.",
+ "topic-template": "Topic Template",
+ "topic-template.help": "Define a template for new topics created in this category.",
"bg-color": "Background Colour",
"text-color": "Text Colour",
"bg-image-size": "Background Image Size",
diff --git a/src/views/admin/manage/category.tpl b/src/views/admin/manage/category.tpl
index 5d3b84c639..b935638ac4 100644
--- a/src/views/admin/manage/category.tpl
+++ b/src/views/admin/manage/category.tpl
@@ -46,6 +46,16 @@
</p>
</div>
+ <div class="mb-3">
+ <label class="form-label" for="cid-{category.cid}-topic-template">
+ [[admin/manage/categories:topic-template]]
+ </label>
+ <textarea id="cid-{category.cid}-topic-template" data-name="topicTemplate" class="form-control" rows="4" />{category.topicTemplate}</textarea>
+ <p class="form-text">
+ [[admin/manage/categories:topic-template.help]]
+ </p>
+ </div>
+
<div class="mb-3 d-flex justify-content-between align-items-center gap-2">
<label class="form-label" for="cid-{category.cid}-parentCid">[[admin/manage/categories:parent-category]]</label>
<div id="parent-category-selector">