Get the App
SLTechnology News&Howtos  ›  Servers  › 

Dream weaving dedecms software channel judgment is the method of listing images after downloading links on this site.

Shulou Source: shulou.com Published: 2022-06-02 05:01:11 10月01日 Update

This article is about dream weaving dedecms software channel judgment is this site download link and then list the method of mirror image. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Dream weaving dedecms software channel how to judge is this site download link and then list the image?

Dream weaving dedecms software channel judgment is the method of listing images after downloading links on this site.

Recommended study: dream weaving cms

Dream weaving dedecms software channel determines that it is the download link of this site and then lists the image.

Today, the download channel is turned on the mirror site, and "automatically generated according to the local address and server list" is enabled, which is easier and does not have to fill in each. However, there is a problem. When the link is not local, it will also replace part of the domain name according to the download address link to generate an image download point, which will make an error because the image site does not have this file in its directory. So find a way to add a judgment, only the understanding of their own domain name to generate image download point.

Detailed modification method:

Find the file include/taglib/channel/softlinks.lib.php, click below to add a judgment code, only add the bold part, and replace the domain name xxx.net with your own website domain name.

The code is as follows:

If (strstr ($firstLink, 'xxx.net')) / / xiaoxin-20120818- determines that the image appears only under the xxx.net domain name {/ / xiaoxin-20120818- determines that the image appears under the xxx.net domain name $firstLink = preg_replace ("# http:\ /\ / ([^\ /] *)\ / # I",' /', $firstLink); foreach ($sites as $site) {if ($site) = =') continue; list ($link,$serverName,$serverType) = explode ('|', $site) If (! empty ($link_type) & & $link_type! = trim ($serverType)) continue; $link = trim (preg_replace ("#\ / $#", ", $link)). $firstLink; $downloads = getDownloads ($link); $uhash= substr (md5 ($link), 0,24); if ($row ['gotojump'] = = 1) {$link = $phppath." / download.php?open=2&id= {$refObj- > ArcID} & uhash= {$uhash} ";} $temp = str_replace (" ~ link~ ", $link, $tempStr) $temp = str_replace ("~ server~", $serverName, $temp); $temp = str_replace ("~ downloads~", $downloads, $temp); $downlinks. = $temp;} Thank you for reading! About weaving dream dedecms software channel judgment is this site download link and then list the mirror image method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Tags: Images links channels domain names software software channels methods generation code content addresses files more sites parts good practical easy download channels no Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MySQL Apple OPPO Reno Huawei