summaryrefslogtreecommitdiff
path: root/actions/peoplesearch.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-04-05 23:11:40 +0000
committerRobin Millette <millette@controlyourself.ca>2009-04-05 23:11:40 +0000
commit1ee24a2aaf6d07f0f6ffd4697da88c43b140bd13 (patch)
tree3f72e971c60e251cd659c5322c97004ea0ad38ab /actions/peoplesearch.php
parent6382d1d98ff4c769ee18d0a52635c163f40acfaf (diff)
added filler text to people search, suggesting other search options.
Diffstat (limited to 'actions/peoplesearch.php')
-rw-r--r--actions/peoplesearch.php36
1 files changed, 25 insertions, 11 deletions
diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php
index 9e515ade1..6fbb19b88 100644
--- a/actions/peoplesearch.php
+++ b/actions/peoplesearch.php
@@ -60,14 +60,8 @@ class PeoplesearchAction extends SearchAction
function showResults($q, $page)
{
-
$profile = new Profile();
-
- // lcase it for comparison
- // $q = strtolower($q);
-
$search_engine = $profile->getSearchEngine('identica_people');
-
$search_engine->set_sort_mode('chron');
// Ask for an extra to see if there's more.
$search_engine->limit((($page-1)*PROFILES_PER_PAGE), PROFILES_PER_PAGE + 1);
@@ -81,14 +75,34 @@ class PeoplesearchAction extends SearchAction
$terms = preg_split('/[\s,]+/', $q);
$results = new PeopleSearchResults($profile, $terms, $this);
$results->show();
+ $profile->free();
+ $this->pagination($page > 1, $cnt > PROFILES_PER_PAGE,
+ $page, 'peoplesearch', array('q' => $q));
+
} else {
- $this->element('p', 'error', _('No results'));
- }
+ $this->element('p', 'error', _('No results.'));
- $profile->free();
+ $qe = urlencode($q);
+ $message = _(<<<E_O_T
+* Make sure all words are spelled correctly.
+* Try different keywords.
+* Try more general keywords.
+* Try fewer keywords.
- $this->pagination($page > 1, $cnt > PROFILES_PER_PAGE,
- $page, 'peoplesearch', array('q' => $q));
+You can also try your search on other engines:
+
+* [Twingly](http://www.twingly.com/search?q=$qe&content=microblog&site=identi.ca)
+* [Tweet scan](http://www.tweetscan.com/indexi.php?s=$qe)
+* [Google](http://www.google.com/search?q=site%3Aidenti.ca+$qe)
+* [Yahoo](http://search.yahoo.com/search?p=site%3Aidenti.ca+$qe)
+
+E_O_T
+);
+ $this->elementStart('div', 'blankfiller');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
+ $profile->free();
+ }
}
}