- 论坛开启了缩略图后,缩略图无法显示水印图片,点击查看大图才可见到,
- 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
缩略图加水印的修改方法