There is also a Typecho station, because the Gravatar profile picture is walled and cannot be displayed. The following is a solution. Modify the original file. Some people say that the upgraded version is changed back, but... typecho is updated slowly. It's okay ~~~ This can be changed!
Find the Comments. php file under/var/Widget/Abstract, and replace the gravatar function of row 390 with the following:
The code is as follows: |
Copy code |
Public function gravatar ($ size = 32, $ default = NULL) { If ($ this-> options-> commentsAvatar & 'comment' ==$ this-> type ){ $ Rating = $ this-> options-> commentsAvatarRating; $ This-> pluginHandle (_ CLASS _)-> trigger ($ plugged)-> gravatar ($ size, $ rating, $ default, $ this ); If (! $ Plugged ){ // $ Url = Typecho_Common: gravatarUrl ($ this-> mail, $ size, $ rating, $ default, $ this-> request-> isSecure ()); $ MailHash = NULL; If (! Empty ($ this-> mail )){ $ MailHash = md5 (strtolower ($ this-> mail )); } $ Url = 'https: // secure.gravatar.com/avatar /'; If (! Empty ($ this-> mail) {$ url. = $ mailHash ;} $ Url. = '? S = '. $ size; $ Url. = '& r ='. $ rating; $ Url. = '& d ='. $ default; Echo '$ This-> author. '"width ="'. $ size. '"height ="'. $ size. '"/> '; } } } |
Okay, that's it ~