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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 IP to Country
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 22 August 2011 :  10:39:44  Show Profile  Reply with Quote
This little mod adds a variable "strLocale" to the forum. The variable holds the actual country a visitor is in based upon IP lookup. I added it to the pending member registration but it can be used anywhere.

superskytten1
New Member

Denmark
94 Posts

Posted - 24 August 2011 :  04:24:45  Show Profile  Reply with Quote
carefree i think there is a small "error" in the read me file in the inc_header.asp kim




Edited by - superskytten1 on 24 August 2011 04:26:32
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 24 August 2011 :  17:33:27  Show Profile  Reply with Quote
I had to replace the symbols with gt & lt to prevent it interpreting them, sorry about that.
Go to Top of Page

superskytten1
New Member

Denmark
94 Posts

Posted - 28 August 2011 :  02:32:38  Show Profile  Reply with Quote
but nice work carefree,you do a GREAT job for snitz users, many thanks carefree
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 August 2011 :  17:53:12  Show Profile  Reply with Quote
You're welcome.
Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 06 October 2011 :  20:54:44  Show Profile  Visit Todd's Homepage  Reply with Quote
Hi,

Once I include the inc_locale.asp in the header page I get the following error.

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/tyco/forum/inc_locale.asp, line 3


My Locale.asp hasn't been changed from the code that was downloaded. Line 3 ends up being the Set rsLocale line

<%
strSql="SELECT IPSTART, IPEND, IPCOUNTRY FROM " & strTablePrefix & "IPTOCOUNTRY WHERE IPSTART <= '" & Request.ServerVariables("Remote_Addr") & "' AND IPEND >= '" & Request.ServerVariables("Remote_Addr") & "'"
Set rsLocale= my_Conn.Execute(strSql)
If NOT (rsLocale.BOF or rsLocale.EOF) Then
	strLocale=rsLocale("IPCOUNTRY")
	rsLocale.Close
End If
Set rsLocale = Nothing
%>



I have followed all the steps in the instructions. All 4 database mods were run.


Admin for the Tyco Collector's Forum


Edited by - Todd on 06 October 2011 20:55:40
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 October 2011 :  19:30:43  Show Profile  Reply with Quote
Let me know what the output is after doing this:

After this line:

strSql="SELECT IPSTART, IPEND, IPCOUNTRY FROM " & strTablePrefix & "IPTOCOUNTRY WHERE IPSTART <= '" & Request.ServerVariables("Remote_Addr") & "' AND IPEND >= '" & Request.ServerVariables("Remote_Addr") & "'"

Insert these lines:

Response.Write	strSql
Response.End
Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 08 October 2011 :  11:04:27  Show Profile  Visit Todd's Homepage  Reply with Quote
After adding those lines to inc_locale.asp all pages now return the following text.

SELECT IPSTART, IPEND, IPCOUNTRY FROM FORUM_IPTOCOUNTRY WHERE IPSTART <= '24.149.253.241' AND IPEND >= '24.149.253.241'

That is the IP I currently have on my client.


Admin for the Tyco Collector's Forum

Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 08 October 2011 :  14:05:13  Show Profile  Reply with Quote
Well, that should work. The issue must be that Image has removed the My_Conn definition.

Before line 3, insert this:

set my_Conn = Server.CreateObject("ADODB.Connection")
Go to Top of Page

Todd
New Member

USA
63 Posts

Posted - 11 October 2011 :  21:44:54  Show Profile  Visit Todd's Homepage  Reply with Quote
I will try that, thanks. Makes sense. Will get back to you later this week, have bigger fish to fry right now. Appreciate the help and suggestions.


Admin for the Tyco Collector's Forum

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.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07