国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

DedeCMS V5.6縮略圖不加水印的處理方法

2024-07-12 09:05:43
字體:
供稿:網(wǎng)友

眾所周知,DedeCMS后臺“圖片水印設(shè)置”里的“添加水印的圖片大小控制”選項根本不起作用,導(dǎo)致縮略圖也被加上水印,效果很難看,現(xiàn)在告訴你DedeCMS V5.6縮略圖不加水印的方法技巧!

修改DedeCMS程序里的dede/inc/inc_archives_functi*****.php 文件 (dede為后臺默認路徑) 
查找到: 
//獲取一個遠程圖片 
function GetRemoteImage($url,$uid=0) 

這個函數(shù)里面有一句: 
@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); 


然后在這同一個函數(shù)里面查找到: 

$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); } //刪除非站內(nèi)鏈接 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#',$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); //} 


好了大功告成!

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 象山县| 夏邑县| 兴和县| 藁城市| 安图县| 虞城县| 江川县| 怀柔区| 石泉县| 开化县| 柳河县| 土默特左旗| 蓝田县| 博爱县| 正阳县| 延吉市| 额济纳旗| 天祝| 高州市| 庆元县| 万源市| 徐水县| 潜江市| 延川县| 黔西| 凉城县| 榆社县| 苏尼特左旗| 定日县| 富蕴县| 胶州市| 上栗县| 南溪县| 临沂市| 西乌| 驻马店市| 盐亭县| 华阴市| 平凉市| 叶城县| 香格里拉县|