When you do a members search, the url displays as:
http://www.mydomain.com/search.php?search_mode=simple&NickName=theirusername&ID=&submit=Search
What I want is to show member's details by default, the url displays as:
http://www.mydomain.com/search.php?search_result_mode=ext&search_mode=simple&NickName=theirusername&submit=Search
I found the bit of code to edit is in inc/classes/BxDolProfileFields.php:
'name' => 'search_mode', When I change it to 'name' => 'search_result_mode=ext&search_mode', it is stripping the & and = characters. It displays the url as:
http://www.mydomain.com/search.php?search_result_mode%3Dext%26search_mode=simple&NickName=theirusername&ID=&submit=Search
If I go to the address bar and replace the %3D with =, and the %26 to & and hit enter, it takes me to the profiles with the detailed results, just as I want. Does anyone know what I can do to make this stop replacing the characters? I've read up this page:
http://www.w3schools.com/tags/ref_urlencode.asp
I've even tried 'name' => 'search_result_mode%3Dext%26search_mode', but it doesn't work. Why is it stripping and not displaying correctly?
|
It is not intended to be edited in that manner. The function that array is passed to is not expecting to see two parameters in that name array entry.
Do this instead.
Undo your changes and edit this file instead.
In the root of your dolphin site in the file search.php at about line 31 look for this.
bx_import('BxTemplProfileView');
Add this directly under it.
if(!isset($_GET['search_mode'])) { header('Location: search.php?search_result_mode=ext&search_mode=sim'); }
Then go down to about line 90 and look for this.
$sLinks = BxDolPageView::getBlockCaptionMenu(mktime(), array( 'simple' => array('href' => $sUrl . '?search_mode=sim', 'title' => _t('_search_tab_simple'), 'onclick' => '', 'active' => $bSimAct), 'advanced' => array('href' => $sUrl . '?search_mode=adv', 'title' => _t('_search_tab_Adv'), 'onclick' => '', 'active' => $bAdvAct), 'quick' => array('href' => $sUrl . '?search_mode=quick', 'title' => _t('_search_tab_quick'), 'onclick' => '', 'active' => $bQuiAct), ));
Change it to this.
$sLinks = BxDolPageView::getBlockCaptionMenu(mktime(), array( 'simple' => array('href' => $sUrl . '?search_result_mode=ext&search_mode=sim', 'title' => _t('_search_tab_simple'), 'onclick' => '', 'active' => $bSimAct), 'advanced' => array('href' => $sUrl . '?search_result_mode=ext&search_mode=adv', 'title' => _t('_search_tab_Adv'), 'onclick' => '', 'active' => $bAdvAct), 'quick' => array('href' => $sUrl . '?search_result_mode=ext&search_mode=quick', 'title' => _t('_search_tab_quick'), 'onclick' => '', 'active' => $bQuiAct), )); https://www.deanbassett.com |
When I go to search.php, it redirects to http://www.mydomain.com/search.php?search_result_mode=ext&search_mode=sim, so that part is good. But when you use the search form to search for, let's say User name, it goes to this url:
http://www.mydomain.com/search.php?search_mode=simple&NickName=SEARCHEDNAME&submit=Search
It's stripping the search_result_mode=ext out of the URL. What could fix that?
Also, I only use Simple search, and I was able to remove the quick and advance links from the search box in search.php by removing these lines:
'advanced' => array('href' => $sUrl . '?search_result_mode=ext&search_mode=adv', 'title' => _t('_search_tab_Adv'), 'onclick' => '', 'active' => $bAdvAct), 'quick' => array('href' => $sUrl . '?search_result_mode=ext&search_mode=quick', 'title' => _t('_search_tab_quick'), 'onclick' => '', 'active' => $bQuiAct),
Where can I remove the "Simple" and "Details" links on the result box? I don't see it in search.php. Sometimes this software is a Pain in the @ss because you have to edit several files to accomplish one little goal.
|
I was wrong in my last post, it's Detailed search I use.
In regards to the Simple and Details links, just like I figured, it was in a totally different file, /base/scripts/BxBaseProfileView.php.
If I remove
case 'ext': $modeTitle = _t('_Extended'); break;
It removes the Details link. But if I remove
case 'sim': $modeTitle = _t('_Simple'); break;
It removes the link, but leaves the little grey bubble, I've included an image.
|
Guess thats's not going to work.
I'll have to do some more digging. Back to the drawing board of that one.
https://www.deanbassett.com |
Well, you got it right up to the point of using the search. I'll owe you a case of beer for all your help |
If only the boonex developers would participate in these forums more often.
I am sure there is a very simple way to change the mode. They wrote it, so they probably know exactly where it is.
Instead of doing hacks like this.
https://www.deanbassett.com |
That's what gets me most, most of the things we hack, are things that should be included right outta the box. It sux when you have to go through file after file just to change one thing. |
Does anyone from Boonex read these forums? I know this is an easy fix, but I can't find where to fix the search feature, the rest works. |