Opened 15 years ago
Closed 15 years ago
#829 closed defect (bug) (fixed)
Fallback for directory search forms when javascript is turned off
Reported by: | r-a-y | Owned by: | |
---|---|---|---|
Milestone: | 1.1 | Priority: | major |
Severity: | Version: | ||
Component: | Keywords: | directory search | |
Cc: |
Description
On line 1037 of /bp-core/bp-core-templatetags.php, change:
<form action="<?php echo $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/?s='.$_REQUEST['members_search']; ?>" method="post" id="search-members-form">
to:
<form action="<?php echo $bp->root_domain . '/' . BP_MEMBERS_SLUG . '/search/' ?>" method="post" id="search-members-form">
On line 2193 of /bp-groups/bp-groups-templatetags.php, change:
<form action="<?php echo $bp->root_domain . '/' . groups_SLUG . '/search/' ?>" method="post" id="search-groups-form">
to:
<form action="<?php echo $bp->root_domain . '/' . BP_GROUPS_SLUG . '/?s='.$_REQUEST['groups_search']; ?>" method="post" id="search-groups-form">
---
On line 1314 of bp-blogs/bp-blogs-templatestags.php, change:
<form action="<?php echo $bp->root_domain . '/' . blogs_SLUG . '/search/' ?>" method="post" id="search-blogs-form">
to:
<form action="<?php echo $bp->root_domain . '/' . BP_BLOGS_SLUG . '/?s='.$_REQUEST['blogs_search']; ?>" method="post" id="search-blogs-form">
---
Right now, because the directory searches rely on Javascript/AJAX and a pseudo slug of /search/ which doesn't currently exist, if javascript is turned off, the directory search forms do not work at all.
The lines I have altered will fallback the form actions so directory searches will work even when Javascript is turned off.
Oops! For the first changes (the member directory search), I reversed them by accident! But you should get my drift!