aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/river.php5
-rw-r--r--views/default/river/wrapper.php38
2 files changed, 29 insertions, 14 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php
index fbafa44d7..174b358ab 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -90,7 +90,10 @@
));
if (!empty($tam)) {
- $tam = elgg_view("river/wrapper",array('entry' => $tam, 'log' => $log));
+ $tam = elgg_view("river/wrapper",array(
+ 'entry' => $tam,
+ 'log' => $log,
+ 'object' => $object));
}
if ($tam)
diff --git a/views/default/river/wrapper.php b/views/default/river/wrapper.php
index 804f4a198..957cbcc78 100644
--- a/views/default/river/wrapper.php
+++ b/views/default/river/wrapper.php
@@ -11,23 +11,35 @@
* @link http://elgg.com/
*/
+ if (isset($vars['object']) && $vars['object'] instanceof ElggEntity) {
+
+ $subtype = $vars['object']->subtype;
+ if (empty($subtype)) $subtype = $vars['object']->type;
+ if (empty($subtype)) $subtype = "general";
+
+ }
+
?>
<div class="river_item">
- <p class="river_<?php echo $vars['log']->object_class; ?>_<?php echo $vars['log']->event; ?>">
- <?php
-
- echo $vars['entry'];
+ <div class="river_<?php echo $subtype; ?>">
+ <div class="river_<?php echo $vars['log']->event; ?>">
+ <p class="river_<?php echo $subtype; ?>_<?php echo $vars['log']->event; ?>">
+ <?php
- ?>
- <span class="river_item_time">
- (<?php
-
- echo friendly_time($vars['log']->time_created);
-
- ?>)
- </span>
- </p>
+ echo $vars['entry'];
+
+ ?>
+ <span class="river_item_time">
+ (<?php
+
+ echo friendly_time($vars['log']->time_created);
+
+ ?>)
+ </span>
+ </p>
+ </div>
+ </div>
</div> \ No newline at end of file