问:默认情况下,采集的文章都自动有缩略图,不想要这个怎么办?需要修改哪里?
答:打开hack/gather/inc/system.article.php文件,查找下面代码修改
//如果采集回本地后.需要对源地址做处理
if($Filedb&&$GetFile&&!$ForbidAdd){
foreach( $Filedb AS $key=>$fileurl){
$content=str_replace($oldFileDB[$key],tempdir("$fileurl"),$content);
if( eregi("(jpg|gif|png)$",$fileurl) && ($webdb[if_gdimg]) ){
//生成缩略图
if( !$havemakesmallpic ){
$Newpicpath=ROOT_PATH."$webdb[updir]/$fileurl.gif";
gdpic(ROOT_PATH."$webdb[updir]/$fileurl",$Newpicpath,300,225,$webdb[autoCutSmallPic]?array('fix'=>1):'');
gdpic(ROOT_PATH."$webdb[updir]/$fileurl","$Newpicpath.jpg",225,300,$webdb[autoCutSmallPic]?array('fix'=>1):'');
gdpic(ROOT_PATH."$webdb[updir]/$fileurl","$Newpicpath.jpg.jpg",300,300,$webdb[autoCutSmallPic]?array('fix'=>1):'');
if( filesize($Newpicpath)>1024*3 ){
$picurl="$fileurl.gif";
$havemakesmallpic++;
}else{
unlink($Newpicpath);
}
}
//图片打水印
if($webdb[is_waterimg]){
include_once(ROOT_PATH."inc/waterimage.php");
imageWaterMark(ROOT_PATH."$webdb[updir]/$fileurl",$webdb[waterpos],ROOT_PATH.$webdb[waterimg]);
}
}
}
}elseif($Filedb){
foreach( $Filedb AS $key=>$fileurl){
$content=str_replace($oldFileDB[$key],"$fileurl",$content);
}
}
//附件地址做处理
$content=En_TruePath($content);
//如果系统没设置自动生成缩略图.将取消
//$webdb[autoGetSmallPic] || $picurl='';