织梦dede内容图片和缩略图自动带绝对域名
今天早上就把后面的代码写完了.我直接写代码吧.首先关于缩略图这块
然后打开 include\dialog\select_images_post.php这个文件,然后在108行
- $fileurl = $activepath.'/'.$filename;
- $fileurl = $cfg_basehost.$activepath.'/'.$filename;
- global $cuserLogin,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir,$ddcfg_image_dir,$cfg_addon_savetype;
- global $cfg_basehost,$cuserLogin,$cfg_ddimg_width,$cfg_ddimg_height,$cfg_basedir,$ddcfg_image_dir,$cfg_addon_savetype;
- if($isremote==1 && preg_match("#^http:\/\/#i", $picname))
- if(($isremote==1 && preg_match("#^http:\/\/#i", $picname)) && !checkstr($picname,$cfg_basehost))
- if(($litpic=='ddfirst' && !preg_match("#^http:\/\/#i", $picname))
- if(($litpic=='ddfirst' && !preg_match("#^http:\/\/#i", $picname)) || ($litpic=='ddfirst' && checkstr($picname,$cfg_basehost)))
- $oldpic = $cfg_basedir.$picname;
- $picname = str_replace($cfg_basehost,'',$picname);
- function checkstr($str,$str1){
- //判断是否包含$str1这个字符
- $tmparray = explode($str1,$str);
- if(count($tmparray)>1){
- return true;
- } else{
- return false;
- }
- }