aboutsummaryrefslogtreecommitdiff
path: root/views/default/river/item/wrapper.php
blob: 27de4affd55ed6636b0e49f3f7424856dd5035a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
 * Elgg river item wrapper.
 * Wraps all river items.
 *
 * @package Elgg
 * @author Curverider
 * @link http://elgg.com/
 */

//get the site admins choice avatars or action icons
$avatar_icon = get_plugin_setting("avatar_icon","riverdashboard");
if(!$avatar_icon) {
	$avatar_icon = "icon";
}

if($avatar_icon == "icon"){

	?>
	<div class="river_item">
		<div class="river_<?php echo $vars['item']->type; ?>">
			<div class="river_<?php echo $vars['item']->subtype; ?>">
				<div class="river_<?php echo $vars['item']->action_type; ?>">
					<div class="river_<?php echo $vars['item']->type; ?>_<?php if($vars['item']->subtype) echo $vars['item']->subtype . "_"; ?><?php echo $vars['item']->action_type; ?>">
					<p>
						<?php
								echo $vars['body'];
						?>
						<span class="river_item_time">
							(<?php
								echo friendly_time($vars['item']->posted);
							?>)
						</span>
					</p>
					</div>
				</div>
			</div>
		</div>
	</div>

	<?php
} else {
	?>
	<div class="river_item">
		<span class="river_item_useravatar">
			<?php
				echo elgg_view("profile/icon",array('entity' => get_entity($vars['item']->subject_guid), 'size' => 'tiny'));
			?>
		</span>
		<p class="river_item_body">
			<?php
				echo $vars['body'];
			?>
			<span class="river_item_time">
				(<?php
					echo friendly_time($vars['item']->posted);
				?>)
			</span>
		</p>
		<div class="clearfloat"></div>
	</div>
	<?php
}
?>