dedecms5.7实现迅雷下载链接

dedecms里有个下载地址链接,理论上就是给个软件下载链接就可以,但是太单调了,所以为了方便用户的下载,今天给大家分享dedecms5.7实现迅雷下载链接。

1、首先获取联盟的代码

<!-- PHP专用链代码二 --><div src="http://pstatic.xunlei.com/js/webThunderDetect.js" _ue_org_tagname="script" _ue_div_script="1" _ue_script_data="" _ue_custom_node_="1"></div><!--?php--><!--?php thunderurl="ThunderEncode("http://资源实际下载地址");"--><!--?php--><!--?php-->


2、软件频道设置 设置连接显示方式为要求进入下载地址列表页

3、修改 templets/plus/download_links_templet.htm
head区域加入


然后下载地址的代码哪里
改为


<table align="center" border="0" cellspacing="2" width="100%"><tbody><tr><td height="30" bgcolor="#F2F7E6">下载地址列表:</td></tr><tr><td height="78"><!--?php--><a href="<?php echo $thunderUrl; ?>" data_ue_src="<?php echo $thunderUrl; ?>">迅雷专用下载地址</a><!--?php--></td></tr></tbody></table>


4、再修改 plus/download.php

require_once(dirname(__FILE__)."/../include/common.inc.php");require_once(DEDEINC."/channelunit.class.php");require(DEDEINC."/encode.inc");


引入inc文件
把解压到的inc上传到 include目录
最后找到
$ctag = '';
   $downlinks = ch_softlinks($row[$vname], $ctag, $cu, '', TRUE);
   require_once(DEDETEMPLATE.'/plus/download_links_templet.htm');
   exit();


改为  即加上

$ctag = '';

$downlinks = ch_softlinks($row[$vname], $ctag, $cu, '', TRUE);
 $turelinks = trim($ctag->GetInnerText());

if(strpos("$turelinks","http") > -1 )

{



$turelink = $turelinks;

}

else {



$phppath = $GLOBALS['cfg_basehost'];



$turelink = $phppath.$turelinks;



}

$thunderUrl = ThunderEncode("$turelink");

echo "<div _ue_org_tagname="script" _ue_div_script="1" _ue_script_data="OnDownloadClick('%22.%24thunderUrl.%22'%2C''%2Clocation.href%2C'132243'%2C2%2C''%2C4)" _ue_custom_node_="1"></div>";

require_once(DEDETEMPLATE.'/plus/download_links_templet.htm');

exit();

一切完毕后,在添加软件的时候就可以看到迅雷的填写框,前台就可以看到迅雷的下载地址。

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!
本文关键词:

联系我们

在线咨询:点击这里给我发消息

邮件:w420220301@qq.com