aboutsummaryrefslogtreecommitdiff
path: root/mod/activity/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/activity/views')
-rw-r--r--mod/activity/views/default/activity/offset.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/mod/activity/views/default/activity/offset.php b/mod/activity/views/default/activity/offset.php
new file mode 100644
index 000000000..638cf9150
--- /dev/null
+++ b/mod/activity/views/default/activity/offset.php
@@ -0,0 +1,27 @@
+<?php
+ /// Extract the offset value
+ $offset = $vars['offset'];
+ $backset = '-1'; //used to display the forward link
+ $add_to_url = $vars['add_to_url'];//used to determine which pane we are looking at - sitewide, friends, own
+ $url = "pg/activity/";//set the default url
+
+ if($add_to_url == "friends")
+ $url = "pg/activity/" . $_SESSION['user']->username . "/friends/";
+
+ if($add_to_url == "own")
+ $url = "pg/activity/" . $_SESSION['user']->username;
+
+
+ if($offset > 19)
+ $backset = $offset - 20;//set backset
+
+ $offset = $offset + 20;//set new offset
+
+ echo "<div style=\"margin:10px 0 0 0;font-size:16px;\">";
+
+ if($backset != '-1')
+ echo "<a href=\"{$vars['url']}{$url}?offset={$backset}\">". elgg_echo('activity:forward') . "</a> ";
+
+ echo "<a href=\"{$vars['url']}{$url}?offset={$offset}\">" . elgg_echo('activity:back') . "</a></div>";
+
+?> \ No newline at end of file