Conversation
supportHello @g3ronim0 I think the only draw back to this plugin is the topic status switcher. It relies on jQuery and I’m looking to change it to make it a great plugin. 🙂 I’ve tried to create a custom form but I cannot get the status to change. This is the code I inserted in to a Topic Info template which is loaded after the reply form for single topics. <?php echo '<form method="post" action="' . esc_url(bbp_get_topic_permalink($topic_id) ) . '" name="_support_status">'; echo '<select class="support-select-status" name="_support_status" data-topicsupport="' . $topic_id . '">'; echo '<option value="1">Not Resolved</option>'; echo '<option value="2">Resolved</option>'; echo '<option value="3">Not a Support Question</option>'; echo '</select>'; echo '<button type="submit" name="_support_status">Change</button>'; echo '</form>'; ?> This looks like it should be working. I directly set the name of the selector and form as the name found in the default form with the plugin. Any ideas on how to get this working? The main thing is the loader is not accessible with assistive screen reading technology and I need the topic status drop down to act as a form. Thank you.
Hi @alexstine , Thanks for the report. I would be happy to improve the user experience. I am not an a11y expert. The main problem if i understand it, is that the dropdown is not included in <form> ? I look at it, if you can test the changes with a screen reader, it would be perfect. Let you know as soon as i make changes. Thx
Hum, think i better understand the problem… When status changed by the dropdown, nothing is sent to the screen reader, the same when the action is complete. Isn’t it ? If this is the case, i think wp.a11y.speak can do the job. I looking for a solution.
Can you test the changes made on this branch with a screen reader. Thank you.
Hello @g3ronim0 The changes you made certainly improved things by a lot and I appreciate the work. I would still like to convert it to a regular form that uses a submit button and here’s why. After you switch to “Resolved” or “Not Resolved” the page does not refresh which leaves the title the same at “[Support request] or [Resolved] and I feel this could be confusing to some users. If the form submits plus the page refreshes, it will show the new label at the top of the page. The other point is if some people don’t have JavaScript enabled in their browsers, it will be a problem for them. I honestly like running a lightweight website and each extra JavaScript file no matter how big slows it down. I really don’t want to have to use any extra JavaScript. I hope this makes sense. Thank you.
Yes, this makes sense. I’ll see if i change completely the form, or if i do a no-js fallback. I put it in my roadmap, thanks.
Hello, Yep, just a plane simple form is needed. Stay away from JavaScript with screen readers. That is ultimately the best way to do it. In the future I’d like to see 2 settings. 1. Form using js. 2. Plane HTML form. If you can write up an example of the plane HTML form for me, that would be great. The drop down as it is right now I will not include on my live site. Anyway you can create a plane form? You don’t even have to hook it in to the admin links, I’ll do the custom placement, I just need the form that submits the values and works to change the topic status.
I agree, it would be perfect to have the 2 solutions. For the html form is not that simple. Currently it is processed only by AJAX, so i need to add a fallback to work without AJAX.
Hello @g3ronim0 I hope you can get it done fairly soon. This is the only plugin on the market that is being supported and I don’t want to deploy to my live site without an HTML form. I will probably do a half deployment and exclude the form until you are able to make it work with an HTML form. Thanks.
I’m doing my best on my free time. FYI this isn’t a market but a community directory. Stay tuned.
I think i have a no-js version, can you try this version . Go to Settings > forums > Buddy-bbPress Support Topic > AJAX Submissions to disable AJAX requests. Tell me if you see any issues or improvements. I have to fix another bug before updating the plugin on the repo, you can use this version in the meantime. 😉
Now in AJAX version, the title prefix is updated after request.
Hello @g3ronim0 , The ajax is updating as expected and now changing the title. I could however not find the new setting that you added. Looked all over WordPress admin but it is just no where to be found. No other plugins active but bbPress. Thanks.
Hi @alexstine Sorry I forgot the permissions in bbpress admin screen, you can try it now. This reply was modified 9 years, 1 month ago by G3ronim0 .
Hello @g3ronim0 , That is awesome, works just fine without any issues. 🙂 I give it a +1 . I have just one more question. I have a topic status section of my website in a custom table I coded, can I change where the form appears or is there a function I can call to make the form display in my custom template? Thanks.
Thanks Alex, you can try : bpbbpst_get_selecbox() , i didn’t test that. Best regards.
Hello, In case anyone else is wondering, this will get it done for you in a custom template. $support_status = get_post_meta( $topic_id, '_bpbbpst_support_topic', true ); $topic_id = bbp_get_topic_id(); echo bpbbpst_get_selectbox($support_status, $topic_id); Thanks @g3ronim0 things are working out quite well currently. Just one last question, I’ve modified the form a bit so it shows “Not a support topic” in the drop down for my custom forum, is there anyway to make the drop down show “Not a Support Topic” if that’s what the current status is? You can select it and change it already, it just won’t show if it’s the currently selected status, it shows “Support request” instead. Thanks for your help.
Hello @g3ronim0 This is how I modified my functions.php file to show “Not a Support Topic” option. https://bitbucket.org/snippets/the-news-triangle/yAk5q Hopefully that helps you to see the issue with the form not selecting the “Not a Support Topic” value when that’s the current topic status. That is ultimately the goal. If “Not a Support Topic”, the select box should show that. Thanks.
Thank you @alexstine . I look at it during the weekend, not the time before.
That’s fine, no rush. Just wanted to make sure you had all the information you needed. 🙂 Thanks.
Hello @g3ronim0 Just checking up here again to make sure this thread hadn’t gone out of sight. Any update? Thanks. 🙂
Hi, nope thread hasn’t gone…just not enough time this week. And many updates in my todo. 😉
Hello @g3ronim0 Any updates here? Thanks.
Hi @alexstine , Thanks for the report. I would be happy to improve the user experience. I am not an a11y expert. The main problem if i understand it, is that the dropdown is not included in <form> ? I look at it, if you can test the changes with a screen reader, it would be perfect. Let you know as soon as i make changes. Thx
Hum, think i better understand the problem… When status changed by the dropdown, nothing is sent to the screen reader, the same when the action is complete. Isn’t it ? If this is the case, i think wp.a11y.speak can do the job. I looking for a solution.
Can you test the changes made on this branch with a screen reader. Thank you.
Hello @g3ronim0 The changes you made certainly improved things by a lot and I appreciate the work. I would still like to convert it to a regular form that uses a submit button and here’s why. After you switch to “Resolved” or “Not Resolved” the page does not refresh which leaves the title the same at “[Support request] or [Resolved] and I feel this could be confusing to some users. If the form submits plus the page refreshes, it will show the new label at the top of the page. The other point is if some people don’t have JavaScript enabled in their browsers, it will be a problem for them. I honestly like running a lightweight website and each extra JavaScript file no matter how big slows it down. I really don’t want to have to use any extra JavaScript. I hope this makes sense. Thank you.
Yes, this makes sense. I’ll see if i change completely the form, or if i do a no-js fallback. I put it in my roadmap, thanks.
Hello, Yep, just a plane simple form is needed. Stay away from JavaScript with screen readers. That is ultimately the best way to do it. In the future I’d like to see 2 settings. 1. Form using js. 2. Plane HTML form. If you can write up an example of the plane HTML form for me, that would be great. The drop down as it is right now I will not include on my live site. Anyway you can create a plane form? You don’t even have to hook it in to the admin links, I’ll do the custom placement, I just need the form that submits the values and works to change the topic status.
I agree, it would be perfect to have the 2 solutions. For the html form is not that simple. Currently it is processed only by AJAX, so i need to add a fallback to work without AJAX.
Hello @g3ronim0 I hope you can get it done fairly soon. This is the only plugin on the market that is being supported and I don’t want to deploy to my live site without an HTML form. I will probably do a half deployment and exclude the form until you are able to make it work with an HTML form. Thanks.
I’m doing my best on my free time. FYI this isn’t a market but a community directory. Stay tuned.
I think i have a no-js version, can you try this version . Go to Settings > forums > Buddy-bbPress Support Topic > AJAX Submissions to disable AJAX requests. Tell me if you see any issues or improvements. I have to fix another bug before updating the plugin on the repo, you can use this version in the meantime. 😉
Now in AJAX version, the title prefix is updated after request.
Hello @g3ronim0 , The ajax is updating as expected and now changing the title. I could however not find the new setting that you added. Looked all over WordPress admin but it is just no where to be found. No other plugins active but bbPress. Thanks.
Hi @alexstine Sorry I forgot the permissions in bbpress admin screen, you can try it now. This reply was modified 9 years, 1 month ago by G3ronim0 .
Hello @g3ronim0 , That is awesome, works just fine without any issues. 🙂 I give it a +1 . I have just one more question. I have a topic status section of my website in a custom table I coded, can I change where the form appears or is there a function I can call to make the form display in my custom template? Thanks.
Thanks Alex, you can try : bpbbpst_get_selecbox() , i didn’t test that. Best regards.
Hello, In case anyone else is wondering, this will get it done for you in a custom template. $support_status = get_post_meta( $topic_id, '_bpbbpst_support_topic', true ); $topic_id = bbp_get_topic_id(); echo bpbbpst_get_selectbox($support_status, $topic_id); Thanks @g3ronim0 things are working out quite well currently. Just one last question, I’ve modified the form a bit so it shows “Not a support topic” in the drop down for my custom forum, is there anyway to make the drop down show “Not a Support Topic” if that’s what the current status is? You can select it and change it already, it just won’t show if it’s the currently selected status, it shows “Support request” instead. Thanks for your help.
Hello @g3ronim0 This is how I modified my functions.php file to show “Not a Support Topic” option. https://bitbucket.org/snippets/the-news-triangle/yAk5q Hopefully that helps you to see the issue with the form not selecting the “Not a Support Topic” value when that’s the current topic status. That is ultimately the goal. If “Not a Support Topic”, the select box should show that. Thanks.
Thank you @alexstine . I look at it during the weekend, not the time before.
That’s fine, no rush. Just wanted to make sure you had all the information you needed. 🙂 Thanks.
Hello @g3ronim0 Just checking up here again to make sure this thread hadn’t gone out of sight. Any update? Thanks. 🙂
Hi, nope thread hasn’t gone…just not enough time this week. And many updates in my todo. 😉
Hello @g3ronim0 Any updates here? Thanks.