mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-04-02 03:39 am

[dw-free] Add search box to faq.bml

[commit: http://hg.dwscoalition.org/dw-free/rev/e9e57139f824]

http://bugs.dwscoalition.org/show_bug.cgi?id=641

Add FAQ search box to faq.bml.

Patch by [personal profile] rho.

Files modified:
  • htdocs/support/faq.bml
  • htdocs/support/faq.bml.text
--------------------------------------------------------------------------------
diff -r ea9c2b7388a5 -r e9e57139f824 htdocs/support/faq.bml
--- a/htdocs/support/faq.bml	Thu Apr 02 03:32:50 2009 +0000
+++ b/htdocs/support/faq.bml	Thu Apr 02 03:39:02 2009 +0000
@@ -23,15 +23,14 @@ body<=
     my %faqcat; my %faqq;
     my $ret = "";
 
-    # Search box
-    $ret .= "<div style='width: 30%; float: right'><?standout ";
-    $ret .= "<strong>".BML::ml('.cannotfind', {faqsearch => "href='./faqsearch.bml'"})."</strong>";
-    $ret .= "<p>$ML{'.cannotfind.note'}</p>";
-    $ret .= " standout?></div>";
+    $ret .= "<?h1 $ML{'.faq.title'} h1?>";
+    $ret .= "<?p $ML{'.faq.title.text'} p?>";
 
-    $ret .= "<?h1 $ML{'.faq.title'} h1?>";
- 
-    $ret .= "<?p $ML{'.faq.title.text'} p?>";
+    # FAQ search
+    $ret .= "<?p $ML{'.faq.search.text'} p?>";
+    $ret .= "<form method='GET' action='$LJ::SITEROOT/support/faqsearch.bml'>";
+    $ret .= "<input type='text' name='q' size='30' />&nbsp;<input type='submit' value='$ML{'.faq.search.btn'}'>";
+    $ret .= "</form>";
 
     if ($altlang) {
         my $sql = "SELECT fc.faqcat, t.text AS 'faqcatname', fc.catorder FROM faqcat fc, ".
diff -r ea9c2b7388a5 -r e9e57139f824 htdocs/support/faq.bml.text
--- a/htdocs/support/faq.bml.text	Thu Apr 02 03:32:50 2009 +0000
+++ b/htdocs/support/faq.bml.text	Thu Apr 02 03:39:02 2009 +0000
@@ -1,9 +1,9 @@
 ;; -*- coding: utf-8 -*-
-.cannotfind.note=Note that the search feature is still in beta testing and under development, but it just may find you what you're looking for.
+.faq.back.link=Back to <a [[backlink]]>the support area</a>.
 
-.cannotfind=Can't find it? <a [[faqsearch]]>Search the FAQs</a>!
+.faq.search.btn=Search
 
-.faq.back.link=Back to <a [[backlink]]>the support area</a>.
+.faq.search.text=If you aren't sure where to start looking, use this box to search our documentation.
 
 .faq.title.text=Below are some frequently asked questions, and answers, too!  Oh boy.  Try to read this before you ask a new question.  If you know something we should add to this, let us know.
 
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org