show keywords in match results
This commit is contained in:
parent
cd7098501e
commit
e795d1265e
|
@ -43,7 +43,7 @@ function match_content(&$a) {
|
||||||
foreach($j->results as $jj) {
|
foreach($j->results as $jj) {
|
||||||
|
|
||||||
$o .= '<div class="profile-match-wrapper"><div class="profile-match-photo">';
|
$o .= '<div class="profile-match-wrapper"><div class="profile-match-photo">';
|
||||||
$o .= '<a href="' . $jj->url . '">' . '<img src="' . $jj->photo . '" alt="' . $jj->name . '" title="' . $jj->name . '[' . $jj->url . ']' . '" /></a></div>';
|
$o .= '<a href="' . $jj->url . '">' . '<img src="' . $jj->photo . '" alt="' . $jj->name . '" title="' . $jj->name . '[' . $jj->tags . ']' . '" /></a></div>';
|
||||||
$o .= '<div class="profile-match-break"></div>';
|
$o .= '<div class="profile-match-break"></div>';
|
||||||
$o .= '<div class="profile-match-name"><a href="' . $jj->url . '" title="' . $jj->name . '[' . $jj->url .']' . '">' . $jj->name . '</a></div>';
|
$o .= '<div class="profile-match-name"><a href="' . $jj->url . '" title="' . $jj->name . '[' . $jj->url .']' . '">' . $jj->name . '</a></div>';
|
||||||
$o .= '<div class="profile-match-end"></div></div>';
|
$o .= '<div class="profile-match-end"></div></div>';
|
||||||
|
|
|
@ -16,7 +16,7 @@ function msearch_post(&$a) {
|
||||||
if(count($r))
|
if(count($r))
|
||||||
$total = $r[0]['total'];
|
$total = $r[0]['total'];
|
||||||
|
|
||||||
$r = q("SELECT `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ",
|
$r = q("SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ",
|
||||||
dbesc($search),
|
dbesc($search),
|
||||||
intval($startrec),
|
intval($startrec),
|
||||||
intval($perpage)
|
intval($perpage)
|
||||||
|
@ -29,6 +29,7 @@ function msearch_post(&$a) {
|
||||||
'name' => $rr['name'],
|
'name' => $rr['name'],
|
||||||
'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'],
|
'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'],
|
||||||
'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'] . 'jpg'
|
'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'] . 'jpg'
|
||||||
|
'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords']);
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user