GVKun编程网logo

DedeCMS V5.6缩略图不加水印的处理办法(缩略图没有水印 打开有水印)

16

对于想了解DedeCMSV5.6缩略图不加水印的处理办法的读者,本文将提供新的信息,我们将详细介绍缩略图没有水印打开有水印,并且为您提供关于DedeCMSv5.5上传图片不加水印的解决办法、DedeC

对于想了解DedeCMS V5.6缩略图不加水印的处理办法的读者,本文将提供新的信息,我们将详细介绍缩略图没有水印 打开有水印,并且为您提供关于DedeCMS v5.5 上传图片不加水印的解决办法、DedeCMS V5.6缩略图不加水印的处理方法、DedeCMS 上传缩略图启用水印的办法、DedeCMS 上传缩略图启用水印的方法的有价值信息。

本文目录一览:

DedeCMS V5.6缩略图不加水印的处理办法(缩略图没有水印 打开有水印)

DedeCMS V5.6缩略图不加水印的处理办法(缩略图没有水印 打开有水印)

 

众所周知,DedeCMS后台“图片水印设置”里的“添加水印的图片大小控制”选项根本不起作用,导致缩略图也被加上水印,效果很难看,现在告诉你DedeCMS V5.6缩略图不加水印的办法技巧!

修改DedeCMS程序里的dede/inc/inc_archives_functi*****.php 文件 (dede为后台默认路径) 
查找到: 
//获取一个远程图片 
function GetRemoteImage($url,$uid=0) 

这个函数里面有一句: 
@WaterImg($rndtrueName, 'down'); 
修改成: 
//@WaterImg($rndtrueName, 'down'); 
再查找: 
//获得新闻body里的外部资源 
function GetCurContent($body) 

global $cfg_multi_site,$cfg_basehost,$cfg_basedir,$cfg_image_dir; 

修改成: 
//获得新闻body里的外部资源 

function GetCurContent($body) { global $cfg_multi_site,$cfg_basehost,$cfg_basedir,$cfg_image_dir,$autolitpic,$litpic; $autolitpic = (empty($autolitpic) ? '' : $autolitpic);  


然后在这同一个函数里面查找到: 

$value = trim($value); $rndFileName = $imgPath.'/'.$milliSecondN.'-'.$key.$itype; $fileurl = $imgUrl.'/'.$milliSecondN.'-'.$key.$itype; $rs = $htd->SaveToBin($rndFileName);  



在其下面添加: 
//自动获取缩略图 

if($autolitpic==1 && $litpic=='') { $litpic = GetDDImgFromBody($body); }  



*后一步: 
查找到: 
//处理HTML文本 
//删除非站外部链接接、自动摘要、自动获取缩略图 

function AnalyseHtmlBody($body,&$description,&$litpic,&$keywords,$dtype='') { global $autolitpic,$remote,$dellink,$autokey,$cfg_basehost,$cfg_auot_description,$id,$title,$cfg_soft_lang; $autolitpic = (empty($autolitpic) ? '' : $autolitpic); $body = stripslashes($body); //远程图片本地化 if($remote==1) { $body = GetCurContent($body); } //删除非站内部链接接 if($dellink==1) { $basehost = "".$_SERVER['HTTP_HOST']; $body = str_replace($cfg_basehost,'#basehost#',$body); $body = str_replace($basehost,'#2basehost2#',$body); $body = preg_replace("/(]*)>)|(<\/a>)/isU","",$body); $body = str_replace('#basehost#',$cfg_basehost,$body); $body = str_replace('#2basehost2#',$basehost,$body); } //自动摘要 if($description=='' && $cfg_auot_description>0) { $description = cn_substr(html2text($body),$cfg_auot_description); $description = trim(preg_replace('/ /','',$description)); $description = addslashes($description); }  


在这个下面的: 
//自动获取缩略图 

if($autolitpic==1 && $litpic=='') { $litpic = GetDDImgFromBody($body); }  



修改成: 

//自动获取缩略图 

//if($autolitpic==1 && $litpic=='') //{ //$litpic = GetDDImgFromBody($body); //}  


好了大功告成!

本文章网址:http://www.ppssdd.com/code/7516.html。转载请保留出处,谢谢合作!

DedeCMS v5.5 上传图片不加水印的解决办法

DedeCMS v5.5 上传图片不加水印的解决办法

 Dedecms v5.5 修正BUG,关于文章编辑器上传图片,未能加入水印的解决方法。

  打开include\FCKeditor\editor\dialog\dede_image.PHP 

  第117行,原文: 

以下为引用的内容:
if (in_array($imgfile_type,$cfg_photo_typenames)) 
{ 
WaterImg($fullfilename,'up'); 
} 

 

  修改为: 
 

以下为引用的内容:
if ($needwatermark=="1" && in_array($imgfile_type,$cfg_photo_typenames)) //修改 by nic 
{ 
WaterImg($fullfilename,'up'); 
WaterImg($full_litfilename,'up'); // add by nic 
}

DedeCMS V5.6缩略图不加水印的处理方法

DedeCMS V5.6缩略图不加水印的处理方法

众所周知,Dedecms后台“图片水印设置”里的“添加水印的图片大小控制”选项根本不起作用,导致缩略图也被加上水印,效果很难看,现在告诉你Dedecms v5.6缩略图不加水印的方法技巧!

修改Dedecms程序里的dede/inc/inc_archives_functi*****.PHP 文件 (dede为后台默认路径)
查找到:
//获取一个远程图片
function GetRemoteImage($url,$uid=0)

这个函数里面有一句:
@WaterImg($rndtrueName,''down'');
修改成:
//@WaterImg($rndtrueName,''down'');
再查找:
//获得文章body里的外部资源
function GetCurContent($body)
{
global $cfg_multi_site,$cfg_basehost,$cfg_basedir,$cfg_image_dir;

修改成:
//获得文章body里的外部资源
function GetCurContent($body)
{
global $cfg_multi_site,$cfg_image_dir,$autolitpic,$litpic;
$autolitpic = (empty($autolitpic) ? '''' : $autolitpic);

然后在这同一个函数里面查找到:
$value = trim($value);
$rndFileName = $imgPath.''/''.$milliSecondN.''-''.$key.$itype;
$fileurl = $imgurl.''/''.$milliSecondN.''-''.$key.$itype;
$rs = $htd->SavetoBin($rndFileName);

在其下面添加:
//自动获取缩略图
if($autolitpic==1 && $litpic=='''')
{
$litpic = GetDDImgFromBody($body);
}

最后一步:
查找到:
//处理HTML文本
//删除非站外链接、自动摘要、自动获取缩略图
function AnalyseHtmlBody($body,&$description,&$litpic,&$keywords,$dtype='''')
{
global $autolitpic,$remote,$dellink,$autokey,$cfg_auot_description,$id,$title,$cfg_soft_lang;
$autolitpic = (empty($autolitpic) ? '''' : $autolitpic);
$body = stripslashes($body);
//远程图片本地化
if($remote==1)
{
$body = GetCurContent($body);
}
//删除非站内链接
if($dellink==1)
{
$basehost = http://.$_SERVER[''HTTP_HOST''];
$body = str_replace($cfg_basehost,''#basehost#'',$body);
$body = str_replace($basehost,''#2basehost2#'',$body);
$body = preg_replace(/(]*)>)|(</a>)/isU,,$body);
$body = str_replace(''#basehost#'',$body);
$body = str_replace(''#2basehost2#'',$basehost,$body);
}
//自动摘要
if($description=='''' && $cfg_auot_description>0)
{
$description = cn_substr(html2text($body),$cfg_auot_description);
$description = trim(preg_replace(''/
/'','''',$description));
$description = addslashes($description);
}

在这个下面的:
//自动获取缩略图
if($autolitpic==1 && $litpic=='''')
{
$litpic = GetDDImgFromBody($body);
}

修改成:

//自动获取缩略图
//if($autolitpic==1 && $litpic=='''')
//{
//$litpic = GetDDImgFromBody($body);
//}
好了大功告成!

总结

以上是小编为你收集整理的DedeCMS V5.6缩略图不加水印的处理方法全部内容。

如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。

DedeCMS 上传缩略图启用水印的办法

DedeCMS 上传缩略图启用水印的办法

 

打开include\FCKeditor\editor\dia日志\dede_image.php ,第117行,原文:

以下为引用的内容: if (in_array($imgfile_type,$cfg_photo_typenames)) { WaterImg($fullfilename,'up'); }  

  修改为:

以下为引用的内容: if ($needwatermark=="1" && in_array($imgfile_type,$cfg_photo_typenames)) //修改 by nic { WaterImg($fullfilename,'up'); WaterImg($full_litfilename,'up'); // add by nic }  

本文章网址:http://www.ppssdd.com/code/6101.html。转载请保留出处,谢谢合作!

DedeCMS 上传缩略图启用水印的方法

DedeCMS 上传缩略图启用水印的方法

打开include\FCKeditor\editor\dialog\dede_image.PHP ,第117行,原文:

 

以下为引用的内容:

if (in_array($imgfile_type,$cfg_photo_typenames))   
{
    WaterImg($fullfilename,'up');
}

  修改为:

 

以下为引用的内容:

if ($needwatermark=="1" && in_array($imgfile_type,$cfg_photo_typenames))   //修改 by nic
{
     WaterImg($fullfilename,'up');
     WaterImg($full_litfilename,'up'); // add by nic
}

今天关于DedeCMS V5.6缩略图不加水印的处理办法缩略图没有水印 打开有水印的介绍到此结束,谢谢您的阅读,有关DedeCMS v5.5 上传图片不加水印的解决办法、DedeCMS V5.6缩略图不加水印的处理方法、DedeCMS 上传缩略图启用水印的办法、DedeCMS 上传缩略图启用水印的方法等更多相关知识的信息可以在本站进行查询。

本文标签: