
唔……其实很早就想解决黄三角的问题了,但一直很忙(lǎn)。最近实在忍受不了,参考了一大堆人的文章,处理了一下。= =
第一步
将多说插件目录下的所有 *.php 文件中的 *.duoshuo.com 前面的 http 全部改为 https ;
第二步
鄙人发现多说的头像大多是调用的第三方的不支持 https 访问的地址,例如新浪微博。
鄙人打算用某种神奇的东西把头像中转一下。
查找了一下,方法如下:
用的是php中转然后输出的方法,使用新浪 SAE 。
新建一个应用 , 把index.php里的代码替换成:
<?php
$src = $_GET[‘src’];
if(@exif_imagetype($src)) {
header( ‘Content-Type:image/png’);
echo file_get_contents($src);
} else {
echo ‘not img’;
}
?>
这样就构成了一个中转 , 请求方式为GET https://yourapp.sinaapp.com/?src=原地址
。
然后编辑本地的embed.js , 搜索avatarurl , 找到这段 :
avatarUrl:function(e){return e.avatar_url||nt.data.default_avatar_url}
换成
avatarUrl:function(e){if(e.avatar_url)return'https://yourapp.sinaapp.com/?src='+e.avatar_url;else return'https://yourapp.sinaapp.com/?src='+nt.data.default_avatar_url}
然后所有的头像就都经过SAE中转了。
最后修改输入框左面的默认头像,把这串css加入到style.css中即可。
#ds-reset .ds-gradient-bg {
background:url(“https://static.duoshuo.com/images/bg_sprites.png”) !important;
}
#ds-reset .ds-icon{
background:transparent url(“https://static.duoshuo.com/images/sprites.png”) !important;
}
#ds-thread #ds-reset .ds-textarea-wrapper{
background:#fff url(“https://static.duoshuo.com/images/bg_sprites.png”) 0 -90px repeat-x !important;
}
#ds-thread #ds-reset .ds-toolbar-button{
background:transparent url(“https://static.duoshuo.com/images/sprites.png”) no-repeat !important;
_background-image:url(“https://static.duoshuo.com/images/sprites.gif”) !important;
}
#ds-wrapper #ds-reset .ds-dialog-close{
background:transparent url(“https://static.duoshuo.com/images/sprites.png”) 0 -163px no-repeat !important;
_background-image:url(“https://static.duoshuo.com/images/sprites.gif”) !important;
}
#ds-notify #ds-reset a.ds-logo{
background:transparent url(“https://static.duoshuo.com/images/sprites.png”) 0 -220px no-repeat !important;
_background-image:url(“https://static.duoshuo.com/images/sprites.gif”) !important;
}
除特殊说明,本站原创内容(包括但不限于文章、图像等)采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可。
本站文章除注明转载外,均为原创文章。商业转载请联系作者获得授权,非商业转载请注明:转载自: 让多说支持HTTPS 。
谢谢博主分享:我们是一个非常有潜力的微信资源网站。欢迎博主回访。
21565
这php文件为啥是500状态https://www.69dai.cn/duoshuo.php?src=http://q.qlogo.cn/qqapp/100229475/11616CFA6C7E7A325877ED470ABDE06B/100
然而头像裂了
[给力] 不错,支持一下!
然而……头像仍然看不到==