discuz! x3.2 分类信息中图片加水印方法
source/class/extend/extend_thread_sort.php中为extend_thread_sort类,
在其方法public function after_newthread()中
把
if($_G['forum_optionlist'][$optionid]['type'] == 'image') {
$identifier = $_G['forum_optionlist'][$optionid]['identifier'];
$sortaids[] = intval($_GET['typeoption'][$identifier]['aid']);
改成
if($_G['forum_optionlist'][$optionid]['type'] == 'image') {
$identifier = $_G['forum_optionlist'][$optionid]['identifier'];
$sortaids[] = intval($_GET['typeoption'][$identifier]['aid']);
require_once libfile('class/image');
$image = new image;
$imgoptiondata = dunserialize($value);
if($_G['setting']['watermarkstatus'] && empty($_G['forum']['disablewatermark'])) {
$image->Watermark($imgoptiondata['url'], '', 'forum');
$update['filesize'] = $image->imginfo['size'];
上传覆盖同名文件,更新缓存测试
页:
[1]