Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Search Log MOD update
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Etymon
Advanced Member

United States
2383 Posts

Posted - 30 June 2021 :  02:23:04  Show Profile  Visit Etymon's Homepage  Reply with Quote
The Search Log MOD came out in May of 2003, which was several years before the most current version of Snitz Forums 2000.

In the current version of Snitz Forums 2000, you can manually change the code in search.asp to either search by typing in a member's name into the Search By Member: input box, or you can choose a member's name from a drop down menu. This option is set in line 43 of search.asp ...

Dim strUseMemberDropDownBox
strUseMemberDropDownBox = 0


However, when the Search Log MOD came out, I think the dropdown menu was standard code, and the blank input box was not.

The dropdown menu provides a numerical value when selected, but the code for the blank input box does not, which is why the returned results produce the following error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'cInt'

/forum/inc_searchlog.asp, line 33


In inc_searchlog.asp, on Line 32, change:

strSLByMember = CInt(Request.Form("SearchMember"))


... to the following code:


	if trim(Request.Form("SearchMember")) <> "" then
		strSLByMember = GetMemberID(Request("SearchMember"))
	else
		strSLByMember = 0
	end if

Edited by - Etymon on 01 July 2021 06:52:08

Etymon
Advanced Member

United States
2383 Posts

Posted - 30 June 2021 :  06:50:31  Show Profile  Visit Etymon's Homepage  Reply with Quote
An alternate code offered to me by Carefree via email is the following:


	strSLByMember = 0

		If Trim(Request("SearchMember")) > "" Then
			If IsNumeric(Trim(Request("SearchMember"))) Then
				strSLByMember = GetMemberID(Request("SearchMember"))
			else
				strSLByMember = 0
			end if
		End If

Edited by - Etymon on 01 July 2021 06:50:59
Go to Top of Page

Carefree
Advanced Member

Philippines
4206 Posts

Posted - 09 July 2021 :  18:22:19  Show Profile  Reply with Quote
Didn't realize that was a text field. This is the simplest method:

strSLByMember = 0
If Trim(Request("SearchMember")) > "" Then strSLByMember = GetMemberID(Trim(Request("SearchMember")))

Edited by - Carefree on 09 July 2021 18:33:25
Go to Top of Page

Etymon
Advanced Member

United States
2383 Posts

Posted - 10 July 2021 :  06:58:00  Show Profile  Visit Etymon's Homepage  Reply with Quote
It's actually looking for a number, which is the reason for using GetMemberID.
Go to Top of Page

Etymon
Advanced Member

United States
2383 Posts

Posted - 16 July 2021 :  00:53:31  Show Profile  Visit Etymon's Homepage  Reply with Quote
The text field in the GUI, that the user sees, is requiring a member name.

The code that processes the text field takes the member name and converts it to a member id by using the function GetMemberID()

Edited by - Etymon on 16 July 2021 00:54:21
Go to Top of Page

Carefree
Advanced Member

Philippines
4206 Posts

Posted - 16 July 2021 :  01:48:04  Show Profile  Reply with Quote
Yep, so my last reply is the simplest method. 2 lines and does it all.
Go to Top of Page

Etymon
Advanced Member

United States
2383 Posts

Posted - 16 July 2021 :  03:01:45  Show Profile  Visit Etymon's Homepage  Reply with Quote
2 lines or more ... what matters is if the person coding understands what the code does. Snitz is more about learning than about competing on who's code is shortest.
Go to Top of Page

Carefree
Advanced Member

Philippines
4206 Posts

Posted - 17 July 2021 :  14:26:39  Show Profile  Reply with Quote
Well, if anyone reads this who still codes in classic Snitz (.asp format), I hope they learned something from this topic.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07