Discuz系列教程-X3开启缩略图添加水印解决方案
程序版本:discuz!X3目的:连缩略图都加上水印的~
适合人群:使用Discuz!x3的站长的特殊需求
1:打开source\function\function_post.php$image->Watermark($_G['setting']
['attachdir'].'/forum/'.$newattachfile[$aid], '', 'forum');在以上代码添加// 缩略图打水印
if (file_exists($_G['setting']['attachdir'] . '/forum/' . $newattachfile[$aid] .
'.thumb.jpg')) {
$image->Watermark($_G['setting']['attachdir'] . '/forum/' .
$newattachfile[$aid] . '.thumb.jpg', '', 'forum');
}
// 缩略图打水印end3:查找C::t('forum_attachment_unused')->delete($aid);在以上代码添加// 缩略图打水印
if (file_exists($_G['setting']['attachdir'] . '/forum/' . $attach['attachment'] .
'.thumb.jpg')) {
$image->Watermark($_G['setting']['attachdir'] . '/forum/' . $attach
['attachment'] . '.thumb.jpg', '', 'forum');
}
// 缩略图打水印结束上传替换原文件,上传图片生成缩略图就有水印了。
本教程有无限星辰工作室 www.xmspace.net 整理发布,转载请注明地址,谢谢!
页:
[1]