aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--languages/en.php8
-rw-r--r--views/default/river/ElggRelationship/create.php46
-rw-r--r--views/default/river/ElggUser/login.php15
-rw-r--r--views/default/river/ElggUser/logout.php16
-rw-r--r--views/default/river/dashboard.php (renamed from views/default/river/shell.php)2
5 files changed, 53 insertions, 34 deletions
diff --git a/languages/en.php b/languages/en.php
index fcaeafd10..fb6ca8734 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -323,8 +323,12 @@
/**
* XML-RPC
*/
- 'xmlrpc:noinputdata' => "Input data missing",
-
+ 'xmlrpc:noinputdata' => "Input data missing",
+
+ /**
+ * River
+ */
+ 'river:relationship:friend' => 'is now friends with',
);
add_translation("en",$english);
diff --git a/views/default/river/ElggRelationship/create.php b/views/default/river/ElggRelationship/create.php
new file mode 100644
index 000000000..95f27b512
--- /dev/null
+++ b/views/default/river/ElggRelationship/create.php
@@ -0,0 +1,46 @@
+<?php
+ /**
+ * Elgg relationship create event.
+ * Display something in the river when a relationship is created.
+ *
+ * @package Elgg
+ * @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['object'];
+
+ // Find out what type of relationship we're dealing with (will only display a few)
+ if ($object instanceof ElggRelationship)
+ {
+ switch ($object->relationship)
+ {
+ // Friending
+ case 'friend' :
+ case 'friends' : // 'friends' shouldn't be used, but just incase :)
+
+ // Get second object
+ $userb = get_entity($object->guid_two);
+
+ // Only users can be friends
+ if (($performed_by instanceof ElggUser) && ($userb instanceof ElggUser))
+ {
+ // User A
+ echo "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a> ";
+
+ // Verb
+ echo elgg_echo('river:relationship:friend');
+
+ // user B
+ echo " <a href=\"{$userb->getURL()}\">{$userb->name}</a>";
+ }
+
+ break;
+ }
+ }
+
+?> \ No newline at end of file
diff --git a/views/default/river/ElggUser/login.php b/views/default/river/ElggUser/login.php
deleted file mode 100644
index 7747fc86b..000000000
--- a/views/default/river/ElggUser/login.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
- /**
- * Elgg river user login
- *
- * @package Elgg
- * @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/
- */
-
- $log_entry = $vars['log_entry'];
- $object = $vars['object'];
-?>
-<?php echo $object->name; ?> logged in
diff --git a/views/default/river/ElggUser/logout.php b/views/default/river/ElggUser/logout.php
deleted file mode 100644
index 4d31ad312..000000000
--- a/views/default/river/ElggUser/logout.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
- /**
- * Elgg river user logout
- *
- * @package Elgg
- * @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/
- */
-
- $log_entry = $vars['log_entry'];
- $object = $vars['object'];
-
-?>
-<?php echo $object->name; ?> logged out \ No newline at end of file
diff --git a/views/default/river/shell.php b/views/default/river/dashboard.php
index ef6ad6e70..152923f66 100644
--- a/views/default/river/shell.php
+++ b/views/default/river/dashboard.php
@@ -1,6 +1,6 @@
<?php
/**
- * Elgg river pageshell
+ * Elgg river for dashboard.
*
* @package Elgg
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2