wilstyler
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: No Avatar – changing default text outputI would like to use Gravatar as default Avatar to be shown, anywhere an avatar is set to be shown. so i dont want to show them on post or somewhere, i just want the gravatar to work properly, that means it should show the gravatar default logo if someone has no gravatar and no own avatar set.
picture it looks like with gravatar setIf i disable Gravatar as default Avatar in my WordPress plugin WP User Avatar, it is fine. All avatars are shown and for those who dont have an avatar selected, it is replaced by a default avatar.
non gravatar settingI solved it just by adding
<br><br>
at the end in the widget’s input box.Forum: Fixing WordPress
In reply to: No Avatar – changing default text outputI checked the code in my WP User Avatar plugin, following code i think it is:
// Returns true if user has Gravatar-hosted image function wpua_has_gravatar($id_or_email, $has_gravatar=false, $user="", $email=""){ global $ssl; if(!is_object($id_or_email) && !empty($id_or_email)){ // Find user by ID or e-mail address $user = is_numeric($id_or_email) ? get_user_by('id', $id_or_email) : get_user_by('email', $id_or_email); // Get registered user e-mail address $email = !empty($user) ? $user->user_email : ""; } // Check if Gravatar image returns 200 (OK) or 404 (Not Found) if(!empty($email)){ $hash = md5(strtolower(trim($email))); $gravatar = 'http'.$ssl.'://www.gravatar.com/avatar/'.$hash.'?d=404'; $headers = @get_headers($gravatar); $has_gravatar = !preg_match("|200|", $headers[0]) ? false : true; } return $has_gravatar; }
Forum: Fixing WordPress
In reply to: No Avatar – changing default text outputI use Gravatar, but the default Gravatar image isnt shown if a user isnt registered to Gravatar. Only the text “Avatar of USER”.
Maybe it messes up with other plugins?
I have Buddypress installed, besides WP User Avatar (where i set the default avatar to “Gravatar”)I inserted the avatars in my CP Top User Widget, but i have a problem now.
the cells are shown next to each other, since the picture of the avatar is higher than the text output.
It looks like this: picture
how do i insert a break after each single cell?