4 function tagmatch_content(&$a) {
6 $search = notags(trim($_REQUEST['search']));
10 $o .= '<h2>' . t('Tag Match') . ' - ' . $search . '</h2>';
14 $p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : '');
16 if(strlen(get_config('system','directory_submit_url')))
17 $x = fetch_url('http://dir.friendika.com/lsearch?f=' . $p . '&search=' . urlencode($search));
19 //TODO fallback local search if global dir not available.
21 // $x = post_url($a->get_baseurl() . '/lsearch', $params);
26 $a->set_pager_total($j->total);
27 $a->set_pager_itemspage($j->items_page);
30 if(count($j->results)) {
32 $tpl = get_markup_template('match.tpl');
33 foreach($j->results as $jj) {
35 $o .= replace_macros($tpl,array(
38 '$photo' => $jj->photo,
44 info( t('No matches') . EOL);
49 $o .= '<div class="clear"></div>';