WpForo profil integation ?  

  RSS

BillMoo
(@billmoo)
Active Member
Joined: 5 months ago
Posts: 18
17/06/2018 4:56 pm  

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 😉


ReplyQuote
BillMoo
(@billmoo)
Active Member
Joined: 5 months ago
Posts: 18
17/06/2018 7:18 pm  

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


ReplyQuote
BillMoo
(@billmoo)
Active Member
Joined: 5 months ago
Posts: 18
17/06/2018 7:32 pm  

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
(@astghik)
Support Team Admin
Joined: 12 months ago
Posts: 1391
18/06/2018 1:38 pm  

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)
Active Member
Joined: 5 months ago
Posts: 18
20/06/2018 3:15 am  

Oh cool ! Thank you ! 😉


ReplyQuote
BillMoo
(@billmoo)
Active Member
Joined: 5 months ago
Posts: 18
04/08/2018 5:15 am  

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
 Tom
(@tomson)
Support Team Admin
Joined: 4 years ago
Posts: 2768
06/08/2018 1:10 pm  

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)
Active Member
Joined: 5 months ago
Posts: 18
06/08/2018 3:52 pm  

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
(@astghik)
Support Team Admin
Joined: 12 months ago
Posts: 1391
07/08/2018 4:54 pm  

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;
	}
} 

 

This post was modified 3 months ago by Tom

ReplyQuote
BillMoo
(@billmoo)
Active Member
Joined: 5 months ago
Posts: 18
09/08/2018 2:43 am  

Finally it's working ! Thanks a lot !


ReplyQuote
Share: