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

How to add download method in dedecms download module

藏色散人
Release: 2019-12-13 10:17:29
Original
2838 people have browsed it

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
Copy after login

Add above it

<script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script>
Copy after login

Add below it

require("encode.inc");
Copy after login

Find the

code as follows:

else if($open==1){ 
$link = base64_decode($link); 
echo "<script language=&#39;javascript&#39;>location=\"$link\";</script>"; 
exit();
Copy after login

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(); 
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template