13+年专注全栈开发,承接小程序开发,分销系统定制,网站建设、搬家、搭建,二次开发等一站服务,欢迎咨询
Discuz X3/X2.5默认开启缩略图的时候水印只添加到原图上面,而缩略图上面无法进行水印图的添加,今天在站帮网说下缩略图添加水印方法。 1、打开source\function\function_post.php 2、查找$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'); } // 缩略图打水印end复制代码3、查找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'); } // 缩略图打水印结束复制代码修改好后上传覆盖即可。
Discuz X3.2/X2.5缩略图添加水印方法_
Discuz教程
栏目文章由:
源码庄整理发布,转载请注明来源。
来源地址:https://www.codenet.cc/article/details/113.html
本站资源未标注正版授权软件均为会员提供或网上搜集,版权归原作者所有,如需商业用途或转载请与原作者联系;
发布的文章及附件仅限用于学习和研究目的,请勿用于商业或违法用途!如有侵权,请及时联系我们!
《更多用户服务协议声明》