织梦Dedecms提示信息及提示内容修改方法
由于为客户做网站希望不让它看出是dedecms系统了,所以我希望把所有页面的错误提示信息全部改成如www.phpfensi.com提示您这类,下面整理了一些方法.
官方回复解决办法:
在/include/inc_funtions.php 中修改 function ShowMsg 函数中相关文字,然后自己找到两处,在include里的common.func.php中 查找 提示文字 替换即可
- /**
- * 短消息函数,可以在某个动作处理后友好的提示信息
- *
- * @param string $msg 消息提示信息
- * @param string $gourl 跳转地址
- * @param int $onlymsg 仅显示信息
- * @param int $limittime 限制时间 uu6c.com
- * @return void
- */
- function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0)
- {
- if(emptyempty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';
- $htmlhead = "rnrn
DedeCMS提示信息 rnrn";- $htmlhead .= "
rnrn".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."rn rnrn rnrnrn";- $litime = ($limittime==0 ? 1000 : $limittime);
- $func = '';
- if($gourl=='-1')
- {
- if($limittime==0) $litime = 5000;
- $gourl = "javascript:history.go(-1);";
- }
- if($gourl=='' || $onlymsg==1)
- {
- $msg = "";
- }
- else
- {
- //当网址为:close::objname 时, 关闭父框架的id=objname元素
- if(preg_match('/close::/',$gourl))
- {
- $tgobj = trim(preg_replace('/close::/', '', $gourl));
- $gourl = 'javascript:;';
- $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';rn";
- }
- $func .= " var pgo=0;
- function JumpUrl(){
- if(pgo==0){ location='$gourl'; pgo=1; }
- }rn";
- $rmsg = $func;
- $rmsg .= "document.write("
";");rn";- $rmsg .= "
DedeCMS 提示信息!");rn";- $rmsg .= "document.write("
");rn";
");rn";- $rmsg .= "document.write("".str_replace(""","“",$msg)."");rn";
- $rmsg .= "document.write("";
- if($onlymsg==0)
- {
- if( $gourl != 'javascript:;' && $gourl != '')
- {
- $rmsg .= "
如果你的浏览器没反应,请点击这里...";- $rmsg .= "
- $rmsg .= "setTimeout('JumpUrl()',$litime);";
- }
- else
- {
- $rmsg .= "
- }
- }
- else
- {
- $rmsg .= "