Home >CMS Tutorial >DEDECMS >How to add download method in dedecms download module

How to add download method in dedecms download module

藏色散人
藏色散人Original
2019-12-13 10:17:292847browse

How to add download method in dedecms download module

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=&#39;javascript&#39;>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(&#39;".$thunderUrl."&#39;,&#39;&#39;,location.href,&#39;你的联盟id&#39;,2,&#39;&#39;)</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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn