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
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) : '';
}