本文最后更新于0 天前,其中的信息可能已经过时,如有错误请发送邮件到1729915388@qq.com
使用的插件
- 20221120更新 ---- 显示网站统计信息使用插件WP Statistics
- 20221120更新 ---- 显示头像信息使用插件WP-China-Yes
- 20221212更新 ---- 解决无权限上传此类文件使用插件WP Extra File Types
- 20230610更新 ---- 使用markdown编辑文本直接放到wordpressWP Githuber MD
- 20230610更新 ---- 使用markdown编辑的公式直接放到wordpress显示WP QuickLaTeX
文章分享
使用的插件
显示网站统计信息WP Statistics
- 使用WP Statistics插件
- 在插件中安装WP Statistics插件,并启用插件
- 点击外观->自定义->小工具->站点概览额外内容
- 点击+号,选择统计,就可以选择自己想要展示的东西了
显示头像信息WP-China-Yes
- 可从WordPress后台【插件】-【安装插件】搜索WP-China-Yes安装(这里我没有搜到我使用的另一种方法)
- 从GitHub下载:https://link.zhihu.com/?target=https%3A//github.com/sunxiyuan/wp-china-yes/releases
- GitHub下载的压缩包解压后上传到WordPress插件目录。在后台【插件】-【已安装的插件】内启用插件。就能使用了
- 插件作者的官方主页为https://www.ibadboy.net/archives/3204.html
解决无权限上传此类文件WP Extra File Types
- 可从WordPress后台【插件】-【安装插件】搜索WP Extra File Types安装
- WP Extra File Types的使用
- 在 设置-->Extra File Types,看到多个文件扩展名,按 ctrl+F 搜索,并输入你要添加的扩展名,勾选后,保存。
- 如果预设的扩展名里没有要添加的文件类型,还可以在最下面自定义添加。
- 三栏分别是描述、文件扩展名、文件类型,保存更改即可。
- 添加示例:| cursor file | .cur | cursor |
- 如果保存后还是不能上传指定的扩展名,就退出 WordPress 登录状态,清理网站缓存,再重新登录,一般过一会儿就能正常上传了。
评论显示IP归属(以argon主题为例)
下载压缩包,上传到主题根目录
- 我的主题根目录是
/wp-content/themes/argon-theme-master
- 直接将解压好的文件夹放在主题根目录。
编辑functions.php
- 在php内添加一行代码:
include("useragent/ip2c-text.php");
- agron主题这里还是修改
functions.php
,评论模版方法为argon_comment_format
(使用ctrl+F搜索) - 在
<div class="comment-author">
和<span class="shuoshuo-comment-item-title">
(这里不知道是否需要添加)下添加如下代码
<?php
echo " ";echo "<span id='ua-info-text' class='comment_ua_info' style='font-size:14px;font-weight:normal;color:#aaa;'>";
echo convertip(get_comment_author_ip());
echo "</span>";
?>
- 对于使用其他主题的,需要编辑xxx-comment.php 模板 (找评论模版中的方法)
添加的代码同上
编辑footer.php
- 添加以下代码
<!-- comment ua-info -->
<script>
jQuery('.comment-body').hover(
function(){
jQuery(this).find('span.comment_ua_info').show();
},
function(){
jQuery(this).find('span.comment_ua_info').hide();
});
jQuery('.comment-body').click(
function(){
jQuery(this).find('span.comment_ua_info').show();
});
</script>
自动更新纯真IP离线库
- 新建一个php文件,网络访问它,即可生成一个dat文件。(这个文件在压缩包中下载的有,不需要再次创建了。)
<?php
// PHP 纯真 IP 地址数据库自动更新功能
qqwry = file_get_contents("http://update.cz88.net/ip/qqwry.rar");
copywrite)[6];
for(
i<0x200;
key *= 0x805;
key =
qqwry[
qqwry[
key );
}
qqwry);
fp){
fwrite(
qqwry);
fclose($fp);
}
?>
- 使用到宝塔面板的自动访问URL设置好时间,自动定期访问这个1.php文件就可以自动下载最新的纯真IP离线库了。(在计划任务中设置)
结果展示
自己去评论区看-哈哈哈哈
更改wordpress的鼠标指针
上传鼠标图标文件
- 需要上传两个鼠标图标文件(两个.cur文件,如何上传.cur文件上面有说),一个是普通指针,另一个是链接指针(可自行百度自己想要的图标样式)
- 然后进入wordpress的仪表盘 --> 外观 --> 自定义 --> 额外CSS 把下面代码复制上去
/** 鼠标样式 开始**/
/** 普通指针样式**/
body {
cursor: url(https://www.xyqiang.top/wp-content/uploads/2022/12/Arrow.cur), default;
}
/** 链接指针样式**/
a:hover{cursor:url(https://www.xyqiang.top/wp-content/uploads/2022/12/Hand.cur), pointer;}
/** 鼠标样式 结束**/
- 把链接改成自己图标的链接即可。
写文章时文字跳转到对应标题
这样就设置成功了
Warning: unpack(): Type L: not enough input, need 4, have 0 in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 11
Warning: implode(): Invalid arguments passed in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 11
Warning: unpack(): Type L: not enough input, need 4, have 0 in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 13
Warning: implode(): Invalid arguments passed in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 13
System Error
评论也可以看到有ip归属
Warning: unpack(): Type L: not enough input, need 4, have 0 in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 11
Warning: implode(): Invalid arguments passed in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 11
Warning: unpack(): Type L: not enough input, need 4, have 0 in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 13
Warning: implode(): Invalid arguments passed in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 13
System Error
Warning: unpack(): Type L: not enough input, need 4, have 0 in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 11
Warning: implode(): Invalid arguments passed in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 11
Warning: unpack(): Type L: not enough input, need 4, have 0 in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 13
Warning: implode(): Invalid arguments passed in /www/wwwroot/xyqiang.top/wp-content/themes/argon-theme-master/useragent/ip2c-text.php on line 13
System Error
ヾ(≧∇≦*)ゝ