Add link for advanced searching

This commit is contained in:
moodler 2005-04-24 15:13:58 +00:00
parent cb9ef4a06d
commit 10b9a26a20
2 changed files with 19 additions and 1 deletions

View File

@ -4,6 +4,7 @@
$string['addanewdiscussion'] = 'Add a new discussion topic';
$string['addanewtopic'] = 'Add a new topic';
$string['advancedsearch'] = 'Advanced search';
$string['allforums'] = 'All forums';
$string['allowchoice'] = 'Allow everyone to choose';
$string['allowdiscussions'] = 'Can a $a post to this forum?';

View File

@ -7,6 +7,7 @@
$search = trim(optional_param('search', '', PARAM_NOTAGS)); // search string
$page = optional_param('page', 0, PARAM_INT); // which page to show
$perpage = optional_param('perpage', 20, PARAM_INT); // which page to show
$showform = optional_param('showform', 0, PARAM_INT); // Just show the form
$user = trim(optional_param('user', '', PARAM_NOTAGS)); // Names to search for
$userid = trim(optional_param('userid', 0, PARAM_INT)); // UserID to search for
@ -96,7 +97,7 @@
$strsearchresults = get_string("searchresults", "forum");
$strpage = get_string("page");
if (!$search) {
if (!$search || $showform) {
print_header_simple("$strsearch", "",
"<a href=\"index.php?id=$course->id\">$strforums</a> -> $strsearch", 'search.words',
"", "", "&nbsp;", navmenu($course));
@ -142,6 +143,22 @@
<a href=\"search.php?id=$course->id\">$strsearch</a> -> ".s($search), '',
"", "", $searchform, navmenu($course));
echo '<div class="reportlink">';
echo '<a href="search.php?id='.$course->id.
'&amp;user='.urlencode($user).
'&amp;userid='.$userid.
'&amp;forumid='.$forumid.
'&amp;subject='.urlencode($subject).
'&amp;phrase='.urlencode($phrase).
'&amp;words='.urlencode($words).
'&amp;fullwords='.urlencode($fullwords).
'&amp;notwords='.urlencode($notwords).
'&amp;dateto='.$dateto.
'&amp;datefrom='.$datefrom.
'&amp;showform=1'.
'">'.get_string('advancedsearch','forum').'...</a>';
echo '</div>';
print_heading("$strsearchresults: $totalcount");
print_paging_bar($totalcount, $page, $perpage, "search.php?search=$search&amp;id=$course->id&amp;perpage=$perpage&amp;");