summaryrefslogtreecommitdiff
path: root/lib/searchaction.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-07 17:14:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-07 17:14:23 -0400
commit4e3e4fcfff53ea3a5ef5c90672f3848596d3acbf (patch)
treebe91ddb09b757813f983f40cb2b239eb931186fd /lib/searchaction.php
parent5953d56fe2db5cf610cd13e3806d5596964592cf (diff)
parent92d18134bfe082f75211b3baa93f20d88367dba6 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'lib/searchaction.php')
-rw-r--r--lib/searchaction.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/searchaction.php b/lib/searchaction.php
index c762db16f..e7ad4affd 100644
--- a/lib/searchaction.php
+++ b/lib/searchaction.php
@@ -133,5 +133,31 @@ class SearchAction extends Action
$this->showResults($q, $page);
}
}
+
+ function searchSuggestions($q) {
+ $qe = urlencode($q);
+ $message = sprintf(_(<<<E_O_T
+* Make sure all words are spelled correctly.
+* Try different keywords.
+* Try more general keywords.
+* Try fewer keywords.
+
+You can also try your search on other engines:
+
+* [Twingly](http://www.twingly.com/search?q=%s&content=microblog&site=identi.ca)
+* [Tweet scan](http://www.tweetscan.com/indexi.php?s=%s)
+* [Google](http://www.google.com/search?q=site%%3A%%%%site.server%%%%+%s)
+* [Yahoo](http://search.yahoo.com/search?p=site%%3A%%%%site.server%%%%+%s)
+
+
+E_O_T
+), $qe, $qe, $qe, $qe);
+ $this->elementStart('dl', array('id' => 'help_search', 'class' => 'help'));
+ $this->element('dt', null, _('Search help'));
+ $this->elementStart('dd', 'instructions');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('dd');
+ $this->elementEnd('div');
+ }
}