POST TIME:2020-04-10 20:46
DedeCmsSYSTEM_配置參數(shù)->其它選項(xiàng)中有兩個(gè)配置選項(xiàng):[附件目錄是否綁定為指定的二級域名|附件目錄的二級域名]很明顯示官方早就注意到了在二級域名下的各種子問題!
打開include/FCKeditor/editor/dialog/目錄下的文件:“dede_image.php”!
將這個(gè)
if($cfg_multi_site=='N')
{
$imgHtml.="<imgsrc=&;$imgsrcValue&;width=&;$imgwidthValue&;border=&;0&;height=&;$imgheightValue&;alt=&;$altname&;style=&;cursor:pointer&;onclick=&;window.open('$urlValue')&;/><br/> ";
}
else
{
if(empty($cfg_basehost))$cfg_basehost='http://'.$_SERVER["HTTP_HOST"];
$imgHtml.="<imgsrc=&;$imgsrcValue&;width=&;$imgwidthValue&;border=&;0&;height=&;$imgheightValue&;alt=&;$altname&;style=&;cursor:pointer&;onclick=&;window.open('$urlValue')&;/><br/> ";
}
改成下面
if($GLOBALS['cfg_addon_domainbind']){$addon_domain=$GLOBALS['cfg_addon_domain'];}
if($cfg_multi_site=='N')
{
$imgHtml.="<imgsrc=&;{$addon_domain}{$imgsrcValue}&;width=&;$imgwidthValue&;border=&;0&;height=&;$imgheightValue&;alt=&;$altname&;style=&;cursor:pointer&;onclick=&;window.open('{$addon_domain}{$urlValue}')&;/><br/> ";
}
else
{
if(empty($cfg_basehost))$cfg_basehost='http://'.$_SERVER["HTTP_HOST"];
$imgHtml.="<imgsrc=&;{$addon_domain}{$imgsrcValue}&;width=&;$imgwidthValue&;border=&;0&;height=&;$imgheightValue&;alt=&;$altname&;style=&;cursor:pointer&;onclick=&;window.open('{$addon_domain}{$urlValue}')&;/><br/> ";
}
現(xiàn)在上傳的圖片正常了,接下來咱們要考慮的是下面不是有一個(gè)“瀏覽服務(wù)器_”的按紐嗎,[圖片/隨便/flash/多媒體]都有這個(gè)功能!
先打開include/dialog/目錄下的select_images.php|select_media.php|select_soft.php|select_templets.php
將下面的代碼:
$activeurl='..'.$activepath;
改成
if($GLOBALS['cfg_addon_domainbind']){$addon_domain=$GLOBALS['cfg_addon_domain'];}
$activeurl='..'.$addon_domain.$activepath;
至此完成所以的更改,這樣更改是在保證織夢CMS內(nèi)容管理SYSTEMSYSTEM_的完整性上改的,只有內(nèi)容中的圖片才會變!
當(dāng)然前提是你開啟:附件目錄是否綁定為指定的二級域名而且指定二級域名地址!