Notifications
Clear all

Different avatar wpDisquz and wpForo

4 Posts
2 Users
0 Reactions
3,066 Views
(@footbik)
Member Customer
Joined: 7 years ago
Posts: 28
Topic starter  

Hi

I'm using wpDisquz and wpForo. If the user downloads an avatar via wpForo, it is not displayed in wpDisquz. They are the same only if downloaded through Ultimate Member. 

There are some ideas?

Thanks

Снимок экрана 2018 05 09 в 8.07.06
Снимок экрана 2018 05 09 в 8.06.20

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

Hi footbik,

If you prefer to display the same "Ultimate Member" avatars for wpForo and wpDiscuz you need to disable "Custom Avatars" option from wpForo setting. This option is located in Dashboard > Forums > Settings >Features admin page.  

disable custom avatars

   
ReplyQuote
(@footbik)
Member Customer
Joined: 7 years ago
Posts: 28
Topic starter  

I mean:

When a user uploads his avatar to wpForo, it does not appear in wpDisquz

in wpDisquz it is only visible if you download it via Ultimate

I would like to have one avatar in wpForo and wpDisquz


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

Hi footbik,

You activate wpForo and Ultimate Member plugins at the same time, avatars get from Ultimate Member, as there is a question of priorities with the get_avatar() function.

I suggest doing the following changes:

1.  Copy the class.WpdiscuzWalker.php file from wp-content/plugins/wpdiscuz/templates/comment folder. 

2. In your active theme (mytheme) create wpdiscuz folder and past the copied file (class.WpdiscuzWalker.php) in this folder (wpdiscuz ).  The structure should be  /wp-content/themes/mytheme/wpdiscuz/.class.WpdiscuzWalker.php

3. Find the following code (line 178): 

$authorAvatar = $this->optionsSerialized->wordpressShowAvatars ? get_avatar($authorAvatarField, $gravatarSize, '', $authorName, $gravatarArgs) : '';

4. Replace to the following code:

if (function_exists('wpforo_avatar')) {
if ($this->optionsSerialized->wordpressShowAvatars) {
$authorAvatar = wpforo_avatar('', $authorAvatarField, $gravatarSize, '', $authorName);
if (!$authorAvatar) {
$authorAvatar = get_avatar($authorAvatarField, $gravatarSize, '', $authorName, $gravatarArgs);
}
}
} else {
$authorAvatar = $this->optionsSerialized->wordpressShowAvatars ? get_avatar($authorAvatarField, $gravatarSize, '', $authorName, $gravatarArgs) : '';
}

   
ReplyQuote
Share:
Scroll to top