程序版本:DiscuzX2-3.1
问题:论坛开启了缩略图后,缩略图无法显示水印图片,点击查看大图才可见到
解决办法:
1.修改/source/function/function_post.php文件
搜索
- if($_G['setting']['watermarkstatus'] && empty($_G['forum']['disablewatermark'])) {
- $image->Watermark($_G['setting']['attachdir'].'/forum/'.$newattachfile[$aid], '', 'forum');
- $update['filesize'] = $image->imginfo['size'];
- }
复制代码
修改成:
- if($_G['setting']['watermarkstatus'] && empty($_G['forum']['disablewatermark'])) {
- /*增加论坛缩略图水印 by xmspace.net*/
- if(file_exists($_G['setting']['attachdir'].'/forum/'.$newattachfile[$aid].'.thumb.jpg')){
- $image->Watermark($_G['setting']['attachdir'].'/forum/'.$newattachfile[$aid].'.thumb.jpg','','forum');
- }
- /*增加论坛缩略图水印 by xmspace.net*/
- $image->Watermark($_G['setting']['attachdir'].'/forum/'.$newattachfile[$aid], '', 'forum');
- $update['filesize'] = $image->imginfo['size'];
- }
复制代码
2.上传替换,后台更新缓存
以上教程由无限星辰工作室撰写提供,转载请注明地址,谢谢。
|
|