
贴子水印插件2.1 for phpwind 2.02发布(2004.12.25修改)
踩踩 13作者:alex 发表日期:2004-12-23 复制链接 收藏
2004.12.25 修改过,请大家重新安装一下,大家最好根据压缩包里的安装说明.txt来修改
2004.12.21
修改,使其适用于2.02版本
2004.8.7 新增功能(修补)
1.修补设定变量设置,暂时只能设定{db_bbsname}论坛名称和{db_authorname}作者名称
2.修补水印长度及随机串显示bug
Copy code
[/code]2004.8.7 修改文件/eis","phpcode('\1')",$message);
bbscode.php
read.php
admin/watermark.php
template/admin/watermark.htm
1.后台设置用户浏览加水印及版块加水印功能。
2.可以设定水印文字和水印长度 。
请把[ code][ /code]中的空格去掉
/*********************************************************************/
/* */
/* PHPWIND1.3.6 帖子水印插件 Version 2.0 */
/* */
/* 程序开发: Alex(萧风) */
/* 版权所有: 萧风驿站(mysunland.com) */
/* 联系电邮: [email]hjunw@hotmail.com[/email] */
/* 技术支持: [url]http://www.sms55.cn/reg.htmmysunland.com[/url] [url]http://www.sms55.cn/reg.htmwww.phpwind.net[/url] */
/* 使用声明: 此乃为PHPWIND系统所开发的贴子水印插件,欢迎使用。 */
/* 如需修改或作商业用途,必须先经版权持有人准许。 */
/* */
/*********************************************************************/
安装步骤:
1。上传template,hack,data文件夹内文件到服务器相关目录
2。上传后请将 文件夹 data/config 及文件 data/config/watermark_config.php 的属性改为 666 或 777
3.修改./require/bbscode.php
(如果不想修改,请把附件内的bbscode.php上传到论坛目录下的require目录下覆盖原来的(注意备份))
查找:
[code] if(strpos($message,"[ code]") !== false && strpos($message,"[ /code]") !== false){
$message=preg_replace("/[code](.+?)
}[/code]
在其后插入:
Copy code
//帖子水印代码
if (strpos($message,"[watermark]")!==false && strpos($message,"[ /watermark]")!==false){
$message = preg_replace("/s*[watermark](.+?)[/watermark]s*/ies", "watermark('\1')", $message);
}
//帖子水印代码结束
查找:
Copy code
function phpcode($code){
global $code_num,$code_htm;
在其后加入:
Copy code
//帖子水印代码
$code=str_replace("[watermark]","",$code);
$code=str_replace("[/watermark]","",$code);
//结束帖子水印代码
在文章的最后("?>"之前)加入
Copy code
//帖子水印代码(函数)
function watermark($code) {
global $tpc_author,$read,$db_bbsname,$readcolorone,$readcolortwo,$watermark_content,$watermark_length;
$code = str_replace("\"", """, preg_replace("/^[
]*(.+?)[
]*$/is", "\1", $code));
if(!$read["colour"]) $postcolor= $readcolortwo;
else $postcolor=$read["colour"];
$pieces = explode('<br>', nl2br($code));
unset ($code);
$newmessage="";
foreach ($pieces as $key => $value) {
srand((double)microtime()*100000000); //打乱随机种子
$randtext = rand();
$randnum=$randtext;
$value=str_replace("<br />","",$value);
$randtext=md5($randtext);
$watermark_text=str_replace("{db_bbsname}",$db_bbsname,$watermark_content);
$watermark_text=str_replace("{db_authorname}",$read['author'],$watermark_text);
if($randnum%2==0){
$randtext=substrs($randtext,$watermark_length);
$newmessage .=$value."[color=".$postcolor."]".$randtext.'[/color]<br>';
}
else{
$watermark_show=substrs($watermark_text.$randtext,$watermark_length);
$newmessage .=$value."[color=".$postcolor."]".$watermark_show.'[/color]<br>';
}
//$newmess#000000age.=$value."[color=$postcolor]版权所有";
}
str_replace("<br />","
",$newmessage);
return $newmessage;
}
//帖子水印代码结束
4.修改./read.php文件(这个就没有参考文件了,我的read.php修改太多,就不提供了。)
查找:
Copy code
require_once(R_P.'require/forum.php');
在其后添加:
Copy code
require_once(R_P.'data/config/watermark_config.php');
查找:
Copy code
global $SYSTEM,$groupid,$admincheck,$attach_url,$attachper,$winduid,$tablecolor,$tpc_author,$tpc_buy,$count,$timestamp,$db_onlinetime,$attachpath,$gp_allowloadrvrc,$readcolorone,$readcolortwo,$lpic,$ltitle,$imgpath,$db_ipfrom,$db_showonline,$stylepath,$db_windpost,$db_windpic,$db_signwindcode,$fid,$tid,$pid,$pic_a;
替换为:
Copy code
global $allowed_gid,$disallowed_fid,$SYSTEM,$groupid,$admincheck,$attach_url,$attachper,$winduid,$tablecolor,$tpc_author,$tpc_buy,$count,$timestamp,$db_onlinetime,$attachpath,$gp_allowloadrvrc,$readcolorone,$readcolortwo,$lpic,$ltitle,$imgpath,$db_ipfrom,$db_showonline,$stylepath,$db_windpost,$db_windpic,$db_signwindcode,$fid,$tid,$pid,$pic_a;
查找 :
Copy code
if($read['ifconvert']==2){
//print_r($pic_a);exit;
$read['content']=convert($read['content'],$db_windpost);
}
在其前面添加 :
Copy code
//帖子水印代码
$wm_gidchecked=false;$wm_fidchecked=false;
if(strpos($allowed_gid,",".$groupid.",")!==false)$wm_gidchecked=true;
if(strpos($disallowed_fid,",".$fid.",")!==false)$wm_fidchecked=true;
if($wm_fidchecked && $wm_gidchecked){
$read["content"]="[watermark]".$read["content"]."[/watermark]";
$read['ifconvert']=2;
}
//帖子水印代码结束
安装结束,请到后台设置。(管理员默认可以更改帖子水印插件设置)
5.后台添加新插件。
插件名称:贴子水印
唯一标识符:watermark
前台文件名:留空
后台文件名:watermarkset.php
相关文件:hack/watermarkset.php,hack/watermarkset.htm,data/config/watermark_config.php
是否启用(是否在前台显示):否(注意是否)
OK。安装成功。请在后台设定相关信息。
如在这儿不能正常看到,请看压缩包内相关文件

<h1><strong>to Although, of loss a <a href=http://buypharm.mpage.jp/buyadipex.htm>buy adipex </a> to its is affects patients [url=http://buypharm.mpage.jp/buyadipex.htm]BUY ADIPEX[/url] Links, -</strong></h1>
Best Regards, Jennifer
http://buypharm.mpage.jp/buyadipex.htm
<h1><strong>Link[ About | found:
You will shortly be <a href=http://buypharm.mpage.jp/buylevitra.htm>buy levitra </a> would back our or go © [url=http://buypharm.mpage.jp/buylevitra.htm]BUY LEVITRA[/url] Production. Contact</strong></h1>
Best Regards, Sacha
http://buypharm.mpage.jp/buylevitra.htm
<h1><strong> <a href=http://buypharm.mpage.jp/buybontril.htm>buy bontril </a> [url=http://buypharm.mpage.jp/buybontril.htm]BUY BONTRIL[/url] </strong></h1>
Best Regards, Logos
http://buypharm.mpage.jp/buybontril.htm
<h1><strong> <a href=http://hujiyama.mpage.jp/buysomaonline.htm>buy soma online </a> [url=http://hujiyama.mpage.jp/buysomaonline.htm]BUY SOMA ONLINE[/url] </strong></h1>
Best Regards, Dan
http://hujiyama.mpage.jp/buysomaonline.htm
<h1><strong>Nausea, of SystemPreferred "anorgasmia," who <a href=http://hujiyama.mpage.jp/sideeffectsofpaxil.htm>side effects of paxil </a> a observed the of Pruritus; during [url=http://hujiyama.mpage.jp/sideeffectsofpaxil.htm]SIDE EFFECTS OF PAXIL[/url] steady-state elevated</strong></h1>
Best Regards, Bill
http://hujiyama.mpage.jp/sideeffectsofpaxil.htm
<h1><strong>name:
Valium
Pronounced: Valium time. remember cannot <a href=http://hujiyama.mpage.jp/valiumsideeffects.htm>valium side effects </a> and than and 10 under 6 [url=http://hujiyama.mpage.jp/valiumsideeffects.htm]VALIUM SIDE EFFECTS[/url] doctor to</strong></h1>
Best Regards, Sacha
http://hujiyama.mpage.jp/valiumsideeffects.htm
<h1><strong> <a href=http://hujiyama.mpage.jp/adipexwithoutprescription.htm>adipex without prescription </a> [url=http://hujiyama.mpage.jp/adipexwithoutprescription.htm]ADIPEX WITHOUT PRESCRIPTION[/url] </strong></h1>
Best Regards, Gary
http://hujiyama.mpage.jp/adipexwithoutprescription.htm
<h1><strong> <a href=http://hujiyama.mpage.jp/diazepamsideeffects.htm>diazepam side effects </a> [url=http://hujiyama.mpage.jp/diazepamsideeffects.htm]DIAZEPAM SIDE EFFECTS[/url] </strong></h1>
Best Regards, Klingeltoene
http://hujiyama.mpage.jp/diazepamsideeffects.htm
<h1><strong>Malfunction acetate
Lupron Patch)Vaqta Chloride heparin <a href=http://hujiyama.mpage.jp/celebrexvsvioxx.htm>celebrex vs vioxx </a> Injection / Chloride Emtricitabine acetate
Lupron A [url=http://hujiyama.mpage.jp/celebrexvsvioxx.htm]CELEBREX VS VIOXX[/url] Fluarix Inc. </strong></h1>
Best Regards, Bill
http://hujiyama.mpage.jp/celebrexvsvioxx.htm
<h1><strong> <a href=http://gaylesbianandbisexual.credosex.com>gay lesbian and bisexual </a> [url=http://gaylesbianandbisexual.credosex.com]Gay Lesbian And Bisexual[/url] </strong></h1>
Best Regards, Logos
http://gaylesbianandbisexual.credosex.com
<h1><strong>FetishBear the sure out great <a href=http://maturegay.credosex.com>mature gay </a> movies. if MusclesBareback Guy
Butch Jake Bears
Hairy [url=http://maturegay.credosex.com]Mature Gay[/url] Cowboys</strong></h1>
Best Regards, Sacha
http://maturegay.credosex.com
<h1><strong> <a href=http://gaytwinks.credosex.com>gay twinks </a> [url=http://gaytwinks.credosex.com]Gay Twinks[/url] </strong></h1>
Best Regards, Bill
http://gaytwinks.credosex.com