diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/search.inc | 30 | ||||
-rw-r--r-- | includes/theme.inc | 2 |
2 files changed, 31 insertions, 1 deletions
diff --git a/includes/search.inc b/includes/search.inc new file mode 100644 index 000000000..2fd527a90 --- /dev/null +++ b/includes/search.inc @@ -0,0 +1,30 @@ +<? + +function search_form($keys) { + global $REQUEST_URI; + $output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"POST\">\n"; + $output .= " <INPUT SIZE=\"50\" VALUE=\"". check_textfield($keys) ."\" NAME=\"keys\">"; + $output .= " <INPUT TYPE=\"submit\" VALUE=\"Search\">\n"; + $output .= "</FORM>\n"; + return $output; +} + +function search_data($keys, $type) { + if ($keys && $type) { + $result = module_execute($type, "find", $keys); + foreach ($result as $entry) { + $output .= "<P>\n"; + $output .= " <B><U><A HREF=\"$entry[link]\">$entry[subject]</A></U></B><BR>"; + $output .= " <SMALL>$site_url$entry[link]". ($entry[user] ? " - ". format_username($entry[user]) : "") ."". ($entry[date] ? " - ". format_date($entry[date], "small") : "") ."</SMALL>"; + $output .= "</P>\n"; + } + } + + if (!$output) { + $output .= "<P><SMALL>Your search yielded no results:</P><UL><LI>try using fewer words.</LI><LI>try using more general keywords.</LI><LI>try using different keywords.</LI></UL></SMALL>\n"; + } + + return $output; +} + +?>
\ No newline at end of file diff --git a/includes/theme.inc b/includes/theme.inc index e54de391c..35573ecb8 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -38,7 +38,7 @@ function theme_account($theme) { $content .= "<P>\n"; $content .= "<LI><A HREF=\"account.php?op=edit&topic=user\">edit your information</A></LI>\n"; $content .= "<LI><A HREF=\"account.php?op=edit&topic=site\">edit your preferences</A></LI>\n"; - $content .= "<LI><A HREF=\"account.php?op=edit&topic=content\">edit site content</A></LI>\n"; + $content .= "<LI><A HREF=\"account.php?op=edit&topic=content\">edit your content</A></LI>\n"; $content .= "<P>\n"; if (user_permission($user)) { |