diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-21 09:44:48 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-21 09:44:48 +0000 |
commit | d8e044d4b6bcc240f974d457a4601f54b6eea526 (patch) | |
tree | 82b3377411ca21242a4815a900858bd346ed5158 /mod/riverdashboard | |
parent | b4f73b8a8bab3b2235d1f709f28cbbb0291c5075 (diff) | |
download | elgg-d8e044d4b6bcc240f974d457a4601f54b6eea526.tar.gz elgg-d8e044d4b6bcc240f974d457a4601f54b6eea526.tar.bz2 |
let site admins toggle between a classic activity stream or the new clustered version
git-svn-id: http://code.elgg.org/elgg/trunk@5826 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/riverdashboard')
-rw-r--r-- | mod/riverdashboard/index.php | 7 | ||||
-rw-r--r-- | mod/riverdashboard/languages/en.php | 3 | ||||
-rw-r--r-- | mod/riverdashboard/views/default/river/item/wrapper_classic.php | 22 | ||||
-rw-r--r-- | mod/riverdashboard/views/default/settings/riverdashboard/edit.php | 9 |
4 files changed, 40 insertions, 1 deletions
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 |