aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/views/default/blog/sidebar/tagcloud.php
blob: 70c45439026bb5029308e30f32a1641115b0d63a (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
<?php
/**
 * Blog tag cloud
 */

$loggedin_user = elgg_get_logged_in_user_entity();
$page_owner = elgg_get_page_owner_entity();

if ($page_owner && $vars['page'] != 'friends') {

	// friends page lists all tags; mine lists owner's
	$owner_guid = ($vars['page'] == 'friends') ? '' : $page_owner->getGUID();
	$options = array(
		'type' => 'object',
		'subtype' => 'blog',
		'owner_guid' => $owner_guid,
		'threshold' => 0,
		'limit' => 50,
		'tag_name' => 'tags',
	);
	echo elgg_view_tagcloud($options);
} else {
	$options = array(
		'type' => 'object',
		'subtype' => 'blog',
		'threshold' => 0,
		'limit' => 50,
		'tag_name' => 'tags',
	);
	echo elgg_view_tagcloud($options);
}