inherit
239943
0
Apr 20, 2019 2:21:07 GMT -8
jrj84105
136
December 2016
jrj84105
|
Post by jrj84105 on Jan 7, 2017 20:05:35 GMT -8
I'd like something similar to the "Post Options Dropout" plugin that in the Create Thread interface pulls "label" out from the actions "cog" dropdown. If this plugin could also require the poster to apply a label, that would be great. Thanks.
|
|
inherit
239943
0
Apr 20, 2019 2:21:07 GMT -8
jrj84105
136
December 2016
jrj84105
|
Post by jrj84105 on Jan 20, 2017 12:05:16 GMT -8
Any takers?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 20, 2017 14:48:04 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.
|
|
inherit
239943
0
Apr 20, 2019 2:21:07 GMT -8
jrj84105
136
December 2016
jrj84105
|
Post by jrj84105 on Jan 20, 2017 17:56:19 GMT -8
Thanks.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 20, 2017 18:33:19 GMT -8
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>
|
|
inherit
239943
0
Apr 20, 2019 2:21:07 GMT -8
jrj84105
136
December 2016
jrj84105
|
Post by jrj84105 on Jan 23, 2017 11:32:33 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. I'm a special kind of stupid. I noticed that I had accidentally installed the dropout plugin twice, one with the "report" button and one with the "labels" button dropped out. So I deleted the "report" version and clicked the "report user" option on the remaining instance. I somehow lost the label dropout function in the process. What did I do?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 23, 2017 16:10:47 GMT -8
If you're looking for both buttons then it might be worth mentioning that those two buttons would not normally be seen together, the labels appear only when creating a post and the reportPost button appears only when viewing a post. If that is not what is occurring then I would need to create an account since the reportPost function is not something available to a guest (I can see the labels menu just fine when posting as a guest in your visitors board) Edit: jrj84105 are you still needing assistance with this?
|
|
inherit
239943
0
Apr 20, 2019 2:21:07 GMT -8
jrj84105
136
December 2016
jrj84105
|
Post by jrj84105 on Jan 24, 2017 11:47:57 GMT -8
No- just looking in the wrong place.
|
|
SafeInSanity
Junior Member
Falling in love with Proboards again!
Posts: 424
inherit
23917
0
Feb 27, 2020 11:29:13 GMT -8
SafeInSanity
Falling in love with Proboards again!
424
May 2004
wiki
|
Post by SafeInSanity on Jul 16, 2018 13:20:24 GMT -8
You can make it mandatory by adding the following code to the bottom of your posting page template <script> (function () { /* Mandatory thread labels (requires post option dropout) */ $(document).on('formcreate', function (ev) { var form_data = $(ev.target).data('form') if ($('input[name=labels]', form_data.element).length){ form_data.options.validations.push({ field: "labels", name: "exists", message: "You must select a label for this thread", opts: { area_of_effect: ".posting-options.relocated-sub-menu" } }) } }) })() </script> You should be able to instead add it to your global header if you have multiple themes and do not want to edit multiples or simply want the feature on every theme. This code does not work in the global header.
|
|