Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.5k views
in Q2A Core by
edited by

I'm running my Q2A setup with WordPress integration (at http://gendercentre.com/qa/) and I'm having a problems with:

  • lack of display of a default avatar for registered users, and
  • the displaying of the incorrect avatar (i.e. the Gravatar avatar) for my admin user.

I'm wondering if the issue is to do with Q2A WordPress integration.

With the standalone Q2A (i.e. without WordPress integration), there is the 'qa_users' table, in which a reference to the user's avatar (the 'avatarblobid') is stored. 

But with WP integration, Q2A instead makes use of the 'wp_users' and 'wp_usermeta' tables in the database. Thus, in my 'usermeta' table, under the entries with, say, user_id 183 (the id of our admin user), I can see an entry where the value of the meta_key field is 'simple_local_avatar'. If I then select the 'Edit' option for that entry, I can see, in the 'meta_value' field, the URL of the avatar that I recently uploaded to that user.

However, from looking at the Q2A PHP source, it seems that permission to allow Q2A users to use a Gravatar avatar and/or upload their own avatar is specified via the 'flags' column in the 'qa_users' table - a table in the _q2a database, which is only used in the standalone Q2A setup. Since, in a WP-integrated set-up, an equivalent 'flags' column is not available in the wp_users or wp_usermeta tables, I'm wondering if Q2A might not know if uploaded avatars are allowed, and if so, where uploaded avatars can be found.

Q2A version: 1.5.3
by
I have the same problem,  :(
by
I'm not sure I understand your problems. I have WP integration, and it seems to work (i.e. it uses the user's email address and gets the relevant Gravatar) - is that all you want to do, or am I missing something? The only problem I've encountered is that in WP you can set to use a different default Gravatar (i.e. the "identicon" instead of the 'G' icon). You can use an override to change the q2a gravatar URL for that, by overriding 'qa_get_gravatar_html' and adding '&d=identicon' to the end of the url.
by
Perhaps yours looks ok because you are using gravatars.  For me it does not function correctly.  You may see it here. http://generousgenealogists.com/q2a/  It does default to Gravatars but my custom avatars do not come across.
by
I can't see where you set a custom avatar in WP. Is it a native feature of Wordpress? If not, I don't think it's likely that Q2A would pick up on a feature that's added by a plugin.

1 Answer

+2 votes
by
*Bump* I don't suppose anyone can help?
by
Did you find a solution? I have a similar problem with my WP integrated setup. WP avatars don't show in users directory or topbar where default gravatar shows, only in question lists and answers it shows wp avatar.
by
I'm no longer associated with running that website but, sorry, I don't think any solution was found.
...