Notifications
Clear all

WpForo profil integation ?

10 Posts
3 Users
0 Likes
2,197 Views
BillMoo
(@billmoo)
Eminent Member
Joined: 6 years ago
Posts: 20
Topic starter  

Hello,

I use wpdiscuz and wpforo and thank you for these awesome plugins. I have a simple question about the integration « link to profil » when I clic on the avatar on the comment section. I saw the integration code about buddypress, mycred… but, what about the profil page of wpforo ? What is the code ?

Thanks for your help 😉


   
Quote
BillMoo
(@billmoo)
Eminent Member
Joined: 6 years ago
Posts: 20
Topic starter  

Ok, we had to click on the name, not on the avatar ... Oops


   
ReplyQuote
BillMoo
(@billmoo)
Eminent Member
Joined: 6 years ago
Posts: 20
Topic starter  

Currently, a new page opens with the profile. Is it possible that the profile page does not open on a new page? I prefer to stay on the same page.

Tanks for yout help.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5872
 

Hi  BillMoo,

Please wait for the next (wpDiscuz plugin) update. We'll provide a hook and you'll be able to delete target="_blank" attribute. 


   
ReplyQuote
BillMoo
(@billmoo)
Eminent Member
Joined: 6 years ago
Posts: 20
Topic starter  

Oh cool ! Thank you ! 😉


   
ReplyQuote
BillMoo
(@billmoo)
Eminent Member
Joined: 6 years ago
Posts: 20
Topic starter  

Hello ! I had deleted the target = "_ blank" in class.WpdiscuzWalker file and it worked perfectly ! But since the last update I think, the problem is still there. When editing the file, the new page appears when I click on the username. Please, what can I do ? Thank you.


   
ReplyQuote
 Tom
(@tomson)
Famed Member Admin
Joined: 9 years ago
Posts: 4168
 

Could you please explain the issue again. What do you mean saying this "When editing the file, the new page appears when I click on the username."? What is the problem?


   
ReplyQuote
BillMoo
(@billmoo)
Eminent Member
Joined: 6 years ago
Posts: 20
Topic starter  

Ok, sorry I'll try to explain myself better.

Problem => Currently a new page (the profil page) appears when we click on the username, this is the default setting of the plugin.

What I want => I would like to stay in the same window when I clic on the username.

A few weeks ago, in the file "class.WpdiscuzWalker" I deleted the lines "target =" _ blank "and the result was good, but today it does not work anymore and the default setting is back.


   
ReplyQuote
Astghik
(@astgh)
Illustrious Member Admin
Joined: 6 years ago
Posts: 5872
 

Hi @billmoo,

Please put the following code in your current active theme functions.php file:

add_filter('wpdiscuz_author_link_attributes', 'targetSelf');
if (!function_exists('targetSelf')) {
	function targetSelf($args) {
		if (isset($args['target'])) {
			unset($args['target']);
		}
		return $args;
	}
}

The following code removes target =_ blank attribute when you click on avatars of commentators:

add_filter('wpdiscuz_avatar_link_attributes', 'targetSelf');
if (!function_exists('targetSelf')) {
	function targetSelf($args) {
		if (isset($args['target'])) {
			unset($args['target']);
		}
		return $args;
	}
} 

 


   
ReplyQuote
BillMoo
(@billmoo)
Eminent Member
Joined: 6 years ago
Posts: 20
Topic starter  

Finally it's working ! Thanks a lot !


   
ReplyQuote
Share:
Scroll to top