Elgg  Version 2.3
tag.php
Go to the documentation of this file.
1 <?php
12 if (empty($vars['value']) && $vars['value'] !== 0 && $vars['value'] !== '0') {
13  return;
14 }
15 
16 $query_params = array();
17 
18 $query_params["q"] = $vars['value'];
19 $query_params["search_type"] = "tags";
20 
21 if (!empty($vars['type'])) {
22  $query_params["type"] = $vars['type'];
23  unset($vars['type']);
24 }
25 
26 if (!empty($vars['subtype'])) {
27  $query_params["subtype"] = $vars['subtype'];
28  unset($vars['subtype']);
29 }
30 
31 $url = !empty($vars['base_url']) ? $vars['base_url'] : 'search';
32 unset($vars['base_url']);
33 
34 $url .= '?' . http_build_query($query_params);
35 
36 $params = array(
37  'href' => $url,
38  'text' => $vars['value'],
39  'encode_text' => true,
40  'rel' => 'tag',
41 );
42 
44 
45 echo elgg_view('output/url', $params);
$params
Definition: tag.php:36
if(empty($vars['value'])&&$vars['value']!==0 &&$vars['value']!== '0') $query_params
Elgg single tag output.
Definition: tag.php:16
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
$vars['class']
Elgg tag input.
Definition: tag.php:11
if(!empty($vars['type'])) if(!empty($vars['subtype'])) $url
Definition: tag.php:31