Home > CMS Tutorial > DEDECMS > body text

How to add dedecms download address and Thunder special chain

藏色散人
Release: 2019-12-24 09:21:04
Original
2169 people have browsed it

How to add dedecms download address and Thunder special chain

#How to add the Thunder special link to the dedecms download address?

Operation Instructions for Dreamweaver dedecms5.5 plus Thunder special chain (link to jump page and add special chain)

Recommended learning: Dreamweavercms

pay attention! ! ! ! ! ! ! ! ! ! ! ! !

one. Use the administrator account to log in to the dedecms5.5 backend management system

2. Click "System" -> "Software Channel Settings"

3. Find "Attachment Download Method" in the software channel settings. Be sure to pay attention to the following three points:

1) If the option "Link to real software address" is selected in your website management system, you Just follow the instructions in the "Link to real software address plus dedicated chain" folder provided in the attachment.

2) If the option "Link to jump page" is selected in your website management system, you should follow the instructions in the "Link to jump page plus special link" folder provided in the attachment. Document operation.

3) Because the operating instructions provided under the two folders "Link to the real software address plus a dedicated link" and "Link to the jump page plus a dedicated link" are different, you have to follow your instructions. For the settings of the website management system, select the corresponding modification documentation. Don’t choose the wrong one!

Four. To modify the method of converting the download link of the article module into a dedicated link, please follow the modification method provided in "How to Modify the Article Module".

Partial modification method:

1. Partial Thunder: Keep your local resource download link, and add a separate Thunder dedicated link next to your local resource download link.

2. For partial Thunder, you need to modify the two files templets\system\channel_downlinks.htm and \plus\download.php. Open the templets\system\channel_downlinks.htm file and find the following code:

  • ~server~
  • In front of this code Add the following code:

  • Thunder special high-speed download< ;/a>
  • 3.templets\system\channel_downlinks.htm file has been modified. For details, please view the file channel_downlinks.htm in the attachment.

    4. Open the file \plus\download.php:

    A) Find the following code:

    require_once(DEDEINC."/channelunit.class.php");

    Add the following code below this code:

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

    B) Find the following code:

    header("location:$link");

    Replace this code with the following code:

    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=&#39;http://pstatic.xunlei.com/js/webThunderDetect.js&#39;></script><script>OnDownloadClick(&#39;".$thunderUrl."&#39;,&#39;&#39;,location.href,&#39;92922&#39;,2,&#39;&#39;)</script>"; 
    echo "<script>window.opener=null;window.close();</script>"; 
    } 
    else 
    { 
    header("location:$link"); 
    }
    Copy after login

    C) Find the following code:

    header ("location:{$softUrl}");

    Replace this code with the following code:

    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=&#39;http://pstatic.xunlei.com/js/webThunderDetect.js&#39;></script><script>OnDownloadClick(&#39;".$thunderUrl."&#39;,&#39;&#39;,location.href,&#39;92922&#39;,2,&#39;&#39;)</script>"; 
    echo "<script>window.opener=null;window.close();</script>"; 
    } 
    else 
    { 
    header("location:{$softUrl}"); 
    }
    Copy after login

    Note:

    1)Replace the " "http://localhost:6070/dedecms55/" change all of this to your own domain name.

    2) Put 92922 in the sentence <script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script> Modify it to your own alliance number

    5. The file download.php has been modified. For details, please see the download.php file in the attachment.

    6. Overwriting instructions:

    1) Use the modified download.php file to overwrite the \plus\download.php file in your website management system.

    2) Use the modified channel_downlinks.htm file to overwrite the templets\system\channel_downlinks.htm file in the system.

    3) Just regenerate everything after overwriting.

    How to add dedecms download address and Thunder special chain

    How to change all to Thunder

    1. All to Thunder: Convert all resource download links on your website into Thunder-specific links.

    2. To convert everything into Thunder, you only need to modify the file \plus\download.php.

    3. Open the file \plus\download.php:

    A) Find the following code:

    header("location:$link");

    Replace this code with the following code:

    $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=&#39;http://pstatic.xunlei.com/js/webThunderDetect.js&#39;></script><script>OnDownloadClick(&#39;".$thunderUrl."&#39;,&#39;&#39;,location.href,&#39;92922&#39;,2,&#39;&#39;)</script>"; 
    echo "<script>window.opener=null;window.close();</script>";
    Copy after login

    B) Find the following code:

    header("location:{$softUrl}");

    Replace this Replace the sentence code with the following code:

    $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=&#39;http://pstatic.xunlei.com/js/webThunderDetect.js&#39;></script><script>OnDownloadClick(&#39;".$thunderUrl."&#39;,&#39;&#39;,location.href,&#39;92922&#39;,2,&#39;&#39;)</script>"; 
    echo "<script>window.opener=null;window.close();</script>";
    Copy after login

    Note:

    1) Change all "http://localhost:6070/dedecms55/" in all the above codes to your own domain name .

    2) Change 92922 in the sentence <script>OnDownloadClick('".$thunderUrl."','',location.href,'92922',2,'')</script> to yours Your own alliance number

    4. The file download.php has been modified. For details, please check the download.php file in the attachment.

    5. Overwriting instructions:

    1) Use the modified download.php file to overwrite the \plus\download.php file in your website management system.

    2) Just regenerate everything after overwriting.

    How to add dedecms download address and Thunder special chain##

    The above is the detailed content of How to add dedecms download address and Thunder special chain. 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