|
1.部分迅雷化就是保留你的本地资源下载链接,在你的本地资源下载链接的旁边单独添加一个迅雷专用链接。需要修改\template\wind\read.htm和另外增加一个thunderjob.php文件。
2.打开\template\wind\read.htm这个文件:
A).找到以下代码:
<<img src="$imgpath/$stylepath/file/$attach[type].gif" align="absmiddle" /> <a $att_id href="job.php?action=download&pid=$read[pid]&tid=$tid&aid=$attach[aid]" target="_blank"> <font color="red">$attach[name]</font></a>
在这段代码的前面加上以下代码:
<img src="$imgpath/$stylepath/file/$attach[type].gif" align="absbottom" /> <a $att_id href="thunderjob.php?action=download&pid=$read[pid]&tid=$tid&aid=$attach[aid]" target="_blank"> <font color="red">迅雷专用高速下载 attach[1]</font></a>
B). 找到以下代码:
<script language="JavaScript">
var tid = '$tid';
var fid = '$fid';
在以上代码的前面加上以下代码:
<script src='http://pstatic.xunlei.com/js/webThunderDetect.js'></script>
<script src='http://pstatic.xunlei.com/js/base64.js'></script>
<script src='http://pstatic.xunlei.com/js/thunderForumLinker.js'></script>
<script language="javascript">
var thunderPid="43783";
var thunderAppend=true;
var thunderHTMLInsert=" ";
thunderFuncType=false;
thunderLinker();
</script>
注意:var thunderPid="43783";这句里面的20070必须修改成你自己的联盟号,不明白联盟号的请查看 http://ubbs.xunlei.com/read.php?tid=87这个帖子
3.\template\wind\read.htm这个文件修改完毕,详情请查看附件里面提供的read.htm这个文件。
4.新建一个php文件命名为“thunderjob.php”,把job.php里面的代码全部拷贝到thunderjob.php这个文件里面去。
5.打开thunderjob.php这个文件找到以下代码:
ob_end_clean();
header('Last-Modified: '.gmdate('D, d M Y H:i:s',$timestamp+86400).' GMT');
header('Expires: '.gmdate('D, d M Y H:i:s',$timestamp+86400).' GMT');
header('Cache-control: max-age=86400');
header('Content-Encoding: none');
header("Content-Disposition: $attachment; filename=\"$name\"");
header("Content-type: $ctype");
header("Content-Transfer-Encoding: binary");
$filesize && header("Content-Length: $filesize");
readfile($fgeturl[0]);
exit;
替换成:
$fgeturl = geturl($attachurl);
if($fgeturl[0]){
if($fgeturl[1]=='Local'){
$fgeturl[0]=$db_bbsurl.'/'.$fgeturl[0];
} }
$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$fgeturl[0].$thunderPosix);
echo "<script src='http://pstatic.xunlei.com/js/webThunderDetect.js'></script>";
echo "<script>OnDownloadClick('".$thunderUrl."','',location.href,'43783',2,'')</script>";
注意:以上代码里面的43783必须修改成你自己的联盟号,不明白联盟号的请查看 http://ubbs.xunlei.com/read.php?tid=87这个帖子
6.thunderjob.php这个文件修改完毕,详情请查看附件里面的thunderjob.php文件。
7.覆盖说明:
A). 用read.htm这个文件覆盖系统里面的同名文件。
B). thunderjob.php这个文件放在和job.php这个文件同级目录就可以了
C). job.php这个文件不用修改 |
批处理, Vista, Windows, 壁纸, Windows, 电脑, 黑客, linux, FTP, 系统, 软件, 卡巴斯基, 程序, Vista, 论坛, 图标, 图标, ROS, 路由, 宽带, 系统, ndeer, Ghost, 服务器, 密码, 诺德尔, 网吧, Windows, FTP, 诺德尔, 系统, server
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|