$firehose = intval(get_pconfig(local_user(),'system','notify_full'));
- $z = q("select * from notify where seen = 0 and uid = %d
- order by date desc",
+ $z = q("select * from notify where uid = %d
+ order by seen asc, date desc limit 0, 50",
intval(local_user())
);
echo ' <notif count="'. count($z) .'">';
if(count($z)) {
foreach($z as $zz) {
- echo xmlize($a->get_baseurl() . '/notify/view' . $zz['id'], $zz['name'],$zz['url'],$zz['photo'],relative_date($zz['date']), strip_tags(bbcode($zz['msg'])));
+ echo xmlize($a->get_baseurl() . '/notify/view/' . $zz['id'], $zz['name'],$zz['url'],$zz['photo'],relative_date($zz['date']), ($zz['seen'] ? '' : '! ') .strip_tags(bbcode($zz['msg'])));
}
}
}
<span id="mail-update" class="nav-ajax-left"></span>
{{ endif }}
+
+
{{ if $nav.manage }}<a id="nav-manage-link" class="nav-commlink $nav.manage.2 $sel.manage" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a>{{ endif }}
+
+ {{ if $nav.notifications }}
+ <li id="nav-notifications-linkmenu" class="nav-commlink"><a href="$nav.notifications.0" rel="#nav-notifications-menu" title="$nav.notifications.1">$nav.notifications.1</a>
+ <span id="notify-update" class="nav-notify"></span>
+ <ul id="nav-notifications-menu" class="menu-popup">
+ <li id="nav-notifications-mark-all"><a href="#" onclick="notifyMarkAll(); return false;">$nav.notifications.mark.1</a></li>
+ <li id="nav-notifications-see-all"><a href="$nav.notifications.all.0">$nav.notifications.all.1</a></li>
+ <li class="empty">$emptynotifications</li>
+ </ul>
+ </li>
+ {{ endif }}
+
{{ if $nav.settings }}<a id="nav-settings-link" class="nav-link $nav.settings.2" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a>{{ endif }}
{{ if $nav.profiles }}<a id="nav-profiles-link" class="nav-link $nav.profiles.2" href="$nav.profiles.0" title="$nav.profiles.3" >$nav.profiles.1</a>{{ endif }}
<span id="nav-end"></span>
<span id="banner">$banner</span>
</nav>
+
+<ul id="nav-notifications-template" style="display:none;" rel="template">
+ <li><a href="{0}">{2} <span class="notif-when">{3}</span></a></li>
+</ul>
opacity: 1.0;
filter:alpha(opacity=100);
}
+
+/* notifications popup menu */
+.nav-notify {
+ display: none;
+ position: absolute;
+ font-size: 10px;
+ padding: 1px 3px;
+ top: 0px;
+ right: -10px;
+ min-width: 15px;
+ text-align: right;
+}
+.nav-notify.show {
+ display: block;
+}
+ul.menu-popup {
+ position: absolute;
+ display: none;
+ width: 10em;
+ margin: 0px;
+ padding: 0px;
+ list-style: none;
+ z-index: 100000;
+ top: 90px;
+}
+#nav-notifications-menu {
+ width: 320px;
+ max-height: 400px;
+ overflow-y: scroll;overflow-style:scrollbar;
+ background-color:#FFFFFF;
+ -moz-border-radius:0px 0px 5px 5px;
+ -webkit-border-radius:0px 0px 5px 5px;
+ border-radius:0px 0px 5px 5px;
+ border: 1px solid #888;
+ border-top: none;
+
+}
+#nav-notifications-menu .contactname { font-weight: bold; font-size: 0.9em; }
+#nav-notifications-menu img { float: left; margin-right: 5px; }
+#nav-notifications-menu .notif-when { font-size: 0.8em; display: block; }
+#nav-notifications-menu li {
+ padding: 7px 0px 7px 10px;
+ word-wrap:normal;
+ border-bottom: 1px solid #000;
+}
+
+#nav-notifications-menu li:hover {
+
+}
+
+#nav-notifications-menu a:hover {
+ text-decoration: underline;
+}
+
+.notif-item a {
+ color: #000000;
+}
+
+.notif-item a:hover {
+ text-decoration: underline;
+}
+
+.notif-image {
+ width: 32px;
+ height: 32px;
+ padding: 7px 7px 0px 0px;
+}