Discuz教程网

[代码修改] discuz!x2缩略图加水印方法详解

[复制链接]
authicon dly 发表于 2011-10-31 19:25:12 | 显示全部楼层 |阅读模式
第一步:
打开source\function\function_post.php

第二步:
查找
  1. $image->Watermark($_G['setting']
  2. ['attachdir'].'/forum/'.$newattachfile[$aid], '', 'forum');
复制代码
在其上面添加
  1. // 缩略图打水印
  2. if (file_exists($_G['setting']['attachdir'] . '/forum/' . $newattachfile[$aid] .
  3. '')) {
  4. $image->Watermark($_G['setting']['attachdir'] . '/forum/' .
  5. $newattachfile[$aid] . '', '', 'forum');
  6. }
  7. // 缩略图打水印end
复制代码
第三步
查找
  1. DB::delete('forum_attachment_unused', "aid='$aid'");
复制代码
在其上面添加
  1. // 缩略图打水印
  2. if (file_exists($_G['setting']['attachdir'] . '/forum/' . $attach['attachment'] .
  3. '')) {
  4. $image->Watermark($_G['setting']['attachdir'] . '/forum/' . $attach
  5. ['attachment'] . '', '', 'forum');
  6. }
  7. // 缩略图打水印结束
复制代码

游客,如果您要查看本帖隐藏内容请回复


好用给个回复




上一篇:便民电话超强漂亮的DIY 下滑式六格便民联系方式
下一篇:Discuz X2 快捷回复插件v2.0
authicon 山外人¥机器 发表于 2011-11-1 14:51:19 | 显示全部楼层
恩。挺好的。就是看代码的时候找的眼花花的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 05:03

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表