aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 10:24:15 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-19 10:24:15 +0000
commite482acd0c64200f2d94158c9fbe12537cad61a68 (patch)
tree443aea6abc9a0f87f5ec64ad045e0a430aac914b /engine/lib
parent39b0af97296be5e21cf1a764addacca91349e58a (diff)
downloadelgg-e482acd0c64200f2d94158c9fbe12537cad61a68.tar.gz
elgg-e482acd0c64200f2d94158c9fbe12537cad61a68.tar.bz2
Fixes #48: Elgg_view_river wrapper function
http://trac.elgg.org/elgg/ticket/48 git-svn-id: https://code.elgg.org/elgg/trunk@988 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/river.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 638f0e4cd..815ae9764 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -110,4 +110,29 @@
return $river;
}
+ /**
+ * Simplify drawing a river for a given user.
+ *
+ * @param int $guid The user
+ * @param unknown_type $limit Limit
+ * @param unknown_type $offset Offset
+ * @param string $view Optional view to use to display the river (dashboard is assumed)
+ */
+ function elgg_view_river($guid, $limit = 10, $offset = 0, $view = 'river/dashboard')
+ {
+ return elgg_view($view, array('river' => get_river_entries($guid,"", $limit, $offset)));
+ }
+
+ /**
+ * Simplify drawing a river for a given user, showing their friend's activity
+ *
+ * @param int $guid The user
+ * @param unknown_type $limit Limit
+ * @param unknown_type $offset Offset
+ * @param string $view Optional view to use to display the river (dashboard is assumed)
+ */
+ function elgg_view_friend_river($guid, $limit = 10, $offset = 0, $view = 'river/dashboard')
+ {
+ return elgg_view($view, array('river' => get_river_entries($guid,"", $limit, $offset)));
+ }
?> \ No newline at end of file