Author |
Topic |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 24 May 2008 : 07:35:22
|
If you select the members option dropdown box to display ie 'Display Member List vs. Text Box [0:Text Box;1:Member List] strUseMemberDropDownBox = 1 When you press the search button without any words entered in the keywords input box, there is no error messages to pinpoint that the string is empty. All the search does is display all the pages.. However, when the strUseMemberDropDownBox = 0 The empty keywords input provides the right warning messages.. You must enter some search keywords and/or author or staff member in order to complete the search. There is no information with which to do a search.
The No Search Terms Entered routine seems part of an if/else statement at lines 859 onwards.. Any help will help settle the grey matter working overdrive and causing a headache.. thank you andy< |
Edited by - Andy Humm on 24 May 2008 07:36:50 |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 24 May 2008 : 09:04:30
|
I believe that's by design, so you can get all posts by a particular member without regard to content.< |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 24 May 2008 : 09:40:15
|
But surely the 'nil input check' routine which works in one scenario does not work with strUseMemberDropDownBox = 0< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 24 May 2008 : 20:46:47
|
Why not? If you are searching for a particular word, group of words, or phrase; then you're not worried about the author. However, if you want to see all posts by an author, you cannot be expected to guess words from every post.< |
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 25 May 2008 : 00:54:23
|
I turned the drop-down list on for my search_mod and it works perfectly. If a member is selected and no keywords are used, it displays all posts by that member (by design). That can be limited with keywords if desired; however, they're not necessary.
If you want to ALWAYS require the keywords, you'll be eliminating part of the effectiveness for yourself. However, you can use an override (mLev) to give yourself the display all message option.
You only have two things to look for:
#1
Change to say:
Where it has:
Delete the end if.
#2
Change to say:
That should give you want you want.< |
Edited by - Carefree on 25 May 2008 01:26:24 |
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 25 May 2008 : 13:48:03
|
To mirror leatherlips, that is how mine works too.. But surely if NO data/keywords or members are selected, you should get a nil return. It is understood, or logic, if you selected a members name without any keyword, then Yes, you would pull all their posts.. < |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 25 May 2008 : 14:20:14
|
My understanding of the search drop down box functionality. (Taken 'default state' as the drop down box is not touched on page load)
1. In default state, no member logged in, no key words entered, and search button submitted there should be no returns. 2. In default state, member logged in, no keywords entered, search button submitted, all logged in member posts in date range should display. 3. Dropdown selected to member, logged in/out, no keywords entered, search button submitted, search result pulls all that members posts 4. In default state, member logged in/out, keyword entered, search button submitted, search results pulls all members posts with that keyword
It appears that the drop down box should have the first stage option alias default with no affect on the search, thus there would or should be a nil return and the appropriate message to enter a keyword would be displayed..
I believe this is the code for the drop down options and maybe it needs revisiting to control the search if the parameters above are the correct way of search functionality..
< |
Edited by - Andy Humm on 25 May 2008 14:21:20 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 25 May 2008 : 14:57:46
|
Further to above: if you alter the code for the option value line 940 Response.Write " <select name=""SearchMember"">" & vbCrLf &_ " <option value=""0"">All Members</option>" & vbCrLf and remove the 0
The seach functionality works except if you add any keyword and no member selected, submit the search you get an error Microsoft VBScript runtime error '800a000d' Type mismatch: 'cLng' /forumtest/inc_searchlog.asp, line 18 line 18 is if strUseMemberDropDownBox = 1 then strSLByMember = CLng(Request.Form("SearchMember")) which is looking for an option value I believe we must look at keeping a 0 value in line 940, but changing the parameter of what 0 is ie it should be a null.. < |
Edited by - Andy Humm on 25 May 2008 14:58:44 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 17 May 2009 : 02:27:13
|
I was reviewing old topics and found this one had never been fixed.
|
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 19 May 2009 : 10:39:11
|
Thank you CF for spareing the time to sort this out |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 19 May 2009 : 15:44:11
|
You're welcome. Sorry I never got back to it a year ago. |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 21 May 2009 : 18:00:03
|
No problems, better late than never and I appreciate you are actively busy with other tasks too. |
|
|
|
Topic |
|