misc fixes

This commit is contained in:
Mike Macgirvin 2010-07-12 20:16:27 -07:00
parent 9a20216e51
commit 58fd9647a2
3 changed files with 6 additions and 5 deletions

View File

@ -10,13 +10,13 @@ function directory_content(&$a) {
$tpl .= file_get_contents('view/directory_header.tpl'); $tpl .= file_get_contents('view/directory_header.tpl');
$o .= replace_macros($tpl, array( $o .= replace_macros($tpl, array(
'$search' => $search '$search' => $search,
'$finding' => (strlen($search) ? "<h4>Finding: '$search'</h4>" : "")
)); ));
if($search) if($search)
$search = dbesc($search); $search = dbesc($search);
$sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`employer`,`school`) AGAINST ('$search' IN BOOLEAN MODE) " : ""); $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`) AGAINST ('$search' IN BOOLEAN MODE) " : "");
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `publish` = 1 AND `user`.`blocked` = 0 $sql_extra "); $r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `publish` = 1 AND `user`.`blocked` = 0 $sql_extra ");

View File

@ -1,5 +1,7 @@
<h1>Site Directory</h1> <h1>Site Directory</h1>
$finding
<div id="directory-search-wrapper"> <div id="directory-search-wrapper">
<form id="directory-search-form" action="directory" method="get" > <form id="directory-search-form" action="directory" method="get" >
<input type="text" name="search" id="directory-search" class="search-input" onfocus="this.select();" value="$search" /> <input type="text" name="search" id="directory-search" class="search-input" onfocus="this.select();" value="$search" />

View File

@ -538,13 +538,12 @@ input#dfrn-url {
} }
#directory-search-wrapper { #directory-search-wrapper {
float: right; margin-left: 350px;
margin-right: 20px; margin-right: 20px;
margin-bottom: 50px; margin-bottom: 50px;
} }
#directory-search-end { #directory-search-end {
clear: both;
} }
.pager { .pager {