蓝色动力网络

 找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 1874|回复: 0

phpwind7.部分迅雷化操作说明《网上找了好多都不能用,这个绝对能用》

[复制链接]
发表于 2009-2-1 16:03:38 | 显示全部楼层 |阅读模式
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这个文件不用修改

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

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

本版积分规则

蓝色动力网络微信平台
网站管理,业务合作联系邮箱: admin#lansedongli.com    QQ:13412492 限网站业务问题.
网站帐号、密码、密保找回请使用注册邮箱,发送邮件至 password#lansedongli.com ,否则不予受理.
免责声明:本论坛所有文字和图片仅代表其个人观点.
本站某些资料或文章来自于互联网,不代表本站观点,如果侵犯了您的权益,请来信告知,我们会在三天内删除.
为了给大家一个更好的交流场所,请勿在本论坛发表与中华人民共和国法律相抵触的言论,请合作,谢谢!
Copyright © 2007-2019 Corporation Powered by网吧系统 版权所有    转载请注明!
浙ICP备11043737号-1 程序:Discuz! x3.4

湘公网安备 43018102000145号

手机版|Archiver|蓝色动力网络   

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