This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 扫描论坛垃圾帖放入回收站 | |
* 使用levenshtein算法判断字符串相似度 | |
* 相似度超过0.85的主题,数量超过2条,则会被放入回收站 | |
* 每隔5分钟取最新的100个主题检查 | |
* 在/tmp/bbs_spam.log记录所有被删除的主题 | |
* | |
* @author Perry | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Discuz X 2.0版本 | |
$dbhost = 'localhost'; | |
$dbuser = ''; | |
$dbpass = ''; | |
$dbname = ''; | |
$prefix = 'pre_'; | |
$length = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//ucenter 1.6.0版本 | |
$dbhost = 'localhost'; | |
$dbuser = ''; | |
$dbpass = ''; | |
$dbname = ''; | |
$prefix = 'uc_'; | |
$length = 30; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//jQuery扩展,当用户按了回车键后,会触发函数 | |
(function($){ | |
$.fn.enter = function(fun){ | |
if($.isFunction(fun)){ | |
this.keypress(function(e){ | |
if(e.keyCode == 13){ | |
fun.call(this, e); | |
} | |
}); | |
} |