法1、在文章内部写上:<script>window.location.href = "https://paul.ren"</script>
法2、在theme home.php(或其它文件)修改<?php $this -> permalink() ?> 为
<?php
if($this -> fields -> customLink){
$this -> fields -> customLink();
}
else{
$this -> permalink();
}
?>
然后在写文章之后,加上自定义字段
字段名称:customLink
字段类型:字符
字段值:https://www.baidu.com
admin/profile.php
theme/comments.php
var/Typecho/Common.php
【随机图片源】
来源链接
在通常情况下,当用户输入了QQ邮箱,我们的头像才会调用为QQ头像。但是假如用户使用的是163邮箱或者是其他邮箱,那么头像肯定会显示失败。那么该怎样解决这个问题呢?其实也很简单,我们放个if判断语句就行了。先判断输入的邮箱是不是QQ邮箱,如果是调用QQ邮箱,如果不是则调用Gravatar头像或者其他的静态头像,或者随机头像即可。
更新代码
<span itemprop="image"><?php $number=$comments->mail;
if(preg_match('|^[1-9]\d{4,11}@qq\.com$|i',$number)){
echo '<img src="https://q2.qlogo.cn/headimg_dl? bs='.$number.'&dst_uin='.$number.'&dst_uin='.$number.'&;dst_uin='.$number.'&spec=100&url_enc=0&referer=bu_interface&term_type=PC" width="46px" height="46px" style="border-radius: 50%;float: left;margin-top: 0px;margin-right: 10px;margin-bottom:-2px">';
}else{
echo '<img src="https://lorempixel.com/46/46/" width="46px" height="46px" style="border-radius: 50%;float: left;margin-top: 0px;margin-right: 10px;margin-bottom:-2px">';
}
?>
</span>
速度: ★★★★★
功能: 返回Bing的随机图片
地址: https://uploadbeta.com/api/pictures/random/?key=BingEverydayWallpaperPicture
速度: ★★★★★
功能: 返回随机图片, 需指定分辨率, 如果指定的分辨率没有找到图片则返回空页面
地址: http://lorempixel.com/1600/900
速度: ★★★★☆
功能: 来自github的项目https://github.com/xCss/bing
地址: https://bing.ioliu.cn/v1/rand (返回随机图片)
https://bing.ioliu.cn/v1/rand?w=1920&h=1200 (指定大小)
QingYi主题,只需改变外观就行了 。 在 主题的 functions.php中加入
'bing.ioliu.cn/v1/rand?w=100&h=100' => _t('bing源,好'),
https://bing.ioliu.cn/v1/rand?w=100&h=100(指定大小) 比较快