From 9456cf380a51d4863dd0ee96499763bb32f54284 Mon Sep 17 00:00:00 2001 From: dave Date: Wed, 10 Mar 2010 16:32:05 +0000 Subject: the beginnings of a new activity river with ajax notification and conversation clustering. git-svn-id: http://code.elgg.org/elgg/trunk@5344 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/riverdashboard/endpoint/ping.php | 71 ++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 mod/riverdashboard/endpoint/ping.php (limited to 'mod/riverdashboard/endpoint/ping.php') diff --git a/mod/riverdashboard/endpoint/ping.php b/mod/riverdashboard/endpoint/ping.php new file mode 100644 index 000000000..2a87da746 --- /dev/null +++ b/mod/riverdashboard/endpoint/ping.php @@ -0,0 +1,71 @@ + TRUE, + 'created_time_lower' => $last_reload, + 'wheres' => array('e.type != \'user\'') +)); +if(!$entity_creation) + $entity_creation = 0; +//grab any entities updated +$entity_update = elgg_get_entities(array( + 'count' => TRUE, + 'modified_time_lower' => $last_reload, + 'wheres' => array('e.type != \'user\'') +)); +if(!$entity_update) + $entity_update = 0; +//get any relationships, such as friending - this is not working quite right yet +//$relationship_action = elgg_get_entities_from_relationship(array('count' => TRUE)); +//if(!$relationship_action) +// $relationship_action = 0; + +//sum all totals +$all_activity = $annotations + $entity_creation + $entity_update; + +if ($all_activity > 0) { + $s = ($all_activity == 1) ? '' : 's'; + echo "$all_activity update$s!"; + //echo ""; +?> + + +