simplecd local avatars插件求助

下次自动登录
现在的位置:
WordPress用户资料添加自定义用户头像功能Simple Local Avatars 插件汉化版
手机天堂-软件世界 本博同步更新地址
本文网址 /archives/1368
一般情况下,WordPress默认都是使用Gravatar头像,如果用户没有注册过Gravatar头像,那就使用网站设置的默认头像,这样用户体验不是很好;再则,如果直接调用远程Gravatar头像,还会影响网站的加载速度()。所以,作为一个开放注册的WordPress网站而言,在用户资料页面添加自定义用户头像功能是极为重要的。
由于Gravatar头像网站被和谐,导入部分地区不能注册,更不能使用他们的头像,不知道原来注册的有没有影响
自定义用户头像,只需要安装 Simple Local Avatars 插件即可,建议在后台插件安装页面搜索 Simple Local Avatars 在线安装,或者 。启用该插件后,你就可以在后台 &用户&我的个人资料 下看到自定义头像上传功能了,如下图所示
Simple Local Avatars 是英文的,只有一个主文件
simple-local-avatars.php,你也可以将这个功能直接集成到你的主题中,只需将该插件的 simple-local-avatars.php
放到正在使用的主题的根目录,然后在 functions.php文件中使用下面的代码引入该文件即可:
require_once(TEMPLATEPATH . '/simple-local-avatars.php');
通过以上的两种方式,你的网站已经具备了自定义用户头像功能。那么,如何调用自定义头像?很简单,可以调用get_simple_local_avatar
或 get_avatar 函数即可,例如:
&?php echo get_avatar(get_the_author_meta('ID')); ?&
注:如果你已设置了Gravatar头像,也上传了自定义头像,优先显示自定义头像
汉化版下载:
①本文来源于网络搜集整理,转载时,请注明来源于 /或!Tutorial for the original blogger site, reproduced, please indicate from the pieces / and !
②本文资源均只用于个人学习和研究,请不要恶意滥用和用于商业目的,否者后果自负!In this paper resources are only for personal study and research, please do not abuse and used for commercial purposes, otherwise the consequences!
【上篇】【下篇】
您可能还会对这些文章感兴趣!
日志:188篇
分类:40个
标签:11个
运行:2251天
最后更新:日估计是wordpress的问题…
一个人去了张家界、凤凰,其实目的地是边城,至于为什么是边城….
张家界国家森林公园
这不是教程文章,只是吐槽和简单的制作记录而已,需要教程的买材料卖家会给.而且百度也有很多
材料是某宝买的,完成后,碗消耗掉.胶剩余不多,颜料和荧光颜料剩余很多
距离上次用颜料画画,估计有十多年了吧,所以画的难看是必然的,按照精致版教程画出了简单版效果= =
画了6天,前几天大概2-2.5小时,后几天3小时左右,总计大概16小时吧 (由于画渣,又求精致,所以耗时比较久.虽然结果还是渣)
没有毅力的童鞋还是放弃做这个吧,点星星会点疯的(我点的还算少了)
最后…报纸也是卖家提供的..别关注报纸上的字= =
第一天.收到材料,把碗涂黑,等几分钟干了点星星
最近博客打开速度变的非常慢,今天有空解决了下
打开需要好几秒,浏览器左下角显示连接
gravatar是wordpress的头像服务,每次需要连接到国外服务器读取头像,所以下了个simple-local-avatars插件,使用本地图片头像
然后打开速度还是慢…
在上一篇中只是初步介绍了做网站需要准备的几样东西(空间,域名,程序)
现在来补充:
假设你已经有了域名、空间和程序,如何让所有人都能看见你的网站?
这里以搭建一个小型博客为例(例如)
嗯.还没开发啦~~
只是有这个打算..
所有的动态都在这里更新…
如果直接想看解决办法,看 ——— 以下的内容
最近发现电脑出现了问题,就是每天第一次开机,速度非常慢,主要卡在欢迎界面前后,需要2-4分钟,开机后,非常卡,大概要十几分钟才能正常使用,之后的重启速度却很快
发现大半年没写博客了啊,其实也没有什么内容可以写的….
这半年事情也挺多的,学习一些新的技术(对我而言),无聊的上班,
这两个月还有学车,估计12月中旬就可以拿驾照了.好后悔当初没有早点学啊,又便宜,又容易.
天气热了..用了3年的笔记本也热了.烫到手都放不上去.
用鲁大师测了下温度,CPU80℃,主板88℃,赶紧搬了台电风扇才降到60℃和70℃
原因不用多说了.灰尘太多..
然后淘宝硅脂(散热膏),2块钱一瓶
今天有时间,就拆机清理~~先百度一下这个型号的拆机视频…有就可以按照视频步骤拆了..螺丝,排线 等不用自己找..
拆出电池,硬盘
百度友情链接:
{/bocaipingji/}
{www./zhongguozuqiuduqiu/}
{/aomendubowangzhan/}
{.cn/baijialeguize/}
{/niuniudubo/}
{.cn/duchang/}
{/touzhu/}
{www.hl-/bogoutiyu/}
{/zhenqiandubowang/}
{www.fxxqedu.net/baijialeluzhi/}
{www./a/zhenrenbaijiale/}WordPress › Support & [Plugin: Simple Local Avatars] SSL Issues
Ready to get started?
SSL Issues (5 posts)
Posted 2 years ago
When utilizing SSL in an installation.
Both in the admin and the visitor side of things, the icons are called insecurely.
Is there a fix out there for this?
Posted 2 years ago
We are using the force SSL setting in the WordPress configuration file to define this.
Not sure what the right way to pull images are, but it would be nice to have a fix.
Other plugins and WordPress itself pull images just fine.
Not sure what is missing.
Plugin Author
Posted 1 year ago
Well, the plug-in uses the "site_url()" function to generate URLs for the avatars. Presumably, an SSL plug-in would hook into that. Any idea what other plug-ins do?
Posted 1 year ago
I'm not sure how others do it, but what's going on is it's not pulling the SSL link to the image.
Keeps it at http://
&li id=&wp-admin-bar-my-account& class=&menupop with-avatar&&&a class=&ab-item&
aria-haspopup=&true& href=&https://www.hopkinsarthritis.org/wp-admin/profile.php& title=&My Account&&Howdy, Arthritis Center&img alt='Arthritis Center' src='http://www.hopkinsarthritis.org/wp-content/uploads/2011/11/Arthritis-Center_avatar-16x16.png' class='avatar avatar-16 photo' height='16' width='16' /&&/a&&div class=&ab-sub-wrapper&&&ul id=&wp-admin-bar-user-actions& class=&ab-submenu&&
&li id=&wp-admin-bar-user-info&&&a class=&ab-item& tabindex=&-1& href=&https://www.hopkinsarthritis.org/wp-admin/profile.php&&&img alt='Arthritis Center' src='http://www.hopkinsarthritis.org/wp-content/uploads/2011/11/Arthritis-Center_avatar-64x64.png' class='avatar avatar-64 photo' height='64' width='64' /&&span class='display-name'&Arthritis Center&/span&&span class='username'&weslinda&/span&&/a&
The site URL is input as HTTP because we don't force SSL on the entire site.
We force SSL in the admin area, and I believe that if I force for the entire site, it still calls the http:// version of the link.
Not sure how WordPress itself does it, but it seems to call other images in the admin properly.
Wish I knew more about how to code this properly, I'd drop in an answer as quickly as I could figure it out, unfortunately, I'm a design guy, not really a developer guy.
kremalicious
Posted 1 year ago
same problem over here.
I think the problem may be caused by using wp_get_attachment_url here:
As you can see in this 3 YEAR OLD ticket, wp_get_attachment_url doesn't check for SSL:
Topic Closed
This topic has been closed to new replies.
About this Plugin
About this Topic
Started 2 years ago by weslinda
from kremalicious
This topic is not resolved
WordPress version: 3.4.2
Code is Poetry网络上方法很多,什么使用多说的缓存,什么各种本地化,天下文章一大抄,都没用的。下面是真实可用的两种实用的方法,并且在使用中。
第一种方法:调用gravatar的ssl地址
把下面代码复制到你主题的functions.php:
function get_ssl_avatar($avatar) {
$avatar = preg_replace('/.*\/avatar\/(.*)\?s=([\d]+)&.*/','&img src=&/avatar/$1?s=$2& class=&avatar avatar-$2& height=&$2& width=&$2&&',$avatar);
add_filter('get_avatar', 'get_ssl_avatar');
第二种方法:使用头像自定义插件
&simple-local-avatars
改插件允许用户自己upload上传头像,如下图所示
头像就默认加载用户自己上传的图片,注意图片尺寸 96*96 px 。如果用户没有自己上传,则从获取头像,两种方法并
用!此时你的wordpress应该不会卡的一逼了。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:20574次
积分:1045
积分:1045
排名:第18492名
原创:86篇
(6)(1)(3)(4)(1)(2)(7)(11)(4)(13)(6)(3)(7)(3)(3)(2)(1)(3)(1)(3)(1)(2)(1)(1)(2)(3)

我要回帖

更多关于 skin simple 的文章

 

随机推荐