feat: add topic templates per category, closes #13649

This commit is contained in:
Barış Soner Uşaklı
2025-09-10 09:46:39 -04:00
parent 527f27af29
commit 0311b98ed7
3 changed files with 13 additions and 1 deletions

View File

@@ -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",

View File

@@ -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",

View File

@@ -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">