aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/views.php2
-rw-r--r--mod/groups/views/default/groups/grouplisting.php4
-rw-r--r--mod/tabbed_profile/views/default/profile/listing.php2
-rwxr-xr-xmod/tabbed_profile/views/default/profile/tabs/activity.php31
-rwxr-xr-xmod/tabbed_profile/views/default/profile/tabs/friends.php12
-rw-r--r--mod/tabbed_profile/views/default/profile/tabs/groups.php13
6 files changed, 28 insertions, 36 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 1f02d29d2..5214e96c3 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1043,7 +1043,7 @@ function elgg_view_image_block($image, $body, $vars = array()) {
*/
function elgg_view_listing($icon, $info) {
elgg_deprecated_notice('elgg_view_listing deprecated by elgg_view_image_block', 1.8);
- return elgg_view('layout/objects/media', array('icon' => $icon, 'body' => $info));
+ return elgg_view('layout/objects/image_block', array('image' => $icon, 'body' => $info));
}
/**
diff --git a/mod/groups/views/default/groups/grouplisting.php b/mod/groups/views/default/groups/grouplisting.php
index dc6bdb4a4..e7caa5f31 100644
--- a/mod/groups/views/default/groups/grouplisting.php
+++ b/mod/groups/views/default/groups/grouplisting.php
@@ -40,6 +40,4 @@ $info .= "</p>";
$info .= "<p class='entity-title'><a href=\"" . $vars['entity']->getUrl() . "\">" . $vars['entity']->name . "</a></p>";
$info .= "<p class='entity-subtext'>" . $vars['entity']->briefdescription . "</p>";
-echo elgg_view_listing($icon, $info);
-
-?>
+echo elgg_view_image_block($icon, $info);
diff --git a/mod/tabbed_profile/views/default/profile/listing.php b/mod/tabbed_profile/views/default/profile/listing.php
index 0622264b8..489b1d50e 100644
--- a/mod/tabbed_profile/views/default/profile/listing.php
+++ b/mod/tabbed_profile/views/default/profile/listing.php
@@ -46,4 +46,4 @@ if (!$banned) {
$info .= "</p>";
}
-echo elgg_view_listing($icon, $info);
+echo elgg_view_image_block($icon, $info);
diff --git a/mod/tabbed_profile/views/default/profile/tabs/activity.php b/mod/tabbed_profile/views/default/profile/tabs/activity.php
index ccd2a3915..7a7bffb94 100755
--- a/mod/tabbed_profile/views/default/profile/tabs/activity.php
+++ b/mod/tabbed_profile/views/default/profile/tabs/activity.php
@@ -2,31 +2,12 @@
/**
* Elgg user display (details)
* @uses $vars['entity'] The user entity
- *
- * @todo this needs to recieve a list of activity or HTML in $vars that's generated by a plugin hook.
- * None of this logic should be here.
*/
-$limit = 20;
-if (is_plugin_enabled('thewire')) {
- // users last status msg, if they posted one
- echo elgg_view("profile/status", array("entity" => $vars['entity']));
-}
+echo elgg_view('profile/status', array("entity" => $vars['entity']));
-if (is_plugin_enabled('conversations')) {
- // users last status msg, if they posted one
- echo elgg_view("profile/status", array("entity" => $vars['entity']));
-}
-
-if (is_plugin_enabled('riverdashboard')) {
- //select the correct river
- if (get_plugin_setting('activitytype', 'riverdashboard') == 'classic') {
- echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,true);
- } else {
- echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,false);
- echo elgg_view('riverdashboard/js');
- }
-} else {
- // @todo this should not be here.
- echo "Riverdashboard not loaded";
-} \ No newline at end of file
+$params = array(
+ 'subject_guid' => $vars['entity']->guid,
+ 'limit' => 5,
+);
+echo elgg_list_river($params);
diff --git a/mod/tabbed_profile/views/default/profile/tabs/friends.php b/mod/tabbed_profile/views/default/profile/tabs/friends.php
index 9195629e5..8b3171405 100755
--- a/mod/tabbed_profile/views/default/profile/tabs/friends.php
+++ b/mod/tabbed_profile/views/default/profile/tabs/friends.php
@@ -1,11 +1,17 @@
<?php
/**
* Profile friends
- **/
+ */
-$friends = list_entities_from_relationship('friend', $vars['entity']->getGUID(), FALSE, 'user', '', 0, 10, FALSE);
+$options = array(
+ 'relationship_guid' => $vars['entity']->getGUID(),
+ 'relationship' => 'friend',
+ 'inverse_relationship' => false,
+ 'full_view' => false,
+);
+$friends = elgg_list_entities_from_relationship($options);
-if(!$friends) {
+if (!$friends) {
$friends = '<p>' . elgg_echo('profile:no_friends') . '</p>';
}
diff --git a/mod/tabbed_profile/views/default/profile/tabs/groups.php b/mod/tabbed_profile/views/default/profile/tabs/groups.php
index 323bb61f1..f2746a655 100644
--- a/mod/tabbed_profile/views/default/profile/tabs/groups.php
+++ b/mod/tabbed_profile/views/default/profile/tabs/groups.php
@@ -1,10 +1,17 @@
<?php
/**
* Profile groups
- **/
-$groups = list_entities_from_relationship('member',$vars['entity']->getGUID(),false,'group','',0, $limit,false, false);
+ */
-if(!$groups) {
+$options = array(
+ 'relationship_guid' => $vars['entity']->getGUID(),
+ 'relationship' => 'member',
+ 'inverse_relationship' => false,
+ 'full_view' => false,
+);
+$groups = elgg_list_entities_from_relationship($options);
+
+if (!$groups) {
$groups = '<p>' . elgg_echo('profile:no_groups') . '</p>';
}