How to give DEDECMS Add Thunder Federation Code

Source: Internet
Author: User

How to give DEDECMS Add Thunder Federation Code
The first step: Open this file in templates/plus/download_links_templet.htm and put the following code

It's OK before the <script src= "Http://pstatic.xunlei.com/js/webThunderDetect.js" ></script>
<script src= "Http://pstatic.xunlei.com/js/base64.js" ></script>
Step Two: Locate the plus/download.php file in the site root directory and open it. Find $downlinks =

Ch_softlinks ($row [$vname], $ctag, $cu, ", true); this sentence, in the latter paragraph, add this passage

Code

Preg_match_all ('/<a.*: |\\t|\\r|\\n)? href=[\ ' "]? (. +?) [\'"]? (:(?: |\\t|\\r|\\n) +.*? > (. +?) <\/a.*?>/sim ', $downlinks, $vlink);

$downlinks = ';
foreach ($vlink [1] as $getlink => $value)
{
if (Strtolower (substr ($value, 0,10))

= = ' thunder://')
{
$downlinks. = ' <a href= ' "#"

Thunderhref= "'. $value. '" thunderpid= "85957" thundertype= ""

Thunderrestitle= "" onclick= "return Ondownloadclick_simple (this,2);"

Oncontextmenu= "Thundernetwork_sethref (This)" > Thunderbolt download </a>&nbsp; ';
}
Else
{
$downlinks. = ' <a href= ' "#"

Thunderhref= "'. $value. '" thunderpid= "85957" thundertype= ""

Thunderrestitle= "" onclick= "return Ondownloadclick_simple (this,2);"

Oncontextmenu= "Thundernetwork_sethref (This)" > local download </a>&nbsp; ';
}

}
Well, the great job tell, very simple method will give you the site to increase the Thunder Alliance download Code Oh,

Original reprint of this site annotated www.111cn.net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.