Notifications
Clear all

Hide @ symbol in comments

10 Posts
2 Users
0 Reactions
971 Views
Posts: 69
Topic starter
(@sunny)
Trusted Member
Joined: 7 years ago

I have noticed when a user is tagged "@" symbol is displayed in the comments which doesn't look good. Is there any way we can hide @ when the comment is displayed?

9 Replies
Astghik
Posts: 6149
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi @sunny,

Please make sure the wpDiscuz User & Comment Mentioning addon is activated. The symbol is being displayed when you use a built-in wpDiscuz mentioning feature. In the addon, there should not be such an issue. 

Reply
4 Replies
(@sunny)
Joined: 7 years ago

Trusted Member
Posts: 69

@astghik I have the addon activated but it doesn't help, you can check here http://lofizivu.kinsta.cloud/neque-similique-dignissimos-voluptatem/  

Reply
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6149

ok @sunny,

Could you please send the admin login details to info[at]gvectors.com? I'll ask the developers to check the issue for you. 

Reply
(@sunny)
Joined: 7 years ago

Trusted Member
Posts: 69

@astghik login details sent!

Reply
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6149

ok @sunny,

We'll check and back to you asap. 

Reply
Astghik
Posts: 6149
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi @sunny,

Use this js code it should solve the issue. 

jQuery.each(jQuery('[data-ucm_user_id], .wpd-umcguest'), function () {
    jQuery(this).html(jQuery(this).html().replace('@', ''));
});

Put the code in active theme js files. Here is a helpful article: https://www.collectiveray.com/add-javascript-to-wordpress

Reply
3 Replies
(@sunny)
Joined: 7 years ago

Trusted Member
Posts: 69

@astghik the code works but the issue is @ symbol is displayed when the comment is first posted and when page is reloaded then it disappears. 

another issue with this addon I have noted after the upgrade to the new version, half of old tagged users are no more tagged their tagged have been removed which is really very strange.

Reply
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6149

@sunny,

 the issue is @ symbol is displayed when the comment is first posted and when page is reloaded then it disappears. 

Please remove the code provided in the previous post and put this one:

if (typeof wpdiscuzAjaxObj !== "undefined") {
wpdiscuzAjaxObj.removeAtSymbol = function () {
jQuery.each(jQuery('[data-ucm_user_id], .wpd-umcguest'), function () {
jQuery(this).html(jQuery(this).html().replace('@', ''));
});
};
wpdiscuzAjaxObj.removeAtSymbol();
}

Then add this code in the active theme functions.php file:

add_filter("wpdiscuz_comment_post", function ($r) {
$r["callbackFunctions"][] = "removeAtSymbol";
return $r;
});
add_filter("wpdiscuz_ajax_callbacks", function ($r) {
$r["callbackFunctions"][] = "removeAtSymbol";
return $r;
});

another issue with this addon I have noted after the upgrade to the new version, half of old tagged users are no more tagged their tagged have been removed which is really very strange.

Please provide us some example URL. 

Reply
(@sunny)
Joined: 7 years ago

Trusted Member
Posts: 69

@astghik thanks, for the site where I have the issue is an intranet site so there is no external access to it 🙁 but it is not working for me.. 

Reply
Share:
Scroll to top