inherit
223758
0
Jun 10, 2020 7:15:10 GMT -8
Phear
Godzilla Saves Lives! Join the conversation at Monarch Sciences!
299
July 2015
gridlines
|
Post by Phear on May 21, 2020 9:00:29 GMT -8
Hello!
I tried searching but there were too many results to sift through given the vagueness of the words, but I'm looking for a plugin that will force users on certain boards to apply a label to their thread to help organize so users know the general theme of the thread.
EXAMPLE: It's an automotive forum, and I want users to label their threads as "Off-Road" or "Street" for their builds, but only on select boards. Is there a plugin for this?
Also, I know that there are thread labels built into the system, but I'd like them to be forced on certain boards, and more prevalent for users to access. Hitting the gear icon and then the drop-down is a bit more work than I'd like for people...
Thanks so much!
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,285
January 2004
todge
|
Post by Todge on Jun 4, 2020 7:21:59 GMT -8
Hello! I tried searching but there were too many results to sift through given the vagueness of the words, but I'm looking for a plugin that will force users on certain boards to apply a label to their thread to help organize so users know the general theme of the thread. EXAMPLE: It's an automotive forum, and I want users to label their threads as "Off-Road" or "Street" for their builds, but only on select boards. Is there a plugin for this? Also, I know that there are thread labels built into the system, but I'd like them to be forced on certain boards, and more prevalent for users to access. Hitting the gear icon and then the drop-down is a bit more work than I'd like for people... Thanks so much! I have a couple of plugins that may help.. Searchable Thread LabelsPersonal Thread LabelNeither will force the member to add a label, but if one of them fits, that could be added.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,854
December 2005
horace
|
Post by Chris on Jun 4, 2020 20:47:23 GMT -8
The Post Options Plugin already has the capability to pull the labels menu out of the cog menu (available only on posting page, elsewhere it is in actions menu instead) just go to the advanced tab and create an entry with the following values The plugin obviously will not make it mandatory to enter a label though. You can make it mandatory by adding the following code to the bottom of your posting page template[1] board or global footer <script type="text/x-javascript"> (function () { /* Mandatory thread labels (requires the post options dropout plugin) */ $(document).on('formcreate', function (ev) { var form_data = $(ev.target).data('form'), label_input = $('input[name=labels]', form_data.element), postPageManager = proboards.postPageManager, labels_menu $(() => {
if (postPageManager.fields) { if (postPageManager.fields.$labels && postPageManager.fields.$labels.length && !postPageManager.applied_effects.labels) { form_data.options.validations.push({ field: "labels", name: "label_exists", message: "You must select a label for this thread", opts: { area_of_effect: ".posting-options.relocated-sub-menu" }
}) } } else if (pb.data('quick_reply') && ev.target.classList.contains("form_post_quick_reply") && (labels_menu = pb.data('labels_menu')) && pb.data('labels_applied').length === 0) { form_data.element.append(labels_menu = $(labels_menu)) labels_menu.wrap('<div style="float:right;" class="label-container relocated-label" />').selectMenu({ status: 'Add Label', updateInput: (label_input = $('<input type="hidden" name="labels" />').appendTo(form_data.element)), menuOptions: { click: function (e, t) { ; $(t.item).parents(".select_menu_list").data("selectMenu").option("updateInput").val($(t.item).data("id")) } } }).find('.default-menu-option').hide(); form_data.options.validations.push({ field: "labels", name: "label_exists", message: "You must select a label for this thread", opts: { area_of_effect: ".label-container.relocated-label" }
}) } }) jQuery.check_label_exists = function (value, opts) { return parseInt(label_input.val(), 10) > 0 } })
})() </script>
|
|