dedecms 下载地址加迅雷专用链的操作方法 比较全

所属分类: CMS教程 / dedecms 阅读数: 818
收藏 0 赞 0 分享
特别注意!!!!!!!!!!!!!
一. 用管理员账号登陆dedecms5.5后台管理系统
二. 点击 “系统” –》 “软件频道设置”
三. 在软件频道设置面里面找到“附件下载方式”,千万要注意以下三点:
1) 如果你的网站管理系统里面是选的“链接到真实软件地址”这个选项,你就按照附件里面提供的“链接到真实软件地址加专用链”文件夹下的说明文档操作吧。
2) 如果你的网站管理系统里面选的是“链接到跳转页面”这个选项,你就按照附件里面提供的“链接到跳转页面加专用链”文件夹下的说明文档操作吧。
3) 因为“链接到真实软件地址加专用链”和“链接到跳转页面加专用链”这两个文件夹下提供的操作说明文档是不一样的,你要根据你网站管理系统的设置,选择对应的修改说明文档,千万不要选错了!
四.把文章模块的下载链接转换成专用链的修改方法请按照“修改文章模块的改法”这个里面提供的改法修改。
部分化修改方法:

1.部分迅雷化:是保留你的本地资源下载链接,在你的本地资源下载链接的旁边单独添加一个迅雷专用链接。
2.部分迅雷化,需要修改templets\system\channel_downlinks.htm和\plus\download.php这2个文件,打开这个templets\system\channel_downlinks.htm文件,找到以下代码:
<li><a href="~link~" target="_blank">~server~</a></li>
在这句代码的前面加上以下代码:
<li><a target=_blank href='~link~&flag=1'><font color=red>迅雷专用高速下载</font></a></li>

3.templets\system\channel_downlinks.htm这个文件修改完毕,详情请查看附件里面的channel_downlinks.htm这个文件。

4.打开\plus\download.php这个文件:
A) 找到以下代码:
require_once(DEDEINC."/channelunit.class.php");
在这句代码的下面加上以下代码:

$flag=(int)$_GET['flag'];

B) 找到以下代码:
header("location:$link");
把这句代码替换成以下代码:

if ($flag == 1)
{
$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$name = $link;
$pan = "://";
$con = explode($pan,$name);
if (count($con)>1)
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$link.$thunderPosix);
}
else
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix."http://localhost:6070/dedecms55/".$link.$thunderPosix);
}
echo "<script src='http://pstatic.xunlei.com/js/webThunderDetect.js'></script><script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script>";
echo "<script>window.opener=null;window.close();</script>";
}
else
{
header("location:$link");
}

C) 找到以下代码:
header("location:{$softUrl}");
把这句代码替换成以下代码:

if ($flag == 1)
{
$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$name = $softUrl;
$pan = "://";
$con = explode($pan,$name);
if (count($con)>1)
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$softUrl.$thunderPosix);
}
else
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix."http://localhost:6070/dedecms55/".$softUrl.$thunderPosix);
}
echo "<script src='http://pstatic.xunlei.com/js/webThunderDetect.js'></script><script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script>";
echo "<script>window.opener=null;window.close();</script>";
}
else
{
header("location:{$softUrl}");
}
注意:
1)把以上所有代码里面的“http://localhost:6070/dedecms55/”这个全部修改成你自己的域名。
2)把 <script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script>这句里面的92922修改成你自己的联盟号
5.download.php这个文件修改完毕,详情请查看附件里面的download.php文件。

6.覆盖说明:
1)用修改好的download.php这个文件覆盖你网站管理系统里面的\plus\download.php这个文件。
2)用修改好的channel_downlinks.htm这个文件覆盖系统里面的templets\system\channel_downlinks.htm这个文件。
3)覆盖后全部重新生成一下就可以了。
 
全部迅雷化的改法
1.全部迅雷化:是把你网站上的所有资源下载链接都转换成迅雷专用链接。
2.全部迅雷化只需要修改\plus\download.php这个文件就可以了。

3.打开\plus\download.php这个文件:
A) 找到以下代码:
header("location:$link");
把这句代码替换成以下代码:
$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$name = $link;
$pan = "://";
$con = explode($pan,$name);
if (count($con)>1)
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$link.$thunderPosix);
}
else
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix."http://localhost:6070/dedecms55/".$link.$thunderPosix);
}
echo "<script src='http://pstatic.xunlei.com/js/webThunderDetect.js'></script><script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script>";
echo "<script>window.opener=null;window.close();</script>";

B) 找到以下代码:
header("location:{$softUrl}");
把这句代码替换成以下代码:

$thunderPrefix="AA";
$thunderPosix="ZZ";
$thunderTitle="thunder://";
$name = $softUrl;
$pan = "://";
$con = explode($pan,$name);
if (count($con)>1)
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix.$softUrl.$thunderPosix);
}
else
{
$thunderUrl=$thunderTitle.base64_encode($thunderPrefix."http://localhost:6070/dedecms55/".$softUrl.$thunderPosix);
}
echo "<script src='http://pstatic.xunlei.com/js/webThunderDetect.js'></script><script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script>";
echo "<script>window.opener=null;window.close();</script>";

注意:
1)把以上所有代码里面的“http://localhost:6070/dedecms55/”这个全部修改成你自己的域名。
2)把 <script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script>这句里面的92922修改成你自己的联盟号
4.download.php这个文件修改完毕,详情请查看附件里面的download.php文件。

5.覆盖说明:
1)用修改好的download.php这个文件覆盖你网站管理系统里面的\plus\download.php这个文件。
2)覆盖后全部重新生成一下就可以了。
 
以上附件打包下载
更多精彩内容其他人还在看

DedeCMS 5 .7 自定义表单制作和调用办法[图文]

在很多建站需求中,需要一些额外的表单供前台用户提交,以便于收集、统计、分析及处理更多的数据,比如:在线订单、在线报名等一些常见的互动应用
收藏 0 赞 0 分享

dedecms 添加字段后软件列表页无法调用软件大小问题的解决方法

最近做模版想在软件列表页(list_soft.htm)利用[field:softsize/]调用软件大小,才发现原来需要如果解决方法
收藏 0 赞 0 分享

织梦DedeCMS模板防盗的四种方法分享

织梦(DedeCMS)模板也是一种财富,不想自己辛辛苦苦做的模板被盗用,在互联网上出现一些和自己一模一样的网站,就需要做好模板防盗
收藏 0 赞 0 分享

dedecms TAG标签按栏目显示的方法

想让dedecms 的TAG标签按栏目显示
收藏 0 赞 0 分享

dedecms修改按tag标签显示全站相关内容的方法

本文简单的设置就可以把dedecms按tag标签显示全站相关内容
收藏 0 赞 0 分享

dedecms正文自动排版插件 伪原创站必备

为了节约时间,站长可以安装dedecms正文自动排版插件,通过该插件,所有的隐藏代码、链接代码、垃圾代码可以一并删除,统一文章格式,方便简单
收藏 0 赞 0 分享

织梦dedecms 提示 body has not allow words 问题解决

body has not allow words DEDE提示这个是什么意思呢
收藏 0 赞 0 分享

dedecms修改文章自动增加的起始ID从指定数字增加文章ID的方法

dedecms织梦文章系统修改文章自动增加的起始ID从指定数字增加文章ID的方法教给大家
收藏 0 赞 0 分享

dedecms V5.7修改表前缀的方法及出现不显示文章内容的解决方法

将下面的内容保存为 pre.bat 内容可以使用记事本批量替换成你的表前缀和想要改成的前缀. window下的ren命令是重命名的
收藏 0 赞 0 分享

织梦 DeDeCMS 添加自定义属性的方法(图文教程)

由于想在网站首页添加一个本站原创内容的版块.又没办法通过版块id来调用,把每篇原创文章添加副栏目又非常麻烦
收藏 0 赞 0 分享
查看更多