Notifications
Clear all

Script Reply button automatically adds post author @nickname in editor

6 Posts
2 Users
0 Likes
457 Views
xfok
Posts: 70
 xfok
Topic starter
(@xfok)
Estimable Member
Joined: 3 years ago

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

Topic Tags
5 Replies
Chris
Posts: 2342
Admin
(@chris)
Support Team
Joined: 1 year ago

Hi @xfok,

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

Reply
4 Replies
xfok
 xfok
(@xfok)
Joined: 3 years ago

Estimable Member
Posts: 70

@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

Reply
Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2342

@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 } );
Reply
xfok
 xfok
(@xfok)
Joined: 3 years ago

Estimable Member
Posts: 70

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

 

Reply
Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 2342

@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 } );
Reply