aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-17 11:05:26 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-17 11:05:26 +0000
commit81150f406a14503ae5ff8198c153bc545c67b10c (patch)
tree7515799ab94015cc46ffc787ad037e1e124620bb /views/default
parentbfeb658e58ce894b03fd9ba867bbf61b682f57f2 (diff)
downloadelgg-81150f406a14503ae5ff8198c153bc545c67b10c.tar.gz
elgg-81150f406a14503ae5ff8198c153bc545c67b10c.tar.bz2
CLOSED - #35: Create specific river views for dashboard
http://trac.elgg.org/elgg/ticket/35 git-svn-id: https://code.elgg.org/elgg/trunk@945 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-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
4 files changed, 47 insertions, 32 deletions
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