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