2025 12 月29
提示词
制作一款 wordpress 6.9 版本下的反垃圾评论插件,插件名称 wizspam,支持根据关键词过滤、IP地址过滤,支持对关键词、IP的管理等功能。
WizSpam – WordPress 反垃圾评论插件
一款功能强大的 WordPress 反垃圾评论插件,支持基于关键词和 IP 地址的智能过滤。
功能特性
🔑 关键词过滤
支持多种匹配方式:部分匹配、完全匹配、正则表达式
可视化管理关键词列表
批量导入导出关键词
支持启用/禁用单个关键词
🌐 IP 地址过滤
黑名单模式:拦截指定 IP
白名单模式:只允许指定 IP
支持 IP 段匹配(通配符和 CIDR 格式)
为每个 IP 添加备注说明
📊 统计和日志
实时统计拦截数据
按类型和时间查看拦截趋势
详细的拦截日志记录
支持日志筛选和分页
⚙️ 灵活配置
自定义垃圾评论处理方式
可配置拦截提示消息
自动清理过期日志
完全的中文界面
使用指南
添加关键词
进入 WordPress 后台 > WizSpam > 关键词管理
在”添加新关键词”表单中输入关键词
选择匹配方式:
部分匹配 :评论内容包含该关键词即拦截
完全匹配 :只有完整单词匹配才拦截
正则表达式 :使用正则表达式进行高级匹配
点击”添加关键词”
添加 IP 地址
进入 WordPress 后台 > WizSpam > IP地址管理
在”添加新IP地址”表单中输入 IP
支持的格式:
单个 IP:192.168.1.100
IP 段(通配符):192.168.1.*
IP 段(CIDR):192.168.1.0/24
选择列表类型(黑名单/白名单)
可选添加备注说明
点击”添加IP地址”
配置插件
进入 WordPress 后台 > WizSpam > 插件设置
配置以下选项:
垃圾评论处理方式 :标记为垃圾/移至回收站/直接删除
IP过滤模式 :黑名单模式/白名单模式
显示拦截提示 :是否向被拦截用户显示消息
日志保留天数 :自动清理过期日志
查看统计
进入 WordPress 后台 > WizSpam > 统计概览
查看最近 7 天的拦截统计
查看拦截类型分布
查看每日拦截趋势
查看最近拦截记录
查看日志
进入 WordPress 后台 > WizSpam > 拦截日志
可按类型筛选日志(关键词/IP)
支持分页浏览
可清空所有历史日志
PS:有需要的可以评论留下 Email,我会免费发送给你~~
2025 12 月24
1. 更新系统并接入 PPA 源
Ondřej Surý 的 PPA 是 Debian/Ubuntu 生态中最权威的 PHP 源,它会第一时间同步 PHP 8.5.x 的稳定版。
<code>sudo apt update
sudo apt install -y software-properties-common
# 添加 PPA 源(如果已添加则会自动跳过)
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
2. 安装 PHP 8.5 核心及其组件
为了确保你的业务能正常运行,除了安装核心包,还需要安装常用的扩展(以替代 8.0 版本的扩展):
<code># 安装 PHP 8.5 核心、FPM 及常用扩展
sudo apt install -y php8.5 php8.5-cli php8.5-fpm php8.5-common php8.5-mysql \
php8.5-xml php8.5-curl php8.5-mbstring php8.5-zip php8.5-gd php8.5-intl
3. 切换默认 PHP 版本
安装后,系统内会并存多个 PHP 版本。你需要将命令行默认指向 8.5:
<code># 切换 CLI 版本
sudo update-alternatives --set php /usr/bin/php8.5
# 验证版本
php -v
4. 更新 Web 服务器配置
如果你使用的是 Nginx ,需要手动修改站点配置文件(通常在 /etc/nginx/sites-enabled/):
找到 fastcgi_pass 这一行。
将路径从旧版本修改为新版本:
旧:fastcgi_pass unix:/run/php/php8.0-fpm.sock;
新:fastcgi_pass unix:/run/php/php8.5-fpm.sock;
测试并重启 Nginx:Bashsudo nginx -t && sudo systemctl restart nginx
5. (可选) 清理旧版本
确认网站运行无误后,可以删除 PHP 8.0 以节省 磁盘空间:
<code>sudo apt purge php8.0*
sudo apt autoremove -y
2015 12 月15
CodeIgniter
php.ini 修改:
cgi.fix_pathinfo=1
nginx/vhost/ 域名配置:
server {
listen 80;
server_name www.wizzer.cn wizzer.cn;
root “/data/www/www.wizzer.cn”;
location / {
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^/(.)$ /index.php?$1 last;
break;
}
}
location ~ .php(. )$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
}
2014 7 月1
版本特点:
1、使用系统自带的水印系统,勾选即可使用;
2、可勾选生成缩略图。
使用方法:
1、将 uploadify 文件夹解压至 ../e/extend/
2、系统–>数据表与系统模型–>管理数据表–>图片系统数据表–>管理字段–> morepic 修改:
将“输入表单替换html代码.html”文件内容,拷贝替换掉“输入表单替换html代码”
3、搞定。
ps:uploadify.php 第49行,没有用到的,可以删掉提高效率。
下载地址:
1、原版下载(或附件):
http://pan.baidu.com/s/1kTDmdyZ
2、上传时获取照片附加属性(曝光、光圈、相机型号等)版本:
http://pan.baidu.com/s/1qWuLahQ
2014 6 月5
/e/class/userfun.php
function currentPage($classid,$thisid){
global $class_r;
$fr=explode('|',$class_r[$classid][featherclass]);
$topbclassid=$fr[1]?$fr[1]:$classid;//取得第一级栏目id
if ($topbclassid==$thisid) {
echo "class='cur'";
}
else {
}
}
头部模板:
<li >首页
[e:loop={'select classid,classname,classpath,wburl from [!db.pre!]enewsclass where bclassid=0 order by classid',0,24,0}]
<li >
<a id="nav-hover" href="" title="" target="_self" >
[/e:loop]
2014 5 月28
首先配置好运行环境:
windows下配置nginx+php环境
其次修改nginx配置文件:
server {
listen 80;
server_name localhost;
location ~ ^/bbs/.+\.php$ {
alias E:/xuetang/cn/bbs;
rewrite /bbs/(.*\.php?) /$1 break;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME E:/xuetang/cn/bbs$fastcgi_script_name;
include fastcgi_params;
}
location ~ ^/bbs($|/.*) {
alias E:/xuetang/cn/bbs/$1;
index index.php index.html index.htm;
}
location / {
root E:/xuetang/cn/www;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
root E:/xuetang/cn/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
注意虚拟目录配置要在根目录上面。。
2014 5 月21
/**
* 发送post请求
* @param string $url 请求地址
* @param array $post_data post数据
* @return string
*/
function send_post($url, $post_data) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,$post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Content-Length: ' . strlen($post_data))
);
return curl_exec($ch);
}
"oXS2NuPCEB836NRMrsXXXXXX", "content" => $send_msg);
$data_string = json_encode($data);
echo send_post('http://XXX.cn/api/wx/push/custom/text?mykey=XXXXXX', $data_string);
?>
2010 6 月28
setAttrName('aaa');
$a1->setAttrValue('aaaaa');
$a2 = new Attribute();
$a2->setAttrName('bbb');
$a2->setAttrValue('bbbbbb');
$ar[] = $a1;
$ar[] = $a2;
echo $ar[0]->getAttrName('aaa');
$Article = new Article();
$Article->setArticleContent(mb_convert_encoding('vvvvvvvvvvva.txt ... ','UTF-8','GBK')); //文章正文
$Article->setArticleTitle(mb_convert_encoding("12212AAABBBABAAA".date('Ymd'),'UTF-8','GBK')); //文章题目
$Article->setAttr($ar); //文章定制属性组
$Article->setCreateTime(date('YmdHis')); //文章创立时间
$Article->setDepartment("tongjiju"); //用户部门
$Article->setDescription("description"); //文章描述
$Article->setImportant("0"); //文章级别
$Article->setKeyword("keyword"); //文章关键字
$Article->setLoginName("tongjiju"); //用户登录名
$Article->setModifyTime(date('YmdHis')); //文章修改时间
$Article->setPassword("tongjiju"); //用登录口令
$Article->setWebName(mb_convert_encoding("市政府子网站群二期 > 市统计局 > 市情简介",'UTF-8','GBK')); //网站的名称
$Article->setCommendId(0);
$client = new nusoap_client("http://221.122.*.*:7006/cmsweb/services/TransferArticle?wsdl", true);
$err = $client->getError();
if ($err) {
echo "Constructor error ". $err ." ";
}
$godata='';
//文章中存在附件 'finishMark'=>false-------------------------------------------------------------
$godata=array('article'=>$Article,'finishMark'=>false);
$result = $client->call("transferContent", $godata);
if ($client->fault) {
echo "Fault ";
print_r($result);
echo " ";
} else {
$err = $client->getError();
if ($err) {
echo "Error " . $err . " ";
} else {
echo "Result ";
print_r($result);
echo " ";
}
}
$aid=$result['transferContentReturn'];
if ($aid){
//第一个附件 'finishMark'=>false-------------------------------------------------------------
$filepath='a.txt';
$fp=fopen($filepath, "rb");
$filedata=fread($fp, filesize($filepath));
fclose($fp);
$Appendix = new Appendix();
$Appendix->setFileContent(base64_encode($filedata));
$Appendix->setFileName('a.txt');
$Appendix->setFileType('txt');
$godataf=array('aid'=>$aid,'apd'=>$Appendix,'finishMark'=>false);
$resultf = $client->call("transferAppendix", $godataf);
echo ' ';
echo "Result_f ";
print_r($resultf);
echo " ";
//最后附件 'finishMark'=>true-------------------------------------------------------------
$filepath2='tmp.jpg';
$fp2=fopen($filepath2, "rb");
$filedata2=fread($fp2, filesize($filepath2));
fclose($fp2);
$Appendix2 = new Appendix();
$Appendix2->setFileContent(base64_encode($filedata2));
$Appendix2->setFileName('tmp.jpg');
$Appendix2->setFileType('image_title');//image_title 此图片为标题图
$godataf2=array('aid'=>$aid,'apd'=>$Appendix2,'finishMark'=>true);
$resultf2 = $client->call("transferAppendix", $godataf2);
echo ' ';
echo "Result_f2 ";
print_r($resultf2);
echo " ";
}
?>