How to add a download method in the dedecms download module?
dedecms The download method added to the software download module is Thunder download alliance code. Friends who use dedecms for downloading can refer to it.
Recommended learning: 梦Weavercms
Modify the /plus/download.php file
Search
<?php
Add above it
<script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script>
Add below it
require("encode.inc");
Find the
code as follows:
else if($open==1){ $link = base64_decode($link); echo "<script language='javascript'>location=\"$link\";</script>"; exit();
Replace with
code As follows:
else if($open==1){ $link = base64_decode($link); $Url = ("http://jb51.net/url".$link); $thunderUrl = ThunderEncode($Url); echo "<script>OnDownloadClick('".$thunderUrl."','',location.href,'你的联盟id',2,'')</script>"; exit(); }
Put the encode.inc file of Thunder Alliance into the plus directory
Log in to dedecms background system settings - software channel settings and change the attachment download method to link to the jump page
The above is the detailed content of How to add download method in dedecms download module. For more information, please follow other related articles on the PHP Chinese website!