Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

Script [Closed] Reply button automatically adds post author @nickname in editor

6 Posts
2 Users
0 Reactions
1,402 Views
xfok
Posts: 86
 xfok
Topic starter
(@xfok)
Estimable Member
Joined: 6 years ago

how can disable Reply button automatically adds post author @nickname in editor?

5 Replies
Chris
Posts: 3611
(@chris)
Famed Member
Joined: 4 years ago

Hi @xfok,

Disable Show Member Mention Nicknames option from Dashboard  >Forums > Settings > Features tab.

4 Replies
xfok
 xfok
(@xfok)
Joined: 6 years ago

Estimable Member
Posts: 86

@chrisI tried, but it disables all mention functions, for example it also removes the @nick under the username. I would just like to disable the mention when clicking the lot reply in the QeA layout

Chris
(@chris)
Joined: 4 years ago

Famed Member
Posts: 3611

@xfok,

1. Download and Install "Code Snippets" Plugin for WordPress

2. Open Dashboard > Snippets > Add New 

3. Write a Title

4. Add the Below Code, Check the "Only run on site front-end" Checkbox and press Save Changes and Activate

add_action( 'wp_footer', function () { ?>
<script>

jQuery(document).ready(function ($) {
    if (typeof wpforo_editor !== 'undefined') {
        $('#wpforo-wrap').on('click', '.wpforo-qa-comment, .wpforo-reply.wpf-action.wpforo_layout_4', function () {
			setTimeout(function(){
				wpforo_editor.set_content('', $('.wpforo-post-form').data('textareaid'));
			}, 100);
        });
		$('#wpforo-wrap').on('click', ".wpforo-reply:not(.wpforo_layout_4)", function(){
			setTimeout(function(){
           		 wpforo_editor.set_content('', wpforo_editor.get_main());
			}, 100);
        });
		
    }
});

</script>
<?php } );
xfok
 xfok
(@xfok)
Joined: 6 years ago

Estimable Member
Posts: 86

@chris Thanks you. Work well but not work for first reply button. See attachments

 

Chris
(@chris)
Joined: 4 years ago

Famed Member
Posts: 3611

@xfok,

Insert this one 

add_action( 'wp_footer', function () { ?>
<script>

jQuery(document).ready(function ($) {
    if (typeof wpforo_editor !== 'undefined') {
        $('#wpforo-wrap').on('click', '.wpforo-qa-comment, .wpforo-reply.wpf-action.wpforo_layout_4', function () {
			setTimeout(function(){
				wpforo_editor.set_content('', $('.wpforo-post-form').data('textareaid'));
			}, 100);
        });
		$('#wpforo-wrap').on('click', ".wpforo-reply:not(.wpforo_layout_4), .wpforo-answer", function(){
			setTimeout(function(){
           		 wpforo_editor.set_content('', wpforo_editor.get_main());
			}, 100);
        });
		
    }
});

</script>
<?php } );