测试版本为 DEDECMS V5.6
第一步是要在后台打开水印功能, 两个勾都要选上
第二步是修改你网站里 dede/inc/inc_archives_functions.php 文件 (dede为后台默认路径)
查找到:http://asqq8.net/
//获取一个远程图片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); }最后一步:查找到:http://asqq8.net/
//处理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 = "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(‘/路灯和我之间,究竟谁是谁的过客,
相关文章:
你感兴趣的文章:
- MariaDB数据库主从复制、双主复制、半同步复制、基于SSL的安全复制实现及其功能特性介绍
- PS制作花纹装饰的立体字
- Dynamic Rankings(树状数组+主席树)
- Ubuntu 7.10下安装中文支持和输入法SCIM
- 3D Touch很实用 ,为什么还不温不火?
- 数据库变换