diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-07 16:05:17 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-07 16:05:17 +0000 |
commit | f2c274eeba80146dfecd6ddc0e1b28b3c6cb3f9d (patch) | |
tree | 8a59b1a27acfd5afb90674c267f69add638b8a92 /mod/activity | |
parent | 53f56ed753a65b2134e9ef90b57cc384e5b14b51 (diff) | |
download | elgg-f2c274eeba80146dfecd6ddc0e1b28b3c6cb3f9d.tar.gz elgg-f2c274eeba80146dfecd6ddc0e1b28b3c6cb3f9d.tar.bz2 |
small additions to the activity view
git-svn-id: https://code.elgg.org/elgg/trunk@2676 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/activity')
-rw-r--r-- | mod/activity/all.php | 6 | ||||
-rw-r--r-- | mod/activity/friends.php | 1 | ||||
-rw-r--r-- | mod/activity/index.php | 2 | ||||
-rw-r--r-- | mod/activity/languages/en.php | 60 | ||||
-rw-r--r-- | mod/activity/views/default/activity/offset.php | 27 |
5 files changed, 65 insertions, 31 deletions
diff --git a/mod/activity/all.php b/mod/activity/all.php index 6cd30e160..cd19a7507 100644 --- a/mod/activity/all.php +++ b/mod/activity/all.php @@ -20,10 +20,12 @@ global $autofeed; $autofeed = true; - if (elgg_get_viewtype()=='opendd') + if (elgg_get_viewtype()=='opendd'){ $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity_opendd($limit, $offset, $type, $subtype))); - else + }else{ $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity($limit, $offset, $type, $subtype))); + $body .= elgg_view('activity/offset', array('offset' => $offset)); + } page_draw(elgg_echo('activity:all'),elgg_view_layout("two_column_left_sidebar", '', $title . $body)); diff --git a/mod/activity/friends.php b/mod/activity/friends.php index 5fc468277..f3a9fa89f 100644 --- a/mod/activity/friends.php +++ b/mod/activity/friends.php @@ -28,6 +28,7 @@ $autofeed = true; $body = elgg_view('activity/dashboard', array('activity' => $activity)); + $body .= elgg_view('activity/offset', array('offset' => $offset, 'add_to_url' => 'friends')); } else $body = elgg_echo('activity:nofriendactivity'); diff --git a/mod/activity/index.php b/mod/activity/index.php index b9173976a..583edf555 100644 --- a/mod/activity/index.php +++ b/mod/activity/index.php @@ -26,6 +26,8 @@ $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity_opendd($limit, $offset, $type, $subtype, page_owner()))); else $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity($limit, $offset, $type, $subtype, page_owner()))); + $body .= elgg_view('activity/offset', array('offset' => $offset, 'add_to_url' => 'own')); + } else $body = elgg_echo('activity:usernotfound'); diff --git a/mod/activity/languages/en.php b/mod/activity/languages/en.php index 2af3a53e6..890192d2a 100644 --- a/mod/activity/languages/en.php +++ b/mod/activity/languages/en.php @@ -1,30 +1,32 @@ -<?php - /** - * Elgg activity plugin language pack. - * - * @package ElggActivity - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.com/ - */ - - $english = array( - - 'activity:all' => 'Site activity', - 'activity' => 'Activity', - 'activity:your' => 'Your activity', - 'activity:friends' => 'Friend\'s activity', - 'activity:person' => '%s\'s activity', - 'activity:person:friends' => '%s\'s friend\'s activity', - - 'activity:useasdashboard' => 'Do you wish to use the activity stream as the dashboard?', - - 'activity:noactivity' => 'Sorry, there is currently no activity that matches your search criteria', - - 'activity:usernotfound' => 'User not found', - 'activity:nofriendactivity' => 'No activity, perhaps you should add some more friends?', - ); - - add_translation("en",$english); +<?php
+ /**
+ * Elgg activity plugin language pack.
+ *
+ * @package ElggActivity
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ $english = array(
+
+ 'activity:all' => 'Site activity',
+ 'activity' => 'Activity',
+ 'activity:your' => 'Your activity',
+ 'activity:friends' => 'Friend\'s activity',
+ 'activity:person' => '%s\'s activity',
+ 'activity:person:friends' => '%s\'s friend\'s activity',
+
+ 'activity:useasdashboard' => 'Do you wish to use the activity stream as the dashboard?',
+
+ 'activity:noactivity' => 'Sorry, there is currently no activity that matches your search criteria',
+ 'activity:forward' => "forward",
+ 'activity:back' => "back",
+
+ 'activity:usernotfound' => 'User not found',
+ 'activity:nofriendactivity' => 'No activity, perhaps you should add some more friends?',
+ );
+
+ add_translation("en",$english);
?>
\ No newline at end of file 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 |