从2021年3月起,全国计算机等级考试(NCRE)一、二级 WPS 科目开始使用新版的教育考试专用版 WPS Office 软件。
中国教育考试考试专用版 WPS Office 网下载地址页面:http://ncre.neea.edu.cn/html1/report/1507/861-1.htm
本博客有文章 82 篇,评论 3 条,分类 5 个,标签 53 个。
Typecho 提交评论数字计算验证

functions.php 文件添加
function themeInit($comment){
$comment = spam_protection_pre($comment, $post, $result);
}
function spam_protection_math(){
$num1=rand(1,49);
$num2=rand(1,49);
echo '<label for="math">请输入<code>'.$num1.'</code>+<code>'.$num2.'</code>的...
Typecho 加强评论拦截和自定义敏感词过滤

functions.php 文件添加
设置敏感词过滤后台选项和过滤敏感词函数
function themeConfig($form) {
$SensitiveWords = new Typecho_Widget_Helper_Form_Element_Textarea('SensitiveWords', NULL, NULL, _t('评论敏感词过滤'), _t('过滤词语格式:词语|词语2|词语3'));
$SensitiveWords->setAttribute('class', 'typecho-option option_main');
$form-...
JS 二维码生成插件 QRious

qRious 是一款纯 javascript 二维码生成插件。
html 代码
<canvas id="qrcodeImg"></canvas>
JS 代码
var qr = new QRious({
element: document.getElementById('qrcodeImg'),
background: 'white',
foreground: 'black',
level: 'H',
size: 150,
value: window.location.href
});
参数
参数
类型
默认值
...
jQuery 获取当前页面地址

jQuery 获取当前页面完整地址 URL
window.location.href
JS 点击实现浏览器全屏

(function () {
var viewFullScreen = document.getElementById("view-fullscreen");
if (viewFullScreen) {
viewFullScreen.addEventListener("click", function () {
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
docElm.reques...
Typecho 替换全站 gravatar 头像地址

网站根目录下的 config.inc.php 文件,加入:
define('__TYPECHO_GRAVATAR_PREFIX__', 'https://cravatar.cn/avatar/'); //更换头像源
Typecho 页面判断函数

$this->is('index') //首页
$this->is('archive') //归档
$this->is('category') //分类栏目
$this->is('tag') //标签
$this->is('date') //日期归档页
$this->is('single') //内容页
$this->is('post') //内容页
$this->is('page') //独立页面
$this->is('attachment') //附件
$this->is('category','cat_sl...
Typecho 分页和上下篇函数调用

分页
<?php $this->pageLink('下一页','next'); ?>
<?php $this->pageLink('上一页'); ?>
<?php $this->pageNav('上一页', '下一页', '5', '……'); ?>
<?php $this->pageNav('Newer', 'Older', 1, '...', array('wrapTag' => 'nav', 'wrapClass' => 'page-nav', 'itemTag' => '', 'prevClass...
Apache,Nginx 设置 typecho 伪静态去除 index.php

Apache 下设置 typecho 伪静态
设置 - 永久链接 - 启用地址重写功能
网站根目录 创建 .htaccess 文件,粘贴
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
Nginx ...
最新评论