From 7c931c8e4fdbc7b3ff527d627e0e8bd158fb86ab Mon Sep 17 00:00:00 2001 From: pete Date: Tue, 30 Mar 2010 19:31:37 +0000 Subject: Added the beginnings of a bookmark view for group profile pages. git-svn-id: http://code.elgg.org/elgg/trunk@5556 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/bookmarks/languages/en.php | 2 +- mod/bookmarks/start.php | 3 ++ .../views/default/bookmarks/group_bookmarks.php | 36 ++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100755 mod/bookmarks/views/default/bookmarks/group_bookmarks.php (limited to 'mod/bookmarks') diff --git a/mod/bookmarks/languages/en.php b/mod/bookmarks/languages/en.php index 87d7772ca..2ba00a8dd 100644 --- a/mod/bookmarks/languages/en.php +++ b/mod/bookmarks/languages/en.php @@ -12,7 +12,7 @@ $english = array( 'bookmarks:friends' => "Friends' bookmarks", 'bookmarks:all' => "All site bookmarks", 'bookmarks:user' => "%s's bookmarks", - 'bookmarks:workgroup' => "Work Group bookmarks", + 'bookmarks:group' => "Group bookmarks", 'bookmarks:this' => "Bookmark this", 'bookmarks:this:group' => "Bookmark in %s", 'bookmarks:bookmarklet' => "Get bookmarklet", diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 3df44f724..9588f7a8a 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -42,6 +42,9 @@ function bookmarks_init() { // Add group menu option add_group_tool_option('bookmarks',elgg_echo('bookmarks:enablebookmarks'),true); + + // Extend Groups profile page + elgg_extend_view('groups/tool_latest','bookmarks/group_bookmarks'); } diff --git a/mod/bookmarks/views/default/bookmarks/group_bookmarks.php b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php new file mode 100755 index 000000000..c99ffe73a --- /dev/null +++ b/mod/bookmarks/views/default/bookmarks/group_bookmarks.php @@ -0,0 +1,36 @@ +owner_guid, "", 6, 0, false); + +echo "

".elgg_echo('bookmarks:group')."

"; + +if($bookmarks){ + foreach($bookmarks as $b){ + + //get the owner + $owner = $b->getOwnerEntity(); + + //get the time + $friendlytime = friendly_time($b->time_created); + + //get the bookmark title + $info = ""; + + //get the user details + $info .= "

{$friendlytime} "; + + //get the bookmark description + if($s->description) + $info .= "".elgg_echo('bookmarks:more')."

{$s->description}

"; + else + $info .= "

"; + + //display + echo "
" . $info . "
"; + } +} else { + echo "

" . elgg_echo("bookmarks:none") . "

"; +} +echo "
"; \ No newline at end of file -- cgit v1.2.3