aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 12:53:03 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-04 12:53:03 +0000
commitf783b09dc80ee4ee2af8749e6cf8cf62923b07e2 (patch)
tree40833b5d331d4ca2a56e108a32e12e75bc89995a
parent9c9f2fcbb744bf8a50299676dc70efc7cb4787e8 (diff)
downloadelgg-f783b09dc80ee4ee2af8749e6cf8cf62923b07e2.tar.gz
elgg-f783b09dc80ee4ee2af8749e6cf8cf62923b07e2.tar.bz2
Refs #109: River functionality
git-svn-id: https://code.elgg.org/elgg/trunk@1291 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--mod/groups/languages/en.php3
-rw-r--r--mod/groups/views/default/river/ElggRelationship/create.php40
2 files changed, 43 insertions, 0 deletions
diff --git a/mod/groups/languages/en.php b/mod/groups/languages/en.php
index 4e1b8f3fb..f43e89fb5 100644
--- a/mod/groups/languages/en.php
+++ b/mod/groups/languages/en.php
@@ -27,6 +27,7 @@
'groups:interests' => 'Interests',
'groups:website' => 'Website',
'groups:membership' => "Membership",
+ 'groups:owner' => "Owner",
'groups:noaccess' => 'No access to group',
'groups:cantedit' => 'You can not edit this group',
@@ -75,6 +76,8 @@ or click below to confirm request:
%s",
+ 'groups:river:member' => 'is now a member of',
+
);
add_translation("en",$english);
diff --git a/mod/groups/views/default/river/ElggRelationship/create.php b/mod/groups/views/default/river/ElggRelationship/create.php
new file mode 100644
index 000000000..b302097bc
--- /dev/null
+++ b/mod/groups/views/default/river/ElggRelationship/create.php
@@ -0,0 +1,40 @@
+<?php
+ /**
+ * Elgg relationship create event for groups
+ * Display something in the river when a group is joined
+ *
+ * @package ElggGroups
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Marcus Povey
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ */
+
+ $performed_by = $vars['performed_by'];
+ $log_entry = $vars['log_entry'];
+ $object = $vars['entity'];
+
+ // Find out what type of relationship we're dealing with (will only display a few)
+ if ($object instanceof ElggRelationship)
+ {
+
+ switch ($object->relationship)
+ {
+ // Friending
+ case 'member' :
+
+ $user = get_entity($object->guid_one);
+ $group = get_entity($object->guid_two);
+
+ if (($user instanceof ElggUser) && ($group instanceof ElggGroup))
+ {
+ echo "<a href=\"{$user->getURL()}\">{$user->name}</a> ";
+ echo elgg_echo("groups:river:member");
+ echo " '<a href=\"{$group->getURL()}\">{$group->title}</a>'";
+ }
+
+ break;
+ }
+ }
+
+?> \ No newline at end of file