Discuz X3 默认开启缩略图的时候水印只添加到原图上面,而缩略图上面无法进行水印图的添加,需要改下程序,方可给缩略图添加水印,需要修改2个地方:

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');
}
// 缩略图添加水印 end

最新文章

  1. CSharpGL(25)一个用raycast实现体渲染VolumeRender的例子
  2. openstack网络(neutron)模式之GRE的基本原理
  3. mysql 日期加减操作
  4. Unknown tag
  5. C# 通过SerialPort简单调用串口
  6. JQUERY解析XML IE8的兼容问题
  7. Spring JTA应用JOTM & Atomikos II JOTM
  8. 转 C#开发微信门户及应用(1)--开始使用微信接口
  9. Oracle SQL篇(二)oracle自连接操作
  10. C++程序代写实现HashSet class
  11. 自动化运维工具——puppet详解(一)
  12. .Net语言 APP开发平台——Smobiler学习日志:如何快速实现Timer计时功能
  13. CSS伪类整理笔记
  14. [转]Linux中python3.6+ipython+Jupyter Notebook环境
  15. xshell远程登录工具的星号密码查看方法
  16. Redis闪退解决办法
  17. LitJson JavaScriptSerializer
  18. ArrayList封装
  19. Redis入门 - Windows环境搭建与第一个C# Sample
  20. 526. Beautiful Arrangement

热门文章

  1. Python的HttpClient实现
  2. php连接数据库增删改查----多条件查询
  3. HDU 4436 str2int (后缀自动机)
  4. Pandas根据条件赋值
  5. C#程序怎么写,效率高
  6. SecureCRT配置设置
  7. poj 2186 强连通入门题目
  8. killer驱动
  9. 棘手的操作(bzoj 2333)
  10. [codevs_1237]餐巾计划问题