喜欢本站请 收藏我们 或点击:
您好,欢迎光临DedeCMS多模板!登录 注册
帮助中心 咨询热线:186 0234 2709

DedeCMS帮助中心

超漂亮DEDECMS提示框样式修改美化
本站承接DedeCMS仿站服务,大家如有需要请联系QQ:751865
本站所有商业模板均提供使用详细安装说明(含视频)
提示:个人建议还是在适当的地方保留DEDECMS的版权信息,以支持dedecms管理系统更好的发展!
修改:include/common.func.php
第178-255行
覆盖以下代码:
  1. function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0)
  2. {
  3.     if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';
  4.     $htmlhead  = "<html>\r\n<head>\r\n<title>织梦CMS 友情提示</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n";
  5.     $htmlhead .= "
  6.     <base target='_self'/>\r\n
  7.     <style>
  8. html,body,h2,div,p,img{margin:0;padding:0;list-style:none;border:none;font-size:12px;}
  9. a:link,a:visited,a:active{text-decoration:none;font-family:Tahoma,Geneva,sans-serif;}a:hover{text-decoration:underline;}
  10. body{text-align:center;font-family:Tahoma,Geneva,sans-serif;background:#000000;background:#000000\9;padding-bottom:25px;_background:url(about:black) no-repeat fixed;}
  11. html{_background:url(about:black) no-repeat fixed;}
  12. .ts_div{width:500px;overflow:hidden;margin:0 auto;margin-top:150px;border:1px solid #E9E9E9;border-radius:3px;}
  13. .ts_div h2{text-align:left;color:#666;border-bottom:1px dotted #ccc;padding-bottom:10px;font-size:12px;}
  14. .ts_div p{line-height:70px;background:url({$GLOBALS['cfg_plus_dir']}/img/ts_bg.png) no-repeat 0 center;margin:10px auto;font-size:14px;text-align:left;text-indent:70px;}
  15. .ts_border{border:7px solid #efefef;}
  16. .ts_b2{background:#fff;border:1px solid #E9E9E9;padding:10px 20px 10px 20px;}
  17. .ts_tz{margin:10px auto;text-align:right;width:500px;color:#666;}
  18. .ts_tz a{color:#f30;}
  19.     </style>
  20.     </head>\r\n<body style=\"background:#f7f7f7;\">".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')."\r\n<center>\r\n<script>\r\n";
  21.     $htmlfoot  = "</script>\r\n</center>\r\n</body>\r\n</html>\r\n";

  22.     $litime = ($limittime==0 ? 1000 : $limittime);
  23.     $func = '';

  24.     if($gourl=='-1')
  25.     {
  26.         if($limittime==0) $litime = 5000;
  27.         $gourl = "javascript:history.go(-1);";
  28.     }

  29.     if($gourl=='' || $onlymsg==1)
  30.     {
  31.         $msg = "<script>alert(\"".str_replace("\"","“",$msg)."\");</script>";
  32.     }
  33.     else
  34.     {
  35.         //当网址为:close::objname 时, 关闭父框架的id=objname元素
  36.         if(preg_match('/close::/',$gourl))
  37.         {
  38.             $tgobj = trim(preg_replace('/close::/', '', $gourl));
  39.             $gourl = 'javascript:;';
  40.             $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n";
  41.         }
  42.         
  43.         $func .= "      var pgo=0;
  44.       function JumpUrl(){
  45.         if(pgo==0){ location='$gourl'; pgo=1; }
  46.       }\r\n";
  47.         $rmsg = $func;
  48.         $rmsg .= "document.write(\"<div class='ts_div'>";
  49.         $rmsg .= "<div class='ts_border'><div class='ts_b2'>'<h2>织梦CMS提示</h2>\");\r\n";
  50.         $rmsg .= "document.write(\"<p>\");\r\n";
  51.         $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");\r\n";
  52.         $rmsg .= "document.write(\"</p></div></div></div>\");\r\n";
  53.         $rmsg .= "document.write(\"";
  54.         
  55.         if($onlymsg==0)
  56.         {
  57.             if( $gourl != 'javascript:;' && $gourl != '')
  58.             {
  59.                 $rmsg .= "<div class='ts_tz'>如果浏览器没有自动跳转,请<a href='{$gourl}'>点击这里</a></div>";
  60.                 $rmsg .= "\");\r\n";
  61.                 $rmsg .= "setTimeout('JumpUrl()',$litime);";
  62.             }
  63.             else
  64.             {
  65.                 $rmsg .= "<br/></div>\");\r\n";
  66.             }
  67.         }
  68.         else
  69.         {
  70.             $rmsg .= "<br/><br/></div>\");\r\n";
  71.         }
  72.         $msg  = $htmlhead.$rmsg.$htmlfoot;
  73.     }
  74.     echo $msg;
  75. }
然后下载附件中的图片。
图片附件


懒人覆盖方法,下载common.func.rar附件。解压后直接覆盖到include文件夹


评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)