Typecho Gravatar頭像不能打開是因為Gravatar頭像被墻了,所以及要解決的辦法就是不用Gravatar頭像了,但還有其它辦法嗎?下面一起來看看.
還有個Typecho的站,因為Gravatar頭像被墻,也無法顯示了,下面是解決的辦法,修改原文件,有人說,一升級版本,又變回去了,但是...Typecho本來更新的就慢,這個沒什么了~~~可以這么改.
找到/var/Widget/Abstract 下的 Comments.php 文件,將390行的gravatar函數換成下面的代碼:
- 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 (!emptyempty($this->mail)) {
- $mailHash = md5(strtolower($this->mail));
- } //開源軟件:Vevb.com
- $url = 'https://secure.gravatar.com/avatar/';
- if (!emptyempty($this->mail)) {$url .= $mailHash;}
- $url .= '?s=' . $size;
- $url .= '&r=' . $rating;
- $url .= '&d=' . $default;
- echo '<img class="avatar" src="' . $url . '" alt="' .
- $this->author . '" width="' . $size . '" height="' . $size . '" />';
- }
- }
- }
好了,就這樣了~
新聞熱點
疑難解答
圖片精選