diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/groups/languages/en.php | 3 | ||||
-rw-r--r-- | mod/groups/views/default/river/ElggRelationship/create.php | 40 |
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 |