4 function match_content(&$a) {
10 $o .= '<h2>' . t('Profile Match') . '</h2>';
12 $r = q("SELECT `pub_keywords`, `prv_keywords` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
17 if(! $r[0]['pub_keywords'] && (! $r[0]['prv_keywords'])) {
18 notice( t('No keywords to match. Please add keywords to your default profile.') . EOL);
24 $tags = trim($r[0]['pub_keywords'] . ' ' . $r[0]['prv_keywords']);
27 if($a->pager['page'] != 1)
28 $params['p'] = $a->pager['page'];
30 if(strlen(get_config('system','directory_submit_url')))
31 $x = post_url('http://dir.friendika.com/msearch', $params);
33 $x = post_url($a->get_baseurl() . '/msearch', $params);
38 $a->set_pager_total($j->total);
39 $a->set_pager_itemspage($j->items_page);
42 if(count($j->results)) {
43 foreach($j->results as $jj) {
45 $o .= '<div class="profile-match-wrapper"><div class="profile-match-photo">';
46 $o .= '<a href="' . $jj->url . '">' . '<img src="' . $jj->photo . '" alt="' . $jj->name . '" title="' . $jj->name . '[' . $jj->tags . ']' . '" /></a></div>';
47 $o .= '<div class="profile-match-break"></div>';
48 $o .= '<div class="profile-match-name"><a href="' . $jj->url . '" title="' . $jj->name . '[' . $jj->url .']' . '">' . $jj->name . '</a></div>';
49 $o .= '<div class="profile-match-end"></div></div>';
51 $o .= '<div id="profile-match-wrapper-end"></div>';
54 info( t('No matches') . EOL);