4 function match_content(&$a) {
10 $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
12 $o .= '<h2>' . t('Profile Match') . '</h2>';
14 $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
19 if(! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) {
20 notice( t('No keywords to match. Please add keywords to your default profile.') . EOL);
26 $tags = trim($r[0]['pub_keywords'] . ' ' . $r[0]['prv_keywords']);
30 if($a->pager['page'] != 1)
31 $params['p'] = $a->pager['page'];
33 if(strlen(get_config('system','directory_submit_url')))
34 $x = post_url('http://dir.friendica.com/msearch', $params);
36 $x = post_url($a->get_baseurl() . '/msearch', $params);
41 $a->set_pager_total($j->total);
42 $a->set_pager_itemspage($j->items_page);
45 if(count($j->results)) {
49 $tpl = get_markup_template('match.tpl');
50 foreach($j->results as $jj) {
52 $connlnk = $a->get_baseurl() . '/follow/?url=' . $jj->url;
53 $o .= replace_macros($tpl,array(
54 '$url' => zrl($jj->url),
56 '$photo' => $jj->photo,
57 '$inttxt' => ' ' . t('is interested in:'),
58 '$conntxt' => t('Connect'),
59 '$connlnk' => $connlnk,
65 info( t('No matches') . EOL);