dedecms教程:缩略图不加水印 文章页图片加水印的方法



解决方法

1、打开
include/dialog/select_images.php 文件 找到

  1. <input type=’checkbox’ name=’needwatermark’ value=’1′ class=’np’ <?php if($photo_markup==’1′) echo “checked”; ?> />水印  

修改为

  1. <input type=’checkbox’ name=’needwatermark’ value=’1′ class=’np’ />水印

解析:这样做的目的是为了控制水印默认为未选中状态   2、打开
include/dialog/select_images_post.php 文件 找到

  1. if(in_array($imgfile_type, $cfg_photo_typenames))
  2. {
  3. WaterImg($fullfilename,’up’);
  4. }

修改为

  1. if(in_array($imgfile_type,$cfg_photo_typenames) && isset($needwatermark))
  2. {
  3. WaterImg($fullfilename,’up’);
  4. }