所以想办法去加个判断,只有是自己域名的了解才生成镜像下载点。

详细的修改方法:

找到文件include/taglib/channel/softlinks.lib.php,按如下来添加一个判断代码,只添加加粗部分即可,域名freexyz.cn请替换为自己网站域名即可。

代码如下:
if (strstr($firstLink, ‘freexyz.cn’)) //xiaoxin-20120818-判断是freexyz.cn域名下才出现镜像
{ //xiaoxin-20120818-判断是freexyz.cn域名下才出现镜像
$firstLink = preg_replace(“#http:\/\/([^\/]*)\/#i”, ‘/’, $firstLink);
foreach($sites as $site)
{
if(trim($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;
}
} //xiaoxin-20120818-判断是freexyz.cn域名下才出现镜像

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。