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

Everybody who had to deal with avatar images faced the two core functions qa_get_user_avatar_html and qa_get_avatar_blob_html. Both return the avatar image with predefined HTML code, which limits the developers options.

Instead I would like to see a simple function that only returns the avatar image as a link. And the developer can deal with the avatar image as s/he likes.

Why do I mention this?

Try to use CSS to change the existing IMG.qa-avatar-image class or other .qa-avatar-link or ... to achieve an avatar image box that: 1. has always the same size, 2. has the uploaded avatar image centered inside. I researched a lot, it is not possible with CSS and the current q2a avatar implementation.

Just my two cents.
Kai

 

Q2A version: 1.6.3
by
This is important :(

1 Answer

+2 votes
by

Maybe for 1.8 :)

I've created a PR with some handy functions. Particularly, qa_get_user_avatar_link, which returns the user's avatar link no matter where it comes from.

https://github.com/q2a/question2answer/pull/468

by
Thank you very much :)
...