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

相关文章:

1、Discuz!X站内开启视频播放代码
https://www.onexin.net/discuz/discuz-x-stations-open-video-player-code/

2、Discuz!X 2.5升级前与升级后(笔记)
https://www.onexin.net/discuz/discuz-x-2-5-upgrade-before-and-after-the-upgrade-notes/

3、升级Discuz!X X2后我们可以设置的优化(网站加速)
https://www.onexin.net/discuz/upgrade-discuz-x-x2-later-we-can-set-the-optimization-website-acceleration/

4、[原创]Discuz!X多国语言实现方法,欢迎点评
https://www.onexin.net/discuz/original-discuz-x-multi-language-implementations-please-comment/

5、群组邀请好友BUG修正 for Discuz_X2_RC之前版本
https://www.onexin.net/discuz/bug-invite-friends-group-before-correction-for-discuz_x2_rc-version/

转载请注明出处:https://www.onexin.net/discuz/discuz-x-2-5-upload-picture-thumbnail-no-watermark/

Leave a Reply

Your email address will not be published. Required fields are marked *