dedecms怎么修改提示信息!
时间 : 2023-11-19 16:09:02声明: : 文章内容来自网络,不保证准确性,请自行甄别信息有效性
最佳答案
要修改dedecms的提示信息,你需要编辑dedecms系统文件中的相应代码。以下是修改dedecms提示信息的步骤:
1. 首先,确认你已经登录dedecms后台管理系统,并具备管理员权限。
2. 进入dedecms的根目录,找到/include/common.inc.php文件,用文本编辑器打开。
3. 在common.inc.php文件中,找到以下部分代码:
```php
// 系统消息
function ShowMsg($msg, $gourl, $onlymsg=0, $limittime=0)
{
if(empty($GLOBALS['cfg_php_errors']))
{
$GLOBALS['cfg_php_errors'] = 'E_ALL';
}
$funarr = array(0 => "Error", 1 => "Warning", 2 => "Syste", 4 => "Notice", 8=> "Deprecated");
$str = "<ul class='e'><li>".str_replace($funarr,"<li>",$str)."</ul>";
if($gourl=="-1") { $gourl = "javascript:history.go(-1);"; }
if($gourl=='' || $onlymsg==1) {
$msg = "<script>alert(\"".addcslashes($msg,'\"')."\");</script>";
} else {
if(!preg_match("#^http:\/\/#i",$gourl) && $gourl!="")
{
$gourl = $GLOBALS['cfg_phpurl']."/".$gourl;
}
$litime = ($limittime==0 ? 1500 : $limittime);
$litime = $litime/1000;
$msg = "<meta http-equiv=\"refresh\" content=\"".$litime.";url=".$gourl."\"><script>";
$msg .= "setTimeout('JumpUrl()', ".$limittime.");function JumpUrl(){location.href='".$gourl."';}";
$msg .= "</script><img style='width:0px;height:0px;' src='".$GLOBALS['cfg_plus_dir']."/img/vdimgck.png'>";
/*$msg = "<script>";
$msg .= " alert('".addcslashes($msg,'\'')."');";
if($gourl=='-1')
{
$msg .= "history.go(-1);";
} else {
$msg .= "location.href='$gourl';";
}
$msg .= "</script>";*/
}
return $msg;
}
4. 在上述代码中,你可以修改`$str = "<ul class='e'><li>".str_replace($funarr,"<li>",$str)."</ul>";`这一行代码中的提示信息内容来修改错误提示信息的样式。
5. 保存common.inc.php文件。
6. 然后,打开dedecms后台管理系统,进行相关操作,查看修改后的提示信息是否生效。
请注意,在修改dedecms的系统文件时,要备份相关文件以防意外。另外,建议在修改前详细了解dedecms的文件结构和相关的代码知识,以免引发系统错误。
其他答案
要修改DedeCMS的提示信息,你可以按照以下步骤操作:
1. 登录DedeCMS后台管理系统。
2. 点击左侧菜单栏的“系统设置”。
3. 在弹出的子菜单中选择“提示信息设置”。
4. 在提示信息设置页面,你可以看到各种不同事件的提示信息列表,包括登录、发布、评论等。
5. 找到你想修改的提示信息,例如“登录失败提示”,点击编辑按钮。
6. 在弹出的编辑框中,你可以修改提示信息的内容。你可以使用HTML标签和DedeCMS的系统标签来自定义提示信息的格式和内容。
7. 修改完毕后,点击保存按钮将修改应用到系统中。
请注意,修改提示信息时要注意语言表达的准确性和友好性,避免使用过于严厉或冷漠的字眼,以便给用户提供更好的使用体验。
另外,为了保证站点的安全性和稳定性,建议备份好系统文件和数据库,以防修改出错导致系统故障。
https/SSL证书广告优选IDC>>
推荐主题模板更多>>
推荐文章