新版DedeCms织梦提示信息提示框美化

前端之家收集整理的这篇文章主要介绍了新版DedeCms织梦提示信息提示框美化前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

如果你已经看腻了Dedecms织梦官方默认的提示信息窗口?看这个,绝对让你的眼睛闪亮一下,质感美化版的提示信息窗口来了,美观大气高端上档次。

打开 \include\common.func.PHP 找到

PHP">function ShowMsg(
{
	中间代码省略...
}

整体都改为

PHP">function ShowMsg($msg,$gourl,$onlymsg=0,$limittime=0)
{
    if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';

    $htmlhead  = "\r\n\r\n<a href="https://www.jb51.cc/tag/tishi/" target="_blank" class="keywords">提示</a>信息\r\n\r\n<Meta name=\"viewport\" content=\"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no\">\r\n<Meta name=\"renderer\" content=\"webkit\">\r\n";
    $htmlhead .= "\r\n\r\n".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."\r\n
\r\n\r\n
\r\n\r\n\r\n"; $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';\r\n"; } $func .= " var pgo=0; function JumpUrl(){ if(pgo==0){ location='$gourl'; pgo=1; } }\r\n"; $rmsg = $func; $rmsg .= "document.write(\"\");\r\n;"; $rmsg .= "document.write(\"
"; $rmsg .= "

提示信息

\");\r\n"; $rmsg .= "document.write(\"
\");\r\n"; $rmsg .= "document.write(\"".str_replace("\"",$msg)."\");\r\n"; $rmsg .= "document.write(\""; if($onlymsg==0) { if( $gourl != 'javascript:;' && $gourl != '') { $rmsg .= "点击跳转"; $rmsg .= "
\");\r\n"; $rmsg .= "setTimeout('JumpUrl()',$litime);"; } else { $rmsg .= "
\");\r\n"; } } else { $rmsg .= "

\");\r\n"; } $msg = $htmlhead.$rmsg.$htmlfoot; } echo $msg; }
原文链接:https://www.f2er.com/dedecms/403747.html

猜你在找的Dedecms相关文章