diff options
author | Michael <icarus@dabo.de> | 2012-02-23 20:53:22 +0100 |
---|---|---|
committer | Michael <icarus@dabo.de> | 2012-02-23 20:53:22 +0100 |
commit | 0409b5cdba003b6ce90d5ad0181e81c06af95ab1 (patch) | |
tree | c677adb7c0e8140bdb1e115a95d1aa23fdf734ed /mod/notifications.php | |
parent | 311e35731c52102cbce3befc6343f179080ad38c (diff) | |
parent | 8cacff69858c2ad097bafb80c93405e79c311edf (diff) | |
download | volse-hubzilla-0409b5cdba003b6ce90d5ad0181e81c06af95ab1.tar.gz volse-hubzilla-0409b5cdba003b6ce90d5ad0181e81c06af95ab1.tar.bz2 volse-hubzilla-0409b5cdba003b6ce90d5ad0181e81c06af95ab1.zip |
Merge remote branch 'upstream/master'
Conflicts:
include/bbcode.php
Diffstat (limited to 'mod/notifications.php')
-rwxr-xr-x | mod/notifications.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mod/notifications.php b/mod/notifications.php index 635639d89..5831c1b7a 100755 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -68,6 +68,11 @@ function notifications_content(&$a) { $o = ''; $tabs = array( array( + 'label' => t('System'), + 'url'=>$a->get_baseurl() . '/notifications/system', + 'sel'=> (($a->argv[1] == 'system') ? 'active' : ''), + ), + array( 'label' => t('Network'), 'url'=>$a->get_baseurl() . '/notifications/network', 'sel'=> (($a->argv[1] == 'network') ? 'active' : ''), @@ -295,6 +300,36 @@ function notifications_content(&$a) { '$notif_content' => $notif_content, )); + } else if (($a->argc > 1) && ($a->argv[1] == 'system')) { + + $notif_tpl = get_markup_template('notifications.tpl'); + + $not_tpl = get_markup_template('notify.tpl'); + require_once('include/bbcode.php'); + + $r = q("SELECT * from notify where uid = %d and seen = 0 order by date desc", + intval(local_user()) + ); + + if (count($r) > 0) { + foreach ($r as $it) { + $notif_content .= replace_macros($not_tpl,array( + '$item_link' => $a->get_baseurl().'/notify/view/'. $it['id'], + '$item_image' => $it['photo'], + '$item_text' => strip_tags(bbcode($it['msg'])), + '$item_when' => relative_date($it['date']) + )); + } + } else { + $notif_content .= t('No more system notifications.'); + } + + $o .= replace_macros($notif_tpl,array( + '$notif_header' => t('System'), + '$tabs' => $tabs, + '$notif_content' => $notif_content, + )); + } else if (($a->argc > 1) && ($a->argv[1] == 'personal')) { $notif_tpl = get_markup_template('notifications.tpl'); |