词条信息

admin
超级管理员
版本创建者 发短消息   
简易百科旧版 >> 帝国cms各版本都可以使用的消息提醒功能! >> 历史版本

最新历史版本 :帝国cms各版本都可以使用的消息提醒功能! 返回词条



查看了一下论坛,发展没有消息提醒功能的弹窗提示功能。


仔细研究了一下,找到解决的办法。


查找“您有新消息”源代码找到其所在的位置。


例如:e/member/login/loginjs.php文件


找到$havemsg="<a href='".$public_r['newsurl']."e/member/msg/' target=_blank><font color=red>您有新消息</font></a>";


将其替换为$havemsg="<script> alert('您有新的消息! ');window.location.href='".$public_r['newsurl']."e/member/msg/';</script>";


这时出现下面的弹窗提示。 


上传以下图片:

点击确定后,会自动跳转到消息列表的页面!


同样如果不打算强制跳转到消息列表的页面,只需要将代码修改为


$havemsg="<a href='".$public_r['newsurl']."e/member/msg/' target=_blank><font color=red>您有新消息</font></a><script> alert('您有新的消息! ');</script>";


不错吧!分享给大家!


下面是7.2的方法


e\data\template\loginiframetemp.php


找到$havemsg


<a href='".$public_r['newsurl']."e/member/msg/' target=_blank><font color=red>您有新消息</font></a><img style='CURSOR:hand;' onclick='music();' src='/style/images/mes.gif' width='0' height='0'  /><embed src='/style/images/newmesg.mp3' id='mp' align='center' border='0' style='height:0px;width:0px;' autostart='true' loop='true'>