aboutsummaryrefslogtreecommitdiff
path: root/views/default/layout/elements/page_links.php
blob: 56eab0bf82f6184053c5a9ece2b007934ae86aee (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
<?php
/**
 * Page links: RSS link, reported content link, etc.
 */

// Are there feeds to display?
global $autofeed;
$rss_link = '';
if (isset($autofeed) && $autofeed == true) {
	$url = full_url();
	if (substr_count($url,'?')) {
		$url .= "&view=rss";
	} else {
		$url .= "?view=rss";
	}
	$url = elgg_format_url($url);
	$label = elgg_echo('feed:rss');
	
	$rss_link = elgg_view('output/url', array(
		'text' => '<span class="elgg-icon elgg-icon-rss"></span>',
		'href' => $url,
		'title' => $label,
		'rel' => 'nofollow',
		'encode_text' => false,
		'class' => 'elgg-rss',
	));
}

// view to extend by plugins
$links = elgg_view('page/links', $vars);

if ($links || $rss_link) {
	echo '<div class="elgg-page-links clearfix mbm">';
	echo $rss_link;
	echo $links;
	echo '</div>';
}