aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/river2.php15
-rwxr-xr-xmod/profile/views/default/profile/profile_contents/activity.php7
-rw-r--r--mod/riverdashboard/index.php7
-rw-r--r--mod/riverdashboard/languages/en.php3
-rw-r--r--mod/riverdashboard/views/default/river/item/wrapper_classic.php22
-rw-r--r--mod/riverdashboard/views/default/settings/riverdashboard/edit.php9
6 files changed, 56 insertions, 7 deletions
diff --git a/engine/lib/river2.php b/engine/lib/river2.php
index 3d826f517..8e015ea0d 100644
--- a/engine/lib/river2.php
+++ b/engine/lib/river2.php
@@ -383,10 +383,17 @@ function elgg_view_river_item($item) {
));
}
}
- return elgg_view('river/item/wrapper',array(
- 'item' => $item,
- 'body' => $body
- ));
+ if (get_plugin_setting('activitytype', 'riverdashboard') == 'classic'){
+ return elgg_view('river/item/wrapper_classic',array(
+ 'item' => $item,
+ 'body' => $body
+ ));
+ }else{
+ return elgg_view('river/item/wrapper',array(
+ 'item' => $item,
+ 'body' => $body
+ ));
+ }
}
return false;
}
diff --git a/mod/profile/views/default/profile/profile_contents/activity.php b/mod/profile/views/default/profile/profile_contents/activity.php
index 0184816e0..a9b8cce8c 100755
--- a/mod/profile/views/default/profile/profile_contents/activity.php
+++ b/mod/profile/views/default/profile/profile_contents/activity.php
@@ -16,8 +16,11 @@
echo elgg_view("profile/status", array("entity" => $vars['entity']));
}
if(is_plugin_enabled('riverdashboard')) {
- // users last 10 activites
- echo elgg_view_river_items($vars['entity']->getGuid(), 0, '', '', '', '', $limit,0,0,false,false);
+ //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);
} else {
echo "Riverdashboard not loaded";
}
diff --git a/mod/riverdashboard/index.php b/mod/riverdashboard/index.php
index e025850ea..758aa4018 100644
--- a/mod/riverdashboard/index.php
+++ b/mod/riverdashboard/index.php
@@ -41,7 +41,12 @@ switch($orient) {
$title = elgg_view_title($title_wording);
-$river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, false) . "</div>";
+//select the correct river
+if (get_plugin_setting('activitytype', 'riverdashboard') == 'classic')
+ $river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, true) . "</div>";
+else
+ $river = elgg_view_river_items($subject_guid, 0, $relationship_type, $type, $subtype, '', 20, 0, 0, true, false) . "</div>";
+
// Replacing callback calls in the nav with something meaningless
$river = str_replace('callback=true','replaced=88,334',$river);
diff --git a/mod/riverdashboard/languages/en.php b/mod/riverdashboard/languages/en.php
index 1a3c96f2b..558ac7e5d 100644
--- a/mod/riverdashboard/languages/en.php
+++ b/mod/riverdashboard/languages/en.php
@@ -22,6 +22,9 @@ $english = array(
'river:all' => "All activity",
'river:mine' => "My activity",
'river:friends' => "Friends' activity",
+ 'river:classic' => 'Classic',
+ 'river:clustered' => 'Clustered',
+ 'river:type' => 'Would you like the activity stream to be in classic format (chronological) or clustered?',
'river:widget:description' => "Show your latest activity.",
'river:widget:title:friends' => "Friends' activity",
'river:widget:description:friends' => "Show what your friends are up to.",
diff --git a/mod/riverdashboard/views/default/river/item/wrapper_classic.php b/mod/riverdashboard/views/default/river/item/wrapper_classic.php
new file mode 100644
index 000000000..abbed46d6
--- /dev/null
+++ b/mod/riverdashboard/views/default/river/item/wrapper_classic.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Elgg river item wrapper.
+ * Wraps all river items.
+ *
+ * @package Elgg
+ * @author Curverider
+ * @link http://elgg.com/
+ */
+?>
+<div class="river_item riverdashboard">
+ <span class="river_item_useravatar">
+ <?php
+ echo elgg_view("profile/icon",array('entity' => get_entity($vars['item']->subject_guid), 'size' => 'small'));
+ ?>
+ </span>
+ <div class="river_item_contents clearfloat">
+ <?php
+ echo $vars['body'];
+ ?>
+ </div>
+</div> \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/settings/riverdashboard/edit.php b/mod/riverdashboard/views/default/settings/riverdashboard/edit.php
new file mode 100644
index 000000000..30cfaba5f
--- /dev/null
+++ b/mod/riverdashboard/views/default/settings/riverdashboard/edit.php
@@ -0,0 +1,9 @@
+<?php
+?>
+<p>
+ <?php echo elgg_echo('river:type'); ?>
+ <select name="params[activitytype]">
+ <option value="classic" <?php if ($vars['entity']->activitytype == 'classic') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('river:classic'); ?></option>
+ <option value="clustered" <?php if ($vars['entity']->activitytype == 'clustered') echo " selected=\"yes\" "; ?>><?php echo elgg_echo('river:clustered'); ?></option>
+ </select>
+</p> \ No newline at end of file