aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-21 19:03:55 -0800
committerfriendica <info@friendica.com>2012-02-21 19:03:55 -0800
commit53d3ee8852d7e825443c58121e63cf13c120c40e (patch)
tree449bea9ca9a381c317361acfea2109ca126d3cae /mod
parent3f2497ad20f5829b9e473cffbf1e635dae3f9dc9 (diff)
downloadvolse-hubzilla-53d3ee8852d7e825443c58121e63cf13c120c40e.tar.gz
volse-hubzilla-53d3ee8852d7e825443c58121e63cf13c120c40e.tar.bz2
volse-hubzilla-53d3ee8852d7e825443c58121e63cf13c120c40e.zip
new notifications
Diffstat (limited to 'mod')
-rw-r--r--mod/ping.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/mod/ping.php b/mod/ping.php
index 9c2e385d6..2898042a3 100644
--- a/mod/ping.php
+++ b/mod/ping.php
@@ -12,6 +12,13 @@ function ping_init(&$a) {
$xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
if(local_user()){
+ $z = q("select * from notify where seen = 0 and uid = %d
+ order by date desc",
+ intval(local_user())
+ );
+
+
+
$tags = array();
$comments = array();
$likes = array();
@@ -142,6 +149,22 @@ function ping_init(&$a) {
$tot = $mail+$intro+$register+count($comments)+count($likes)+count($dislikes)+count($friends)+count($posts)+count($tags);
echo ' <notif count="'.$tot.'">';
+
+ require_once('include/bbcode.php');
+
+ if(count($z)) {
+ foreach($z as $zz) {
+ echo xmlize($a->get_baseurl() . '/notify/' . $zz['id'], $zz['name'],$zz['url'],$zz['photo'],relative_date($zz['date']), bbcode($zz['msg']));
+
+ }
+ }
+
+
+
+
+
+/*
+
if ($intro>0){
foreach ($intros as $i) {
echo xmlize( $a->get_baseurl().'/notifications/intros/'.$i['id'], $i['name'], $i['url'], $i['photo'], relative_date($i['datetime']), t("{0} wants to be your friend") );
@@ -195,6 +218,8 @@ function ping_init(&$a) {
};
}
+*/
+
echo " </notif>";
}
echo " <sysmsgs>";