diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-06-24 16:47:20 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-06-24 16:47:20 +0000 |
commit | 0743b2cdbc9c0ede11ff6d9b69f6f4806b4c8702 (patch) | |
tree | 46ad82383c36a9ca6bb5a4dff7a72784d510dbf2 | |
parent | 9443139a27561a275c08051d574b23d1c8085430 (diff) | |
download | brdo-0743b2cdbc9c0ede11ff6d9b69f6f4806b4c8702.tar.gz brdo-0743b2cdbc9c0ede11ff6d9b69f6f4806b4c8702.tar.bz2 |
- XHTML-ified search-related code.
-rw-r--r-- | includes/search.inc | 16 | ||||
-rw-r--r-- | search.php | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/includes/search.inc b/includes/search.inc index f15db5ee6..e3cd239c3 100644 --- a/includes/search.inc +++ b/includes/search.inc @@ -2,20 +2,20 @@ function search_form($keys) { global $REQUEST_URI; - $output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"POST\">\n"; - $output .= " <INPUT SIZE=\"50\" VALUE=\"". check_form($keys) ."\" NAME=\"keys\">"; - $output .= " <INPUT TYPE=\"submit\" VALUE=\"". t("Search") ."\">\n"; - $output .= "</FORM>\n"; + $output .= "<form action=\"$REQUEST_URI\" method=\"POST\">\n"; + $output .= " <input size=\"50\" value=\"". check_form($keys) ."\" name=\"keys\">"; + $output .= " <input type=\"submit\" value=\"". t("Search") ."\">\n"; + $output .= "</form>\n"; return $output; } function search_data($keys, $type) { if ($keys && $type && $result = module_invoke($type, "search", check_query($keys))) { foreach ($result as $entry) { - $output .= "<P>\n"; - $output .= " <B><U><A HREF=\"$entry[link]\">$entry[title]</A></U></B><BR>"; - $output .= " <SMALL>$entry[link]". ($entry[user] ? " - ". format_username($entry[user]) : "") ."". ($entry[date] ? " - ". format_date($entry[date], "small") : "") ."</SMALL>"; - $output .= "</P>\n"; + $output .= "<p>\n"; + $output .= " <b><u><a href=\"$entry[link]\" />$entry[title]</a></u></b><br />"; + $output .= " <small>$entry[link]". ($entry[user] ? " - ". format_username($entry[user]) : "") ."". ($entry[date] ? " - ". format_date($entry[date], "small") : "") ."</small>"; + $output .= "</p>\n"; } } else { diff --git a/search.php b/search.php index 44c583475..9d5b118e2 100644 --- a/search.php +++ b/search.php @@ -12,16 +12,16 @@ if (user_access($user, "search content")) { // build options list: foreach (module_list() as $name) { if (module_hook($name, "search")) { - $options .= "<OPTION VALUE=\"$name\"". ($name == $type ? " SELECTED" : "") .">$name</OPTION>\n"; + $options .= "<option value=\"$name\"". ($name == $type ? " selected" : "") .">$name</option>\n"; } } // build form: - $form .= "<FORM ACTION=\"search.php\" METHOD=\"POST\">\n"; - $form .= " <INPUT SIZE=\"50\" VALUE=\"". check_form($keys) ."\" NAME=\"keys\" TYPE=\"text\">\n"; - $form .= " <SELECT NAME=\"type\">$options</SELECT>\n"; - $form .= " <INPUT TYPE=\"submit\" VALUE=\"". t("Search") ."\">\n"; - $form .= "</FORM>\n"; + $form .= "<form action=\"search.php\" method=\"POST\">\n"; + $form .= " <input size=\"50\" value=\"". check_form($keys) ."\" name=\"keys\" TYPE=\"text\">\n"; + $form .= " <select name=\"type\">$options</select>\n"; + $form .= " <input type=\"submit\" value=\"". t("Search") ."\">\n"; + $form .= "</form>\n"; // visualize form: $theme->header(); |