diff options
author | friendica <info@friendica.com> | 2012-02-22 23:34:30 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-02-22 23:34:30 -0800 |
commit | 41636a50aa4fd3f53ad9f9e9d797bfcc37ba8e13 (patch) | |
tree | 9b941d37b562480ff89f9d84d6514f40d4ecf7c0 /mod | |
parent | 808b886a3e18b07c63171c4833334e2cf77ddf71 (diff) | |
download | volse-hubzilla-41636a50aa4fd3f53ad9f9e9d797bfcc37ba8e13.tar.gz volse-hubzilla-41636a50aa4fd3f53ad9f9e9d797bfcc37ba8e13.tar.bz2 volse-hubzilla-41636a50aa4fd3f53ad9f9e9d797bfcc37ba8e13.zip |
new notify sort of working in testbubble
Diffstat (limited to 'mod')
-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'); |