The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
No Button Feedback ...
 
Share:
Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpDiscuz community!

Merry Christmas and Happy Holidays! πŸŽ„

Issue No Button Feedback After Clicking "Post Comment" and "Reply" Buttons

18 Posts
2 Users
0 Reactions
1,751 Views
Posts: 123
Topic starter
(@aerostar)
Estimable Member
Joined: 6 years ago

Helpful:

The attached code snippet works great with WordPress' native comment system. Please give it a spin.

Perhaps you can adapt it for your plugin?

Thank you!

code snippet wp comments button text

Β 


Reply
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

@aerostarΒ 

Use this code:Β 

    $(document).on('wpdiscuz_new_comment', function(e, btn, form, depth){
        $(btn).val("Posting...");
    })

    $(document).on('wpdiscuz_comment_posted', function(e, btn, form, commentId, commentsCount){
       $(btn).val('Post Comment');
    });

This code works if you're using wpDiscuz 7.6.29 or a higher version.


Reply
Posts: 123
Topic starter
(@aerostar)
Estimable Member
Joined: 6 years ago

Regrettably, your code does not work at my end. Tested with wpDiscuz 7.6.29, all plugins deactivated except essentials, and flushed all cache.

These are the test code snippets I used:

PHP Code Snippet: https://prnt.sc/sR0Sp3BGvxl_
JS Code Snippet: https://prnt.sc/l0YwnRKbuN-Y

Does it work at your end? How did you exactly implement it?

Thank you!


Reply
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

@aerostarΒ 

Please try adding the JS code within jQuery(document).ready(function(){}); and also try adding it directly to the theme files.

We've checked the code multiple times and it's working fine.


Reply
Posts: 123
Topic starter
(@aerostar)
Estimable Member
Joined: 6 years ago

Hi @Asti,

Perfect! Worked like a charm.

Below please find the updated code snippet.

To see the code snippet in action, please visit this post and click on "Post Comment."

I cannot thank you enough for your help, dedication, and second-to-none plugin.

To help others, perhaps you can add this to your plugin's documentation?

Have a great week.

Cheers!

---------------------------

function wpdiscuz_button_feedack_onclick() {
  if ( is_singular( 'post' ) ) {  
    ?>
        <script type="text/javascript">
  			jQuery(document).ready(function ($) {
        		
				$(document).on('wpdiscuz_new_comment', function(e, btn, form, depth){
    			$(btn).val("Posting...");
    			})

				$(document).on('wpdiscuz_comment_posted', function(e, btn, form, commentId, commentsCount){
    			$(btn).val('Post Comment');
    			});
	
		});
		</script>
    <?php
  }
}
add_action('wp_footer', 'wpdiscuz_button_feedack_onclick');

Β 


Reply
Posts: 123
Topic starter
(@aerostar)
Estimable Member
Joined: 6 years ago

One final comment ... it would be great to further modify the above code snippet to allow the display of a "ajax spinner" instead of the word "Posting..." when the "Post Comment" button is clicked. I'll work on that. If successful, I'll post it here. Cheers!


Reply
Posts: 123
Topic starter
(@aerostar)
Estimable Member
Joined: 6 years ago

Note: The use of an "ajax spinner" vs the word "Posting..." works best for websites that use plugins such as GTranslate (i.e., use a language dropdown selector). This would eliminate translation issues with the word "Posting..." Cheers!


Reply
1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

@aerostarΒ 

You can modify the code as you like.Β 


Reply
Page 2 / 2
Share: