PDA

View Full Version : Simple Additional PM Notification



admin
15-05-2011, 09:36 AM
This mod/hack gives you a very simple yet much more noticeable Private Message notification. When the user has any PM's a red box will be added to the header of your website notifying the user of a new PM. It has animated text which is shown in the .gif screenshot attached below.

=|= Install =|=


Open Template - header

Add at Top -

<!-- Private Message Alert -->
<style type="text/css">
.alert {
background-color:#F00;
width:100%;
height:30px;
color:#fff;
font-size:14px;
display:block;
}
.alert p {
padding:5px;
}
.alert a {
color:#ccc;
text-decoration:none;
}
</style>
<vb:if condition="$bbuserinfo[pmunread]">
<div class="alert">
<p><span style="text-decoration:blink; font-weight:bold;">ATTENTION! {vb:raw bbuserinfo.username}</span> You've got {vb:raw bbuserinfo.pmunread} unread private message(s), click <a href="private.php">here</a> to view.</p></div>
</vb:if>
<!-- Private Message Alert End -->

Demo: http://www.vbulletin.org/forum/attac...5&d=1304172078 (http://www.vbulletin.org/forum/attachment.php?attachmentid=128655&d=1304172078)

http://upload.itvnn.net/do.php?img=53 (http://upload.itvnn.net/)

Dunglx
15-05-2011, 10:29 AM
Các bạn dùng thử code sau nếu không được nhé

<!-- Notification Alert -->
<style type="text/css">
.alert {
background-color:#F00;
width:100%;
height:30px;
color:#fff;
font-size:14px;
display:block;
}
.alert p {
padding:5px;
}
.alert a {
color:#ccc;
text-decoration:none;
}
.alert a:hover {
color:#fff;
text-decoration:underline;
}
#slidealert {
display: none;
height:auto;
padding-bottom:5px;
background-color: #F00;
}
#slidealert a {
text-decoration:none;
color:#CCC;
padding:5px;
}
#slidealert a:hover {
text-decoration:underline;
color:#fff;
}
</style>
<script src="jquery.js" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function ShowHide(){
$("#slidealert").animate({"height": "toggle"}, { duration: 1000 });
}
//]]>
</script>
<vb:if condition="$notifications_total">
<div class="alert">
<p><span style="text-decoration:blink; font-weight:bold;">ATTENTION! {vb:raw bbuserinfo.username}</span> You've got {vb:raw notifications_total} new notification(s), click <a onclick="ShowHide(); return false;" href="#">here</a> to view.</div><div id="slidealert">{vb:raw notifications_menubits}<a onclick="ShowHide(); return false;" href="#">Close</a></div></p>
</vb:if>
<!-- Notification Alert End -->

t8mclub
20-05-2011, 02:01 AM
VBB4.1.3 chạy được, nhưng không click here được.