-
7B2主题批量修改文章/圈子话题隐藏内容阅读权限
登录可见的话题修改为公开可见 UPDATE wpb2_postmeta SET meta_value = replace(meta_value,'login','public') WHERE meta_key = 'b2_topic_read_role' 评论可见的话题修改为公开可见 UPDATE wpb2_postmeta SET meta_value = replace(meta_value,'comment','public') WHERE meta_key = 'b2_topic_read_role' 积分可见的话题修改为公开可见 UPDATE wpb2_postmeta SET meta_value = replace(meta_value,'credit','public') WHERE meta_key = 'b2_topic_read_role' 付费可见的话题修改为公开可见 UPDATE wpb2_postmeta SET meta_value = replace(meta_value,'money','public') WHERE meta_key = 'b2_topic_read_role' 等级可见的话题修改为公开可见 UPDATE wpb2_postmeta SET meta_value = replace(meta_value,'lv','public') WHERE meta_key = 'b2_topic_read_role' 2. 批量修改 7B2 主题文章隐藏内容阅读权限文章的修改也是跟圈子话题比较类似,有所变化的就是判断的字段而已,大家参照修改就行 登录可见的隐藏内容修改为公开可见 UPDATE wpb2_postmeta SET meta_value = replace(meta_value,'login','public') WHERE meta_key = 'b2_post_reading_role'... -
广告位美化
HTML 代码: <div class="n_banner_inner"> <div class="img-info">! <div class="info">也想出现在这里? <a rel="nofollow noopener noreferrer" href="转跳Url" target="_blank">联系我们</a>吧</div> </div> <a href="前往Url" target="_blank" rel="noopener noreferrer"> <div class="Banner-adTag">广告</div> <img class="tirr" src="图片Url" alt="信息"> </a> </div> CSS: /*定位*/ .n_banner_inner { position: relative; } /*提示信息*/ .n_banner_inner .img-info { position: absolute; right: 12px; top: 9px; padding: 0; text-align: right; color: #fff; } .n_banner_inner .img-info i { position: relative; display: inline-block; color: #007bff; font-size: 20px; line-height: 19px; text-align: center; z-index: 9; font-style: inherit; } .n_banner_inner .img-info .info { position: absolute; bottom: 5px; right: 0; width: 0; padding: 5px 0; overflow: hidden; background: #007bff; border-radius: 10px; line-height: 10px; text-align: center; font-size: 10px; color: #fff; white-space: nowrap; -webkit-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important; -moz-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important; -ms-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important; -o-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important; transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important; } .n_banner_inner .img-info .info a { color: #fff; } .n_banner_inner .tirr { max-width: 100%; height: auto; transition: 0.5s; border-radius: 5px; } /*触发Hover*/ .n_banner_inner:hover .info { width: auto; padding: 5px 23px 5px 12px; -webkit-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important; -moz-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important; -ms-transition: all 0.2s cubic-bezier(0, 0.34, 0.71, 1.26) !important;…... -
火车头发布文章自动发布到了页面里的处理方法
Wordpress 升级到 6.3 后,一些使用火车头发布模块的朋友,会自动把文章发布到页面下面,而非文章下面。 出现问题原因: WordPress 内核升级到 6.3 后,$post_type被作为全局变量了,在火车头发布接口内的 post_type 被默认成了page,最终导致文章被发布到了page页面下。解决方法:如果不需要发布到其他地方,可以打开火车头发布接口文件,搜索post_type替换成其他任意字符串即可,替换成post_type2即可。... -
Debian10 Debian11 开启 BBR
关于其他系统的,这里就不记录了,主要是我们这边所有的生产线和开发测试环境用的都是 debian 的,所以记录一下。TCP 拥塞控制算法 BBR (Bottleneck Bandwidth and RTT) 可以大限度地利用服务器带宽,减少排队的情况,提高网络质量。Debian10 / 11 默认的内核就是 4.19 版本的内核而且编译了 TCP BBR 模块,所以可以直接通过参数开启。 echo net.core.default_qdisc=fq >> /etc/sysctl.conf echo net.ipv4.tcp_congestion_control=bbr >> /etc/sysctl.conf sysctl -p 检查是否成功: sysctl net.ipv4.tcp_available_congestion_control 显示: net.ipv4.tcp_available_congestion_control = bbr cubic reno 表示开启成功。 或执行 lsmod | grep bbr ,检测 BBR 是否开启。... -
部分主机商的系统没更新或有缺失导致Nginx无法安装
安装Nginx报错:checking for SO_ACCEPTFILTER ... not found checking for SO_BINDANY ... not found checking for IP_TRANSPARENT ... found checking for IP_BINDANY ... not found checking for IP_BIND_ADDRESS_NO_PORT ... found checking for IP_RECVDSTADDR ... not found checking for IP_SENDSRCADDR ... not found checking for IP_PKTINFO ... found checking for IPV6_RECVPKTINFO ... found checking for TCP_DEFER_ACCEPT ... found checking for TCP_KEEPIDLE ... found checking for TCP_FASTOPEN ... found checking for TCP_INFO ... found checking for accept4() ... found checking for int size ... 4 bytes checking for long size ... 8 bytes checking for long long size ... 8 bytes checking for void * size ... 8 bytes checking for uint32_t ... found checking for uint64_t ... found checking for sig_atomic_t ... found checking for sig_atomic_t size ... 4 bytes checking for socklen_t ... found checking for in_addr_t ... found checking for in_port_t ... found checking for rlim_t ... found checking for uintptr_t ... uintptr_t found checking for system byte ordering ... little endian checking for size_t size ... 8 bytes checking for off_t size ... 8 bytes checking for time_t size ... 8 bytes checking for AF_INET6 ... found checking for setproctitle() ... not found checking for pread() ... found checking for…... -
在网站中引入兔小槽的更新日志弹窗
JS 文件下载:https://txc.qq.com/static/desktop/vendor/txc-change-log.zip <!-- 引入兔小巢更新日志的 JavaScript 文件 --> <script src="./index.js"></script> <!-- 创建弹窗文件 --> <script> // 创建兔小巢更新日志对象,传入社区ID var txcChangeLog = new TxcChangeLog({ id: 366730 }); // 当页面加载完成后,立即弹出更新日志弹窗 window.addEventListener("load", function() { // 直接调用 showModal 方法弹出更新日志弹窗 txcChangeLog.showModal(); }); </script> 根据官方的文档提示,加载在网站的头部即可。 在自媒体维基中,我们引入的页面为公告列表区域。...





