DISCUZ!X 2.5上传图片后缩略图无水印

打开source\function\function_post.php文件:
1、查找:

$image->Watermark($_G['setting']['attachdir'].'/forum/'.$attach['attachment'], '', 'forum');

上面加:

// add Watermark for thumb
$thumb_file = $_G['setting']['attachdir'].'/forum/'.getimgthumbname($attach['attachment']);
if(file_exists($thumb_file)) $image->Watermark($thumb_file, '', 'forum');
// end

2、查找:

$image->Watermark($_G['setting']['attachdir'].'/forum/'.$newattachfile[$aid], '', 'forum');

上面加:

// add Watermark for thumb
$thumb_file = $_G['setting']['attachdir'].'/forum/'.getimgthumbname($newattachfile[$aid]);
if(file_exists($thumb_file)) $image->Watermark($thumb_file, '', 'forum');
// end

Leave a Reply