Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

干扰码设置

[复制链接]
4666 发表于 2009-9-17 16:28:47 | 显示全部楼层 |阅读模式
function jammer() {
$randomstr = '';

$newArray=array();

$newArray[0]='<a href="http://www.365bug.com" style="color:#ffffff;">本文章來源於:http://www.365bug.com</a>'; //修改''號之間的內容

$newArray[1]='<a href="http://www.365bug.com" style="color:#ffffff;">本文章來源於:365bug 手机bug第一家 http://www.365bug.com</a>';

$newArray[2]='<a href="http://www.365bug.com" style="color:#ffffff;">本文章來源於:365bug 手机bug第一家 http://www.365bug.com</a>';
$randomstr = $newArray[mt_rand(0, 2)];
$seo = !$GLOBALS['tagstatus'] ? $GLOBALS['discuzcodes']['seoarray'][mt_rand(0, 2)] : '';

return mt_rand(0, 2) ? '<font style="font-size:15px;color:#ffffff">'.$seo.$randomstr.'</font>'."\r\n" :

"\r\n".'<span style="display:none">'.$randomstr.$seo.'</span>';
}

function highlight($text, $words, $prepend) {
        $text = str_replace('\"', '"', $text);
        foreach($words AS $key => $replaceword) {
                $text = str_replace($replaceword, '<highlight>'.$replaceword.'</highlight>', $text);
        }
        return "$prepend$text";
}

?>
怎么样把这个干扰码只在首段、中段、尾段显示呢
只显示三段
其他段落不显示
 楼主| 4666 发表于 2009-9-17 23:34:55 | 显示全部楼层
没人会吗?顶一下
回复

使用道具 举报

8460 发表于 2009-9-17 23:40:45 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

 楼主| 4666 发表于 2009-9-19 09:57:44 | 显示全部楼层
求助啊,各位大虾,帮帮小弟啊
回复

使用道具 举报

414 发表于 2009-10-11 13:52:47 | 显示全部楼层
后台设置可以吗?
回复

使用道具 举报

bob396 发表于 2009-10-20 23:01:17 | 显示全部楼层
设置成功了www.zjbbs.net
回复

使用道具 举报

logmen 发表于 2012-6-12 09:24:32 | 显示全部楼层
在哪里设置?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-26 09:12 , Processed in 0.131530 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表