phpBB avatars not loading correctly in wpDiscuz and Post Author

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: phpBB avatars not loading correctly in wpDiscuz and Post Author

Re: phpBB avatars not loading correctly in wpDiscuz and Post Author

by axew3 » Thu Jun 18, 2020 2:57 pm

Did you set
Retrieve phpBB avatars by using native phpBB file.php
option to yes, done this, if an user have an avatar in phpBB, of any flavor, then it should display into wordpress posts or shortcodes or widgets.
The unique wordpress page where avatars may DO NOT affect/display is on
WP admin -> Settings -> Discussion (for a reason i will not go to explain now here but you are noticed that this is it, if the avatar to retrieve isn't gravatar, it will not display in this admin page)

And there are some points where you're right, if an admin is editing an user profile, it do not display, until THE EDITED user do not have almost a comment or reply in wp, or a post in phpBB. If editing your profile, it will display in any case.
This is normal as the code is, because it retrieve avatars for current logged user, all others that are retrieved when you see a post in wp with replies. There are more aspects by the way. All easy to be resolved.

To make the long story short, to fix the bug that when an admin edit an user profile, and it do not show the user's avatar:
OPEN file
/wp-content/plugins/wp-w3all-phpbb-integration/class.wp.w3all-phpbb.php
there are these two lines

Code: Select all

// add the current user
// if any other condition fail assigning avatars to users, add it here
just after, add the follow:

Code: Select all

if (isset($_GET['user_id'])){
 	 $guid = intval($_GET['user_id']);
  	$u = get_user_by( 'ID', $guid );
   if(!empty($u)){
 	  $p_unames[] = $u->user_email;
 	 }
 }
So into default wordpress it will work, the user_id of the wp user passed via GET while editing an user profile, you can so grab the user email of this user with the code above, used then to retrieve needed avatars into phpBB.

But the plugin you are using, works the same way? Pass the user_id var when an user profile viewed or edited? Maybe into a custom front-end page?
Do you have this example online? (so i can check without installing the plugin to test).
This fix will be added by default into next coming 2.3.6, as well all others you may report to be fixed, if still not resolved with this simple addition.

Re: phpBB avatars not loading correctly in wpDiscuz and Post Author

by teebling » Wed Jun 17, 2020 6:48 pm

At some point we moved the wordpress installation up one directory, from the root / to content. Perhaps the database is still using the old path to the avatar files or something?

Re: phpBB avatars not loading correctly in wpDiscuz and Post Author

by teebling » Wed Jun 17, 2020 5:38 pm

One last thing to note is that all the phpBB users have 'Gallery' type avatars - that is - they haven't uploaded a picture for their avatar, they have chosen their avatar from a gallery of images in phpBB.

My question is this - why are phpBB avatars not replacing gravatars on WP?

Re: phpBB avatars not loading correctly in wpDiscuz and Post Author

by teebling » Wed Jun 17, 2020 5:30 pm

In fact, interestingly enough, when I view a normal user's profile as an admin in wp-admin, they don't have their phpBB avatar either... I thought that the gravatars of all users change to their phpBB avatar as per the configuration?

It seems that you only see phpBB avatars when you are logged in as that user.

phpBB avatars not loading correctly in wpDiscuz and Post Author

by teebling » Wed Jun 17, 2020 4:58 pm

Hello again,

When a user is logged in, they see the post author's phpBB avatar correctly in the 'post author' section of a typical blog.
unknown.png
unknown.png (174.61 KiB) Viewed 2480 times
However when it is a guest visitor, they see the default 'no avatar' image:
unknown2.png
unknown2.png (216.98 KiB) Viewed 2480 times
There is also a similar issue in the comments section, using the plugin wpDiscuz. When the user who posted the comment themselves is logged in, they see their avatar. But when you're logged in as a different user, or a guest, you only see the default noavatar image:
Screen Shot 2020-06-17 at 17.56.40.png
Screen Shot 2020-06-17 at 17.56.40.png (103.37 KiB) Viewed 2480 times
Does w3all natively support phpBB avatars in the post author meta and in comments, and this is merely a misconfiguration? Or does it not support this functionality yet?

Thanks,
Teeb

Top